1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +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()
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):
for f in [self.output_file, self.unitfile_path]: