From c566e5c6453ef60c0f710080ecb157d7557e0575 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 18 Jun 2026 14:48:06 +0200 Subject: [PATCH] support/testing: test_kmod.py: use assertRunNotOk() Use the helper to simplify the test. Signed-off-by: Peter Korsgaard --- support/testing/tests/package/test_kmod.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/support/testing/tests/package/test_kmod.py b/support/testing/tests/package/test_kmod.py index 3c06589b2b..a88257ef57 100644 --- a/support/testing/tests/package/test_kmod.py +++ b/support/testing/tests/package/test_kmod.py @@ -73,8 +73,7 @@ class TestKmod(infra.basetest.BRTest): # With this test configuration, we are not supposed to have an # eth0 Ethernet interface yet. Attempting to show info on this # interface is expected to fail . - _, ret = self.emulator.run("ip link show dev eth0") - self.assertNotEqual(ret, 0) + self.assertRunNotOk("ip link show dev eth0") # We try to load the module. self.assertRunOk("modprobe virtio-net") @@ -101,5 +100,4 @@ class TestKmod(infra.basetest.BRTest): # Now the driver is unloaded, we should no longer be able to # ping the emulator. - _, ret = self.emulator.run(ping_cmd) - self.assertNotEqual(ret, 0) + self.assertRunNotOk(ping_cmd)