iotests: Remove explicit checks for qemu_img() == 0

qemu_img() returning zero ought to be the rule, not the
exception. Remove all explicit checks against the condition in
preparation for making non-zero returns an Exception.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-4-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
John Snow 2022-03-21 16:16:03 -04:00 committed by Hanna Reitz
parent 062fd1dad2
commit fc272d3ce0
15 changed files with 45 additions and 56 deletions

View file

@ -240,8 +240,7 @@ def compare_images(image, reference, baseimg=None, expected_match=True):
"""
expected_ret = 0 if expected_match else 1
if baseimg:
assert qemu_img("rebase", "-u", "-b", baseimg, '-F', iotests.imgfmt,
image) == 0
qemu_img("rebase", "-u", "-b", baseimg, '-F', iotests.imgfmt, image)
ret = qemu_img("compare", image, reference)
log('qemu_img compare "{:s}" "{:s}" ==> {:s}, {:s}'.format(
image, reference,