[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/18] iotests: Avoid renaming images
From: |
Max Reitz |
Subject: |
[PATCH 11/18] iotests: Avoid renaming images |
Date: |
Thu, 19 Dec 2019 15:38:11 +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 013 and 046 follow suit.
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/013 | 4 +++-
tests/qemu-iotests/013.out | 2 +-
tests/qemu-iotests/046 | 5 +++--
tests/qemu-iotests/046.out | 2 +-
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
index b977290480..a2c748c55e 100755
--- a/tests/qemu-iotests/013
+++ b/tests/qemu-iotests/013
@@ -46,6 +46,8 @@ TEST_OFFSETS="0 4294967296"
TEST_OPS="writev read write readv"
CLUSTER_SIZE=4096
+TEST_IMG_SAVE=$TEST_IMG
+TEST_IMG="$TEST_IMG.orig"
_make_test_img 6G
echo "Testing empty image"
@@ -63,7 +65,7 @@ done
echo "Compressing image"
echo
-mv "$TEST_IMG" "$TEST_IMG.orig"
+TEST_IMG=$TEST_IMG_SAVE
_make_test_img 6G
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c -n "$TEST_IMG.orig" "$TEST_IMG"
diff --git a/tests/qemu-iotests/013.out b/tests/qemu-iotests/013.out
index 07323a742b..23e3160b49 100644
--- a/tests/qemu-iotests/013.out
+++ b/tests/qemu-iotests/013.out
@@ -1,5 +1,5 @@
QA output created by 013
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944
+Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944
Testing empty image
At offset 0:
diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index a066eec605..1dca1f4f30 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -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" 6G
echo
diff --git a/tests/qemu-iotests/046.out b/tests/qemu-iotests/046.out
index ca2c7404a9..15d9ebd232 100644
--- a/tests/qemu-iotests/046.out
+++ b/tests/qemu-iotests/046.out
@@ -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
--
2.23.0
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, (continued)
- [PATCH 03/18] fuse: Implement standard FUSE operations, Max Reitz, 2019/12/19
- [PATCH 04/18] fuse: Add fuse-export-remove, Max Reitz, 2019/12/19
- [PATCH 05/18] fuse: Allow growable exports, Max Reitz, 2019/12/19
- [PATCH 06/18] fuse: (Partially) implement fallocate(), Max Reitz, 2019/12/19
- [PATCH 07/18] fuse: Implement hole detection through lseek, Max Reitz, 2019/12/19
- [PATCH 08/18] iotests: Do not needlessly filter _make_test_img, Max Reitz, 2019/12/19
- [PATCH 09/18] iotests: Do not pipe _make_test_img, Max Reitz, 2019/12/19
- [PATCH 10/18] iotests: Use convert -n in some cases, Max Reitz, 2019/12/19
- [PATCH 11/18] iotests: Avoid renaming images,
Max Reitz <=
- [PATCH 12/18] iotests: Derive image names from $TEST_IMG, Max Reitz, 2019/12/19
- [PATCH 13/18] iotests/091: Use _cleanup_qemu instad of "wait", Max Reitz, 2019/12/19
- [PATCH 14/18] iotests: Restrict some Python tests to file, Max Reitz, 2019/12/19
- [PATCH 15/18] iotests: Let _make_test_img guess $TEST_IMG_FILE, Max Reitz, 2019/12/19
- [PATCH 16/18] iotests: Allow testing FUSE exports, Max Reitz, 2019/12/19
- [PATCH 17/18] iotests: Enable fuse for many tests, Max Reitz, 2019/12/19
- [PATCH 18/18] iotests/281: Add test for FUSE exports, Max Reitz, 2019/12/19
- Re: [PATCH 00/18] block: Allow exporting BDSs via FUSE, Max Reitz, 2019/12/19
- Re: [PATCH 00/18] block: Allow exporting BDSs via FUSE, Stefan Hajnoczi, 2019/12/20