summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/274
diff options
context:
space:
mode:
authorJohn Snow2022-03-21 21:16:16 +0100
committerHanna Reitz2022-03-22 10:14:41 +0100
commit3c8b7358d6b5b887473b17b8528e042f9581e7b4 (patch)
tree6d37f3ece98e911ecaf3cfcca50da24526dc43b5 /tests/qemu-iotests/274
parentiotests: use qemu_img() in has_working_luks() (diff)
downloadqemu-3c8b7358d6b5b887473b17b8528e042f9581e7b4.tar.gz
qemu-3c8b7358d6b5b887473b17b8528e042f9581e7b4.tar.xz
qemu-3c8b7358d6b5b887473b17b8528e042f9581e7b4.zip
iotests: replace qemu_img_log('create', ...) calls
qemu_img_log() calls into qemu_img_pipe(), which always removes output for 'create' commands on success anyway. Replace all of these calls to the simpler qemu_img_create(...) which doesn't log, but raises a detailed exception object on failure instead. Blank lines are removed from output files where appropriate. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220321201618.903471-17-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/274')
-rwxr-xr-xtests/qemu-iotests/27417
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/qemu-iotests/274 b/tests/qemu-iotests/274
index 080a90f10f..2495e051a2 100755
--- a/tests/qemu-iotests/274
+++ b/tests/qemu-iotests/274
@@ -31,12 +31,11 @@ size_long = 2 * 1024 * 1024
size_diff = size_long - size_short
def create_chain() -> None:
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, base,
- str(size_long))
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', base,
- '-F', iotests.imgfmt, mid, str(size_short))
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', mid,
- '-F', iotests.imgfmt, top, str(size_long))
+ iotests.qemu_img_create('-f', iotests.imgfmt, base, str(size_long))
+ iotests.qemu_img_create('-f', iotests.imgfmt, '-b', base,
+ '-F', iotests.imgfmt, mid, str(size_short))
+ iotests.qemu_img_create('-f', iotests.imgfmt, '-b', mid,
+ '-F', iotests.imgfmt, top, str(size_long))
iotests.qemu_io_log('-c', 'write -P 1 0 %d' % size_long, base)
@@ -160,9 +159,9 @@ with iotests.FilePath('base') as base, \
('off', '512k', '256k', '500k', '436k')]:
iotests.log('=== preallocation=%s ===' % prealloc)
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, base, base_size)
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', base,
- '-F', iotests.imgfmt, top, top_size_old)
+ iotests.qemu_img_create('-f', iotests.imgfmt, base, base_size)
+ iotests.qemu_img_create('-f', iotests.imgfmt, '-b', base,
+ '-F', iotests.imgfmt, top, top_size_old)
iotests.qemu_io_log('-c', 'write -P 1 %s 64k' % off, base)
# After this, top_size_old to base_size should be allocated/zeroed.