]> git.proxmox.com Git - mirror_qemu.git/commitdiff
iotests/046: Avoid renaming images
authorMax Reitz <mreitz@redhat.com>
Tue, 27 Oct 2020 19:05:50 +0000 (20:05 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 11 Dec 2020 16:52:40 +0000 (17:52 +0100)
This generally does not work on non-file protocols.  It is better to
create the image with the final name from the start, and most tests do
this already.  Let 046 follow suit.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201027190600.192171-11-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/046
tests/qemu-iotests/046.out

index 88b3363c196d241a195aa4eeef448b2321c0c6a7..40a9f300870981fa17c88bb715a18e8acad49efc 100755 (executable)
@@ -47,6 +47,8 @@ size=128M
 echo
 echo "== creating backing file for COW tests =="
 
+TEST_IMG_SAVE=$TEST_IMG
+TEST_IMG="$TEST_IMG.base"
 _make_test_img $size
 
 backing_io()
@@ -67,8 +69,7 @@ backing_io()
 
 backing_io 0 32 write | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
 
-mv "$TEST_IMG" "$TEST_IMG.base"
-
+TEST_IMG=$TEST_IMG_SAVE
 _make_test_img -b "$TEST_IMG.base" -F $IMGFMT 6G
 
 echo
index b022bcddd502fa1ccadf6b5b72246fde4bd3f386..66ad987ab35bdb5ea3de366fb0ad50c26a5d640f 100644 (file)
@@ -1,7 +1,7 @@
 QA output created by 046
 
 == creating backing file for COW tests ==
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728
 wrote 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 wrote 65536/65536 bytes at offset 65536