aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/242
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2022-03-21 16:16:18 -0400
committerHanna Reitz <hreitz@redhat.com>2022-03-22 10:39:36 +0100
commit8f685ac391047a8c253c94b165c3e9b8f184cff2 (patch)
tree165d52e071519127a7088d94c495661a22c2088e /tests/qemu-iotests/242
parentf400e14da0d4d2d4247df37d01604afcf3612447 (diff)
downloadqemu-8f685ac391047a8c253c94b165c3e9b8f184cff2.zip
qemu-8f685ac391047a8c253c94b165c3e9b8f184cff2.tar.gz
qemu-8f685ac391047a8c253c94b165c3e9b8f184cff2.tar.bz2
iotests: make qemu_img_log and img_info_log raise on error
Add a `check: bool = True` parameter to both functions and make their qemu_img() invocations raise on error by default. users of img_info_log: 206, 207, 210, 211, 212, 213, 237, 242, 266, 274, 302 users of qemu_img_log: 044, 209, 274, 302, 304 iotests 242 and 266 need to use check=False for their negative tests. iotests 206, 210, 211, 212, 213, 237, 274 and 302 continue working normally. As of this commit, all calls to QEMU_IMG made from iotests enforce a return code of zero by default unless explicitly disabled or suppressed by passing check=False or with an exception handler. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20220321201618.903471-19-jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/242')
-rwxr-xr-xtests/qemu-iotests/2422
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242
index 547bf38..b3afd36 100755
--- a/tests/qemu-iotests/242
+++ b/tests/qemu-iotests/242
@@ -100,7 +100,7 @@ add_bitmap(1, True, False)
log('Write an unknown bitmap flag \'{}\' into a new QCOW2 image at offset {}'
.format(hex(bitmap_flag_unknown), flag_offset))
toggle_flag(flag_offset)
-img_info_log(disk)
+img_info_log(disk, check=False)
toggle_flag(flag_offset)
log('Unset the unknown bitmap flag \'{}\' in the bitmap directory entry:\n'
.format(hex(bitmap_flag_unknown)))