aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/085
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-11-07 17:37:02 +0100
committerMax Reitz <mreitz@redhat.com>2020-01-06 13:43:07 +0100
commitd88bef1921721c1723cb201bc1e5ccd6a855258c (patch)
tree72a9b5426c8d9d84060dd9742a2af709191742ce /tests/qemu-iotests/085
parentf91ecbd74eb75e9d4c7b4016edaf69d070cb3f9b (diff)
iotests: Avoid cp/mv of test images
This will not work with external data files, so try to get tests working without it as far as possible. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-17-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/085')
-rwxr-xr-xtests/qemu-iotests/0859
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085
index bbea1252d2..46981dbb64 100755
--- a/tests/qemu-iotests/085
+++ b/tests/qemu-iotests/085
@@ -105,8 +105,7 @@ add_snapshot_image()
{
base_image="${TEST_DIR}/$((${1}-1))-${snapshot_virt0}"
snapshot_file="${TEST_DIR}/${1}-${snapshot_virt0}"
- _make_test_img -u -b "${base_image}" "$size"
- mv "${TEST_IMG}" "${snapshot_file}"
+ TEST_IMG=$snapshot_file _make_test_img -u -b "${base_image}" "$size"
do_blockdev_add "$1" "'backing': null, " "${snapshot_file}"
}
@@ -122,10 +121,8 @@ blockdev_snapshot()
size=128M
-_make_test_img $size
-mv "${TEST_IMG}" "${TEST_IMG}.1"
-_make_test_img $size
-mv "${TEST_IMG}" "${TEST_IMG}.2"
+TEST_IMG="$TEST_IMG.1" _make_test_img $size
+TEST_IMG="$TEST_IMG.2" _make_test_img $size
echo
echo === Running QEMU ===