From aae70a3ab5d25f192babf8ecd91416eee176c216 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 18 Jun 2026 14:48:08 +0200 Subject: [PATCH] support/testing: test_lsof.py: use assertRunNotOk() Use the helper to simplify the test. Signed-off-by: Peter Korsgaard --- support/testing/tests/package/test_lsof.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/support/testing/tests/package/test_lsof.py b/support/testing/tests/package/test_lsof.py index b0478dfbb7..336a951549 100644 --- a/support/testing/tests/package/test_lsof.py +++ b/support/testing/tests/package/test_lsof.py @@ -28,8 +28,7 @@ class TestLsof(infra.basetest.BRTest): self.assertRunOk("lsof") # Check lsof fails if requested file is not opened - _, exit_code = self.emulator.run("lsof {}".format(test_file)) - self.assertNotEqual(exit_code, 0) + self.assertRunNotOk("lsof {}".format(test_file)) # Open the test file from the shell on descriptor 10 self.assertRunOk("exec 10> {}".format(test_file))