support/testing: test_ddrescue.py: use assertRunNotOk()

Use the helper to simplify the test.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit d7284778a1)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Peter Korsgaard
2026-06-18 14:47:59 +02:00
committed by Thomas Perale
parent 1035f0dfad
commit 170f87572f

View File

@@ -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}")