aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/310
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2022-03-21 16:16:03 -0400
committerHanna Reitz <hreitz@redhat.com>2022-03-22 10:14:25 +0100
commitfc272d3ce0094d2c2aff973662536d8d1a6943e5 (patch)
tree758859480247323e364c19ca151925a0cfdf0f77 /tests/qemu-iotests/310
parent062fd1dad2640d1c2522b71ddde4ba0bbdc8c6d9 (diff)
downloadqemu-fc272d3ce0094d2c2aff973662536d8d1a6943e5.zip
qemu-fc272d3ce0094d2c2aff973662536d8d1a6943e5.tar.gz
qemu-fc272d3ce0094d2c2aff973662536d8d1a6943e5.tar.bz2
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>
Diffstat (limited to 'tests/qemu-iotests/310')
-rwxr-xr-xtests/qemu-iotests/31013
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/qemu-iotests/310 b/tests/qemu-iotests/310
index 33c3411..e3bfedc 100755
--- a/tests/qemu-iotests/310
+++ b/tests/qemu-iotests/310
@@ -43,15 +43,15 @@ with iotests.FilePath('base.img') as base_img_path, \
log('--- Setting up images ---')
log('')
- assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') == 0
+ qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M')
assert qemu_io_silent(base_img_path, '-c', 'write -P 1 0M 1M') == 0
assert qemu_io_silent(base_img_path, '-c', 'write -P 1 3M 1M') == 0
- assert qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_path,
- '-F', iotests.imgfmt, mid_img_path) == 0
+ qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_path,
+ '-F', iotests.imgfmt, mid_img_path)
assert qemu_io_silent(mid_img_path, '-c', 'write -P 3 2M 1M') == 0
assert qemu_io_silent(mid_img_path, '-c', 'write -P 3 4M 1M') == 0
- assert qemu_img('create', '-f', iotests.imgfmt, '-b', mid_img_path,
- '-F', iotests.imgfmt, top_img_path) == 0
+ qemu_img('create', '-f', iotests.imgfmt, '-b', mid_img_path,
+ '-F', iotests.imgfmt, top_img_path)
assert qemu_io_silent(top_img_path, '-c', 'write -P 2 1M 1M') == 0
# 0 1 2 3 4
@@ -105,8 +105,7 @@ with iotests.FilePath('base.img') as base_img_path, \
log('')
# Detach backing to check that we can read the data from the top level now
- assert qemu_img('rebase', '-u', '-b', '', '-f', iotests.imgfmt,
- top_img_path) == 0
+ qemu_img('rebase', '-u', '-b', '', '-f', iotests.imgfmt, top_img_path)
assert qemu_io_silent(top_img_path, '-c', 'read -P 0 0 1M') == 0
assert qemu_io_silent(top_img_path, '-c', 'read -P 2 1M 1M') == 0