From df353e4d2a5b3d5b995a560da09b809b1e99af9d Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 18 Jun 2026 14:48:00 +0200 Subject: [PATCH] support/testing: test_dos2unix.py: use assertRunNotOk() Use the helper to simplify the test. Signed-off-by: Peter Korsgaard (cherry picked from commit 0b1ea65f3a0eb433a70a9814eedd86d73650cf1a) Signed-off-by: Thomas Perale --- support/testing/tests/package/test_dos2unix.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/support/testing/tests/package/test_dos2unix.py b/support/testing/tests/package/test_dos2unix.py index af5850ae3e..1c0ecf5967 100644 --- a/support/testing/tests/package/test_dos2unix.py +++ b/support/testing/tests/package/test_dos2unix.py @@ -32,8 +32,7 @@ class TestDos2Unix(infra.basetest.BRTest): self.assertRunOk("unix2dos -n original.txt dos.txt") # DOS file is expected to be different than the UNIX file - _, exit_code = self.emulator.run("cmp original.txt dos.txt") - self.assertNotEqual(exit_code, 0) + self.assertRunNotOk("cmp original.txt dos.txt") # The "cat -A" command should print '^M$' for CR-LF self.assertRunOk("cat -A dos.txt | grep -Fq '^M$'")