From 5c273476934bc5011ef4f377fd1ebbb51d4385ab Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 13 Oct 2022 17:31:37 +0900 Subject: [PATCH] test: improve assertion message on failure Suggested by CodeQL#169 (https://github.com/systemd/systemd/security/code-scanning/169). --- test/test-exec-deserialization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-exec-deserialization.py b/test/test-exec-deserialization.py index 06a7d369f6..08307b18d7 100755 --- a/test/test-exec-deserialization.py +++ b/test/test-exec-deserialization.py @@ -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]: