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 <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220418211504.943969-4-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
John Snow 2022-04-18 17:14:55 -04:00 committed by Hanna Reitz
parent a190524967
commit e9039c0451
2 changed files with 17 additions and 18 deletions

View file

@ -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):