d75393
From 16808487796822c5477d1ba0478bd2b0ca884818 Mon Sep 17 00:00:00 2001
d75393
From: Mikolaj Izdebski <mizdebsk@redhat.com>
d75393
Date: Mon, 18 May 2020 09:11:31 +0200
d75393
Subject: [PATCH 4/4] [test] Don't try to kill PID 1 during tests
d75393
d75393
Normally PID 1 should not be killable, but when running tests in
d75393
container this is actually possible.
d75393
---
d75393
 test/test_common.py | 4 ++--
d75393
 1 file changed, 2 insertions(+), 2 deletions(-)
d75393
d75393
diff --git a/test/test_common.py b/test/test_common.py
d75393
index 9bdc4675..67370422 100644
d75393
--- a/test/test_common.py
d75393
+++ b/test/test_common.py
d75393
@@ -163,8 +163,8 @@ def call_rpmgen(rpmgen_name, filelist_prefix, filelist, env=None,
d75393
     except OSError:
d75393
         pass
d75393
     for line in stdin:
d75393
-        # FIXME this PID is a temporary hack
d75393
-        ret = call_script(scriptpath, ["--cachedir", "/tmp", "--rpm-pid", "1"],
d75393
+        _, dummy_pid, _ = util.execute_command("echo $$")
d75393
+        ret = call_script(scriptpath, ["--cachedir", "/tmp", "--rpm-pid", dummy_pid],
d75393
                           stdin=line, extra_env=env)
d75393
     try:
d75393
         shutil.rmtree("/tmp/.javapackages_cache/")
d75393
-- 
d75393
2.25.4
d75393