diff options
author | Max Reitz | 2020-10-27 20:05:49 +0100 |
---|---|---|
committer | Kevin Wolf | 2020-12-11 17:52:40 +0100 |
commit | 620a628db02a3649705a975df8c00a4c6563788a (patch) | |
tree | 28b5a7f986b83993dda441a1bb747de14b6e43e6 /tests/qemu-iotests/028 | |
parent | iotests: Do not pipe _make_test_img (diff) | |
download | qemu-620a628db02a3649705a975df8c00a4c6563788a.tar.gz qemu-620a628db02a3649705a975df8c00a4c6563788a.tar.xz qemu-620a628db02a3649705a975df8c00a4c6563788a.zip |
iotests: Use convert -n in some cases
qemu-img convert (without -n) can often be replaced by a combination of
_make_test_img + qemu-img convert -n. Doing so allows converting to
protocols that do not allow direct file creation, such as FUSE exports.
The only problem is that for formats other than qcow2 and qed (qcow1 at
least), this may lead to high disk usage for some reason, so we cannot
do it everywhere.
But we can do it in 028 and 089, so let us do that so they can run on
FUSE exports. Also, in 028 this allows us to remove a 9-line comment
that used to explain why we cannot safely filter drive-backup's image
creation output.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201027190600.192171-10-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/028')
-rwxr-xr-x | tests/qemu-iotests/028 | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028 index 6dd3ae09a3..864dc4a4e2 100755 --- a/tests/qemu-iotests/028 +++ b/tests/qemu-iotests/028 @@ -116,16 +116,10 @@ else QEMU_COMM_TIMEOUT=1 fi -# Silence output since it contains the disk image path and QEMU's readline -# character echoing makes it very hard to filter the output. Plus, there -# is no telling how many times the command will repeat before succeeding. -# (Note that creating the image results in a "Formatting..." message over -# stdout, which is the same channel the monitor uses. We cannot reliably -# wait for it because the monitor output may interact with it in such a -# way that _timed_wait_for cannot read it. However, once the block job is -# done, we know that the "Formatting..." message must have appeared -# already, so the output is still deterministic.) -silent=y _send_qemu_cmd $h "drive_backup disk ${TEST_IMG}.copy" "(qemu)" +TEST_IMG="$TEST_IMG.copy" _make_test_img $image_size +_send_qemu_cmd $h "drive_backup -n disk ${TEST_IMG}.copy" "(qemu)" \ + | _filter_imgfmt + silent=y qemu_cmd_repeat=20 _send_qemu_cmd $h "info block-jobs" "No active jobs" _send_qemu_cmd $h "info block-jobs" "No active jobs" _send_qemu_cmd $h 'quit' "" |