support/testing: test_ddrescue.py: use assertRunNotOk()
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/170f87572f26fd363a06401ee897b8cbab20f786
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/2026.05.x
Use the helper to simplify the test.
Signed-off-by Peter Korsgaard <[email protected]>
(cherry picked from commit d7284778a130e123cc9c1a3705b5da0a2f9a767d)
Signed-off-by Thomas Perale <[email protected]>
--- support/testing/tests/package/test_ddrescue.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
support/testing/tests/package/test_ddrescue.py +1 -2
@@ -70,8 +70,7 @@ class TestDdrescue(infra.basetest.BRTest): # A normal 'dd' is expected to fail with I/O error cmd = f"dd if={dm_dev} of=/dev/null bs=512" - _, exit_code = self.emulator.run(cmd) - self.assertNotEqual(exit_code, 0) + self.assertRunNotOk(cmd) # Where a normal 'dd' fails, 'ddrescue' is expected to succeed self.assertRunOk(f"ddrescue {dm_dev} {ddrescue_img}")
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot