From: Michael Tremer Date: Fri, 22 Jul 2022 08:39:50 +0000 (+0000) Subject: tests: execute: Check if the process has received PID 1 X-Git-Tag: 0.9.28~652 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0363c3485edc5c51a27ae1907d8484053f933c02;p=pakfire.git tests: execute: Check if the process has received PID 1 Signed-off-by: Michael Tremer --- diff --git a/tests/python/execute.py b/tests/python/execute.py index 575216cca..4de96f4e4 100755 --- a/tests/python/execute.py +++ b/tests/python/execute.py @@ -99,6 +99,13 @@ class Test(unittest.TestCase): logging_callback=log, ) + def test_pid(self): + def checkpid(priority, message): + # The PID must be 1 + self.assertEqual(message, "1") + + self.pakfire.execute(["/command", "pid"], logging_callback=checkpid) + # This is an interactive test which cannot be performed automatically #def test_shell(self): # self.pakfire.execute(["/bin/bash", "-i"])