From e9039c045180c5929c1f440e8b0cb7c7ebfc3576 Mon Sep 17 00:00:00 2001 From: John Snow Date: Mon, 18 Apr 2022 17:14:55 -0400 Subject: iotests: Don't check qemu_io() output for specific error strings A forthcoming commit updates qemu_io() to raise an exception on non-zero return by default, and changes its return type. In preparation, simplify some calls to qemu_io() that assert that specific error message strings do not appear in qemu-io's output. Asserting that all of these calls return a status code of zero will be a more robust way to guard against failure. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Message-Id: <20220418211504.943969-4-jsnow@redhat.com> Signed-off-by: Hanna Reitz --- tests/qemu-iotests/056 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/qemu-iotests/056') diff --git a/tests/qemu-iotests/056 b/tests/qemu-iotests/056 index b459a3f..bef865e 100755 --- a/tests/qemu-iotests/056 +++ b/tests/qemu-iotests/056 @@ -102,7 +102,7 @@ class TestSyncModesNoneAndTop(iotests.QMPTestCase): self.vm.shutdown() time.sleep(1) - self.assertEqual(-1, qemu_io('-c', 'read -P0x41 0 512', target_img).find("verification failed")) + qemu_io('-c', 'read -P0x41 0 512', target_img) class TestBeforeWriteNotifier(iotests.QMPTestCase): def setUp(self): -- cgit v1.1