1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

test: improve assertion message on failure

Suggested by CodeQL#169 (https://github.com/systemd/systemd/security/code-scanning/169).
This commit is contained in:
Yu Watanabe 2022-10-13 17:31:37 +09:00
parent 7ff7eadf42
commit 5c27347693

View File

@ -200,7 +200,7 @@ class ExecutionResumeTest(unittest.TestCase):
self.reload() self.reload()
time.sleep(5) time.sleep(5)
self.assertTrue(subprocess.call("journalctl -b _PID=1 | grep -q 'Freezing execution'", shell=True) != 0) self.assertNotEqual(subprocess.call("journalctl -b _PID=1 | grep -q 'Freezing execution'", shell=True), 0)
def tearDown(self): def tearDown(self):
for f in [self.output_file, self.unitfile_path]: for f in [self.output_file, self.unitfile_path]: