* [Qemu-devel] [PATCH v2 01/11] iotests: 018: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 02/11] iotests: 019: " Fam Zheng
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/018 | 8 ++++----
tests/qemu-iotests/018.out | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018
index d8a7d43..07b2de9 100755
--- a/tests/qemu-iotests/018
+++ b/tests/qemu-iotests/018
@@ -66,8 +66,8 @@ _check_test_img
echo "Creating test image with backing file"
echo
-TEST_IMG=$TEST_IMG_SAVE
-_make_test_img -b "$TEST_IMG.base" 6G
+TEST_IMG="$TEST_IMG_SAVE.orig"
+_make_test_img -b "$TEST_IMG_SAVE.base" 6G
echo "Filling test image"
echo
@@ -81,8 +81,8 @@ for offset in $TEST_OFFSETS; do
done
_check_test_img
-mv "$TEST_IMG" "$TEST_IMG.orig"
-$QEMU_IMG convert -O $IMGFMT "$TEST_IMG.orig" "$TEST_IMG"
+TEST_IMG="$TEST_IMG_SAVE"
+$QEMU_IMG convert -f $IMGFMT -O $IMGFMT "$TEST_IMG.orig" "$TEST_IMG"
echo "Reading"
echo
diff --git a/tests/qemu-iotests/018.out b/tests/qemu-iotests/018.out
index d66bd63..5df9667 100644
--- a/tests/qemu-iotests/018.out
+++ b/tests/qemu-iotests/018.out
@@ -269,7 +269,7 @@ wrote 65536/65536 bytes at offset 4295032832
No errors were found on the image.
Creating test image with backing file
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 backing_file=TEST_DIR/t.IMGFMT.base
+Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 backing_file=TEST_DIR/t.IMGFMT.base
Filling test image
=== IO: pattern 1
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 02/11] iotests: 019: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 01/11] iotests: 018: Use TEST_IMG override instead of "mv" Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 03/11] iotests: 020: " Fam Zheng
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/019 | 13 +++++++------
tests/qemu-iotests/019.out | 4 ++--
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019
index f5ecbf5..0937b5c 100755
--- a/tests/qemu-iotests/019
+++ b/tests/qemu-iotests/019
@@ -54,6 +54,9 @@ _unsupported_imgopts "subformat=monolithicFlat" \
TEST_OFFSETS="0 4294967296"
CLUSTER_SIZE=65536
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
+
_make_test_img 6G
echo "Filling base image"
@@ -71,8 +74,8 @@ _check_test_img
echo "Creating test image with backing file"
echo
-mv "$TEST_IMG" "$TEST_IMG.base"
-_make_test_img -b "$TEST_IMG.base" 6G
+TEST_IMG="$TEST_IMG_SAVE.orig"
+_make_test_img -b "$TEST_IMG_SAVE.base" 6G
echo "Filling test image"
echo
@@ -86,9 +89,7 @@ for offset in $TEST_OFFSETS; do
done
_check_test_img
-mv "$TEST_IMG" "$TEST_IMG.orig"
-
-
+TEST_IMG="$TEST_IMG_SAVE"
# Test the conversion twice: One test with the old-style -B option and another
# one with -o backing_file
@@ -98,7 +99,7 @@ for backing_option in "-B " "-o backing_file="; do
echo
echo Testing conversion with $backing_option"$TEST_IMG.base" | _filter_testdir | _filter_imgfmt
echo
- $QEMU_IMG convert -O $IMGFMT $backing_option"$TEST_IMG.base" "$TEST_IMG.orig" "$TEST_IMG"
+ $QEMU_IMG convert -f $IMGFMT -O $IMGFMT $backing_option"$TEST_IMG.base" "$TEST_IMG.orig" "$TEST_IMG"
echo "Checking if backing clusters are allocated when they shouldn't"
echo
diff --git a/tests/qemu-iotests/019.out b/tests/qemu-iotests/019.out
index 615450a..0124264 100644
--- a/tests/qemu-iotests/019.out
+++ b/tests/qemu-iotests/019.out
@@ -1,5 +1,5 @@
QA output created by 019
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944
Filling base image
=== IO: pattern 42
@@ -269,7 +269,7 @@ wrote 65536/65536 bytes at offset 4296015872
No errors were found on the image.
Creating test image with backing file
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 backing_file=TEST_DIR/t.IMGFMT.base
+Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 backing_file=TEST_DIR/t.IMGFMT.base
Filling test image
=== IO: pattern 43
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 03/11] iotests: 020: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 01/11] iotests: 018: Use TEST_IMG override instead of "mv" Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 02/11] iotests: 019: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 04/11] iotests: 024: " Fam Zheng
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/020 | 7 +++++--
tests/qemu-iotests/020.out | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020
index 2f258dc..6625b55 100755
--- a/tests/qemu-iotests/020
+++ b/tests/qemu-iotests/020
@@ -56,6 +56,9 @@ fi
TEST_OFFSETS="0 4294967296"
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
+
_make_test_img 6G
echo "Filling base image"
@@ -73,7 +76,7 @@ _check_test_img
echo "Creating test image with backing file"
echo
-mv "$TEST_IMG" "$TEST_IMG.base"
+TEST_IMG="$TEST_IMG_SAVE"
_make_test_img -b "$TEST_IMG.base" 6G
echo "Filling test image"
@@ -89,7 +92,7 @@ done
_check_test_img
$QEMU_IMG commit "$TEST_IMG"
-mv "$TEST_IMG.base" "$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
echo "Reading from the backing file"
echo
diff --git a/tests/qemu-iotests/020.out b/tests/qemu-iotests/020.out
index 134aa29..42f6c1b 100644
--- a/tests/qemu-iotests/020.out
+++ b/tests/qemu-iotests/020.out
@@ -1,5 +1,5 @@
QA output created by 020
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944
Filling base image
=== IO: pattern 0
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 04/11] iotests: 024: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (2 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 03/11] iotests: 020: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 05/11] iotests: 028: " Fam Zheng
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/024 | 10 ++++++++--
tests/qemu-iotests/024.out | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024
index 9bf99e1..2c2d148 100755
--- a/tests/qemu-iotests/024
+++ b/tests/qemu-iotests/024
@@ -60,16 +60,22 @@ CLUSTER_SIZE=65536
echo "Creating backing file"
echo
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base_old"
+
_make_test_img 1G
io_pattern writev 0 $CLUSTER_SIZE $((2 * CLUSTER_SIZE)) 8 0x11
-mv "$TEST_IMG" "$TEST_IMG.base_old"
+
+TEST_IMG="$TEST_IMG_SAVE.base_new"
echo "Creating new backing file"
echo
_make_test_img 1G
io_pattern writev 0 $((2 * CLUSTER_SIZE)) $((4 * CLUSTER_SIZE)) 4 0x22
-mv "$TEST_IMG" "$TEST_IMG.base_new"
+
+
+TEST_IMG="$TEST_IMG_SAVE"
echo "Creating COW image"
echo
diff --git a/tests/qemu-iotests/024.out b/tests/qemu-iotests/024.out
index 9b9ef3a..33cfaf5 100644
--- a/tests/qemu-iotests/024.out
+++ b/tests/qemu-iotests/024.out
@@ -1,7 +1,7 @@
QA output created by 024
Creating backing file
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
+Formatting 'TEST_DIR/t.IMGFMT.base_old', fmt=IMGFMT size=1073741824
=== IO: pattern 0x11
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -21,7 +21,7 @@ wrote 65536/65536 bytes at offset 917504
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Creating new backing file
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
+Formatting 'TEST_DIR/t.IMGFMT.base_new', fmt=IMGFMT size=1073741824
=== IO: pattern 0x22
wrote 131072/131072 bytes at offset 0
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 05/11] iotests: 028: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (3 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 04/11] iotests: 024: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 06/11] iotests: 034: " Fam Zheng
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/028 | 5 ++++-
tests/qemu-iotests/028.out | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028
index a1f4423..009510d 100755
--- a/tests/qemu-iotests/028
+++ b/tests/qemu-iotests/028
@@ -60,6 +60,9 @@ base_size=$(( image_size - 1024 * 1024 * 1024 ))
offset=$(( base_size - 32 * 1024 ))
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
+
_make_test_img $base_size
echo "Filling base image"
@@ -73,7 +76,7 @@ _check_test_img
echo "Creating test image with backing file"
echo
-mv "$TEST_IMG" "$TEST_IMG.base"
+TEST_IMG="$TEST_IMG_SAVE"
_make_test_img -b "$TEST_IMG.base" $image_size
echo "Filling test image"
diff --git a/tests/qemu-iotests/028.out b/tests/qemu-iotests/028.out
index 29c9972..279029d 100644
--- a/tests/qemu-iotests/028.out
+++ b/tests/qemu-iotests/028.out
@@ -1,5 +1,5 @@
QA output created by 028
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=3221227008
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=3221227008
Filling base image
=== IO: pattern 195
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 06/11] iotests: 034: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (4 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 05/11] iotests: 028: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 07/11] iotests: 037: " Fam Zheng
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/034 | 6 +++++-
tests/qemu-iotests/034.out | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/034 b/tests/qemu-iotests/034
index 69c7858..c769dd8 100755
--- a/tests/qemu-iotests/034
+++ b/tests/qemu-iotests/034
@@ -51,9 +51,13 @@ size=128M
echo
echo "== creating backing file for COW tests =="
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
+
_make_test_img $size
$QEMU_IO -c "write -P 0x55 0 1M" "$TEST_IMG" | _filter_qemu_io
-mv "$TEST_IMG" "$TEST_IMG.base"
+
+TEST_IMG="$TEST_IMG_SAVE"
_make_test_img -b "$TEST_IMG.base" 6G
diff --git a/tests/qemu-iotests/034.out b/tests/qemu-iotests/034.out
index 34fda80..0764ead 100644
--- a/tests/qemu-iotests/034.out
+++ b/tests/qemu-iotests/034.out
@@ -1,7 +1,7 @@
QA output created by 034
== 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 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 backing_file=TEST_DIR/t.IMGFMT.base
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 07/11] iotests: 037: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (5 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 06/11] iotests: 034: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 08/11] iotests: 038: " Fam Zheng
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/037 | 5 ++++-
tests/qemu-iotests/037.out | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037
index 9171d8c..5862451 100755
--- a/tests/qemu-iotests/037
+++ b/tests/qemu-iotests/037
@@ -51,6 +51,9 @@ size=128M
echo
echo "== creating backing file for COW tests =="
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
+
_make_test_img $size
function backing_io()
@@ -71,7 +74,7 @@ function backing_io()
backing_io 0 256 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
diff --git a/tests/qemu-iotests/037.out b/tests/qemu-iotests/037.out
index 55b30fd..cd6710c 100644
--- a/tests/qemu-iotests/037.out
+++ b/tests/qemu-iotests/037.out
@@ -1,7 +1,7 @@
QA output created by 037
== 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 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 512/512 bytes at offset 512
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 08/11] iotests: 038: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (6 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 07/11] iotests: 037: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 09/11] iotests: 050: " Fam Zheng
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/038 | 5 ++++-
tests/qemu-iotests/038.out | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038
index cfaf00a..34fe698 100755
--- a/tests/qemu-iotests/038
+++ b/tests/qemu-iotests/038
@@ -48,6 +48,9 @@ size=128M
echo
echo "== creating backing file for COW tests =="
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
+
_make_test_img $size
function backing_io()
@@ -68,7 +71,7 @@ function backing_io()
backing_io 0 256 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
diff --git a/tests/qemu-iotests/038.out b/tests/qemu-iotests/038.out
index ecb656e..0bdfb19 100644
--- a/tests/qemu-iotests/038.out
+++ b/tests/qemu-iotests/038.out
@@ -1,7 +1,7 @@
QA output created by 038
== 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.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 09/11] iotests: 050: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (7 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 08/11] iotests: 038: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 10/11] iotests: 095: " Fam Zheng
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/050 | 9 +++++++--
tests/qemu-iotests/050.out | 4 ++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/050 b/tests/qemu-iotests/050
index 07802bc..13006dd 100755
--- a/tests/qemu-iotests/050
+++ b/tests/qemu-iotests/050
@@ -51,14 +51,19 @@ fi
echo
echo "== Creating images =="
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.old"
+
size=10M
_make_test_img $size
$QEMU_IO -c "write -P 0x40 0 1048576" "$TEST_IMG" | _filter_qemu_io
-mv "$TEST_IMG" "$TEST_IMG.old"
+
+TEST_IMG="$TEST_IMG_SAVE.new"
_make_test_img $size
$QEMU_IO -c "write -P 0x5a 0 1048576" "$TEST_IMG" | _filter_qemu_io
-mv "$TEST_IMG" "$TEST_IMG.new"
+
+TEST_IMG="$TEST_IMG_SAVE"
_make_test_img -b "$TEST_IMG.old" $size
$QEMU_IO -c "write -z 0 1048576" "$TEST_IMG" | _filter_qemu_io
diff --git a/tests/qemu-iotests/050.out b/tests/qemu-iotests/050.out
index 397cf7f..3602d58 100644
--- a/tests/qemu-iotests/050.out
+++ b/tests/qemu-iotests/050.out
@@ -1,10 +1,10 @@
QA output created by 050
== Creating images ==
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=10485760
+Formatting 'TEST_DIR/t.IMGFMT.old', fmt=IMGFMT size=10485760
wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=10485760
+Formatting 'TEST_DIR/t.IMGFMT.new', fmt=IMGFMT size=10485760
wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=10485760 backing_file=TEST_DIR/t.IMGFMT.old
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 10/11] iotests: 095: Use TEST_IMG override instead of "mv"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (8 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 09/11] iotests: 050: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 11/11] iotests: 095: Filter _img_info output Fam Zheng
2015-12-23 23:38 ` [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Max Reitz
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/095 | 6 ++----
tests/qemu-iotests/095.out | 4 ++--
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095
index 6630181..57a730e 100755
--- a/tests/qemu-iotests/095
+++ b/tests/qemu-iotests/095
@@ -50,11 +50,9 @@ _supported_os Linux
size_smaller=5M
size_larger=100M
-_make_test_img $size_smaller
-mv "${TEST_IMG}" "${TEST_IMG}.base"
+TEST_IMG="$TEST_IMG.base" _make_test_img $size_smaller
-_make_test_img -b "${TEST_IMG}.base" $size_larger
-mv "${TEST_IMG}" "${TEST_IMG}.snp1"
+TEST_IMG="$TEST_IMG.snp1" _make_test_img -b "$TEST_IMG.base" $size_larger
_make_test_img -b "${TEST_IMG}.snp1" $size_larger
diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out
index 2360061..61a2057 100644
--- a/tests/qemu-iotests/095.out
+++ b/tests/qemu-iotests/095.out
@@ -1,6 +1,6 @@
QA output created by 095
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=5242880
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=104857600 backing_file=TEST_DIR/t.IMGFMT.base
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=5242880
+Formatting 'TEST_DIR/t.IMGFMT.snp1', fmt=IMGFMT size=104857600 backing_file=TEST_DIR/t.IMGFMT.base
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=104857600 backing_file=TEST_DIR/t.IMGFMT.snp1
=== Base image info before commit and resize ===
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 11/11] iotests: 095: Filter _img_info output
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (9 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 10/11] iotests: 095: " Fam Zheng
@ 2015-12-22 2:49 ` Fam Zheng
2015-12-23 23:38 ` [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Max Reitz
11 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2015-12-22 2:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/095 | 4 ++--
tests/qemu-iotests/095.out | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095
index 57a730e..dad04b9 100755
--- a/tests/qemu-iotests/095
+++ b/tests/qemu-iotests/095
@@ -58,7 +58,7 @@ _make_test_img -b "${TEST_IMG}.snp1" $size_larger
echo
echo "=== Base image info before commit and resize ==="
-TEST_IMG="${TEST_IMG}.base" _img_info
+TEST_IMG="${TEST_IMG}.base" _img_info | _filter_img_info
echo
echo === Running QEMU Live Commit Test ===
@@ -76,7 +76,7 @@ _send_qemu_cmd $h "{ 'execute': 'block-commit',
echo
echo "=== Base image info after commit and resize ==="
-TEST_IMG="${TEST_IMG}.base" _img_info
+TEST_IMG="${TEST_IMG}.base" _img_info | _filter_img_info
# success, all done
echo "*** done"
diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out
index 61a2057..73875ca 100644
--- a/tests/qemu-iotests/095.out
+++ b/tests/qemu-iotests/095.out
@@ -7,7 +7,6 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=104857600 backing_file=TEST_DIR/
image: TEST_DIR/t.IMGFMT.base
file format: IMGFMT
virtual size: 5.0M (5242880 bytes)
-cluster_size: 65536
=== Running QEMU Live Commit Test ===
@@ -19,5 +18,4 @@ cluster_size: 65536
image: TEST_DIR/t.IMGFMT.base
file format: IMGFMT
virtual size: 100M (104857600 bytes)
-cluster_size: 65536
*** done
--
2.4.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX"
2015-12-22 2:49 [Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (10 preceding siblings ...)
2015-12-22 2:49 ` [Qemu-devel] [PATCH v2 11/11] iotests: 095: Filter _img_info output Fam Zheng
@ 2015-12-23 23:38 ` Max Reitz
11 siblings, 0 replies; 13+ messages in thread
From: Max Reitz @ 2015-12-23 23:38 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, qemu-block
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
On 22.12.2015 03:49, Fam Zheng wrote:
> v2: Add Max's rev-by in patches 1-9.
> Fix quote bugs in patch 10 and split out _img_info filtering patch 11.
>
> Commit 794d00f71d fixed two "mv" commands into the TEST_IMG override approach.
> There are still more occasions of "mv", this series fixes them.
>
> The benefit is it drops the assumption that the created image is a single file,
> which is not true for VMDK or the coming QBM format. On top of this, those
> formats can be added to these cases later.
>
> The patches stems from QBM work, but I will also take a look at adding
> applicable VMDK subformats once merged.
>
> Please review.
>
> Fam
Thanks, applied to my block tree:
https://github.com/XanClic/qemu/commits/block
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread