* [Qemu-devel] [PATCH 01/10] iotests: 018: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 02/10] iotests: 019: " Fam Zheng
` (9 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 02/10] iotests: 019: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 01/10] iotests: 018: Use TEST_IMG override instead of "mv" Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 03/10] iotests: 020: " Fam Zheng
` (8 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 03/10] iotests: 020: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 01/10] iotests: 018: Use TEST_IMG override instead of "mv" Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 02/10] iotests: 019: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 04/10] iotests: 024: " Fam Zheng
` (7 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 04/10] iotests: 024: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (2 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 03/10] iotests: 020: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 05/10] iotests: 028: " Fam Zheng
` (6 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 05/10] iotests: 028: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (3 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 04/10] iotests: 024: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 06/10] iotests: 034: " Fam Zheng
` (5 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 06/10] iotests: 034: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (4 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 05/10] iotests: 028: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 07/10] iotests: 037: " Fam Zheng
` (4 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 07/10] iotests: 037: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (5 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 06/10] iotests: 034: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 08/10] iotests: 038: " Fam Zheng
` (3 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 08/10] iotests: 038: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (6 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 07/10] iotests: 037: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 09/10] iotests: 050: " Fam Zheng
` (2 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 09/10] iotests: 050: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (7 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 08/10] iotests: 038: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-16 9:54 ` [Qemu-devel] [PATCH 10/10] iotests: 095: " Fam Zheng
2015-12-18 18:18 ` [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Max Reitz
10 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@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] 14+ messages in thread
* [Qemu-devel] [PATCH 10/10] iotests: 095: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (8 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 09/10] iotests: 050: " Fam Zheng
@ 2015-12-16 9:54 ` Fam Zheng
2015-12-18 18:18 ` Max Reitz
2015-12-18 18:18 ` [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Max Reitz
10 siblings, 1 reply; 14+ messages in thread
From: Fam Zheng @ 2015-12-16 9:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block, mreitz
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/095 | 12 ++++++------
tests/qemu-iotests/095.out | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095
index 6630181..cbe61bc 100755
--- a/tests/qemu-iotests/095
+++ b/tests/qemu-iotests/095
@@ -50,17 +50,16 @@ _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
echo
echo "=== Base image info before commit and resize ==="
-TEST_IMG="${TEST_IMG}.base" _img_info
+TEST_IMG="${TEST_IMG}.base" _img_info | \
+ sed -e 's/^cluster_size: .*$/cluster_size: XXX/'
echo
echo === Running QEMU Live Commit Test ===
@@ -78,7 +77,8 @@ _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 | \
+ sed -e 's/^cluster_size: .*$/cluster_size: XXX/'
# success, all done
echo "*** done"
diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out
index 2360061..b95111e 100644
--- a/tests/qemu-iotests/095.out
+++ b/tests/qemu-iotests/095.out
@@ -1,13 +1,13 @@
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 ===
image: TEST_DIR/t.IMGFMT.base
file format: IMGFMT
virtual size: 5.0M (5242880 bytes)
-cluster_size: 65536
+cluster_size: XXX
=== Running QEMU Live Commit Test ===
@@ -19,5 +19,5 @@ cluster_size: 65536
image: TEST_DIR/t.IMGFMT.base
file format: IMGFMT
virtual size: 100M (104857600 bytes)
-cluster_size: 65536
+cluster_size: XXX
*** done
--
2.4.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 10/10] iotests: 095: Use TEST_IMG override instead of "mv"
2015-12-16 9:54 ` [Qemu-devel] [PATCH 10/10] iotests: 095: " Fam Zheng
@ 2015-12-18 18:18 ` Max Reitz
2015-12-22 2:36 ` Fam Zheng
0 siblings, 1 reply; 14+ messages in thread
From: Max Reitz @ 2015-12-18 18:18 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block
[-- Attachment #1: Type: text/plain, Size: 2927 bytes --]
On 16.12.2015 10:54, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> tests/qemu-iotests/095 | 12 ++++++------
> tests/qemu-iotests/095.out | 8 ++++----
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095
> index 6630181..cbe61bc 100755
> --- a/tests/qemu-iotests/095
> +++ b/tests/qemu-iotests/095
> @@ -50,17 +50,16 @@ _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"
I think this should be:
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"
TEST_IMG="$TEST_IMG.snp1" _make_test_img -b "${TEST_IMG}.base" \
$size_larger
(Also, you could strip the {} because the inconsistent usage looks a bit
strange inside of a single line.)
>
> _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 | \
> + sed -e 's/^cluster_size: .*$/cluster_size: XXX/'
How about using _filter_img_info instead?
Max
> echo
> echo === Running QEMU Live Commit Test ===
> @@ -78,7 +77,8 @@ _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 | \
> + sed -e 's/^cluster_size: .*$/cluster_size: XXX/'
>
> # success, all done
> echo "*** done"
> diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out
> index 2360061..b95111e 100644
> --- a/tests/qemu-iotests/095.out
> +++ b/tests/qemu-iotests/095.out
> @@ -1,13 +1,13 @@
> 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 ===
> image: TEST_DIR/t.IMGFMT.base
> file format: IMGFMT
> virtual size: 5.0M (5242880 bytes)
> -cluster_size: 65536
> +cluster_size: XXX
>
> === Running QEMU Live Commit Test ===
>
> @@ -19,5 +19,5 @@ cluster_size: 65536
> image: TEST_DIR/t.IMGFMT.base
> file format: IMGFMT
> virtual size: 100M (104857600 bytes)
> -cluster_size: 65536
> +cluster_size: XXX
> *** done
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 10/10] iotests: 095: Use TEST_IMG override instead of "mv"
2015-12-18 18:18 ` Max Reitz
@ 2015-12-22 2:36 ` Fam Zheng
0 siblings, 0 replies; 14+ messages in thread
From: Fam Zheng @ 2015-12-22 2:36 UTC (permalink / raw)
To: Max Reitz; +Cc: Kevin Wolf, jcody, jsnow, qemu-devel, qemu-block
On Fri, 12/18 19:18, Max Reitz wrote:
> On 16.12.2015 10:54, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> > tests/qemu-iotests/095 | 12 ++++++------
> > tests/qemu-iotests/095.out | 8 ++++----
> > 2 files changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095
> > index 6630181..cbe61bc 100755
> > --- a/tests/qemu-iotests/095
> > +++ b/tests/qemu-iotests/095
> > @@ -50,17 +50,16 @@ _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"
>
> I think this should be:
>
> TEST_IMG="$TEST_IMG.base" _make_test_img $size_smaller
Yes, it's a regex search-replace error. Will fix.
>
> >
> > -_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"
>
> TEST_IMG="$TEST_IMG.snp1" _make_test_img -b "${TEST_IMG}.base" \
> $size_larger
>
> (Also, you could strip the {} because the inconsistent usage looks a bit
> strange inside of a single line.)
Okay.
>
> >
> > _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 | \
> > + sed -e 's/^cluster_size: .*$/cluster_size: XXX/'
>
> How about using _filter_img_info instead?
Will drop this change and do it in a separate patch.
Thanks!
Fam
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX"
2015-12-16 9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
` (9 preceding siblings ...)
2015-12-16 9:54 ` [Qemu-devel] [PATCH 10/10] iotests: 095: " Fam Zheng
@ 2015-12-18 18:18 ` Max Reitz
10 siblings, 0 replies; 14+ messages in thread
From: Max Reitz @ 2015-12-18 18:18 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, jcody, jsnow, qemu-block
[-- Attachment #1: Type: text/plain, Size: 2138 bytes --]
On 16.12.2015 10:54, Fam Zheng wrote:
> 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.
Patches 1 to 9:
Reviewed-by: Max Reitz <mreitz@redhat.com>
>
> Fam
>
>
> Fam Zheng (10):
> iotests: 018: Use TEST_IMG override instead of "mv"
> iotests: 019: Use TEST_IMG override instead of "mv"
> iotests: 020: Use TEST_IMG override instead of "mv"
> iotests: 024: Use TEST_IMG override instead of "mv"
> iotests: 028: Use TEST_IMG override instead of "mv"
> iotests: 034: Use TEST_IMG override instead of "mv"
> iotests: 037: Use TEST_IMG override instead of "mv"
> iotests: 038: Use TEST_IMG override instead of "mv"
> iotests: 050: Use TEST_IMG override instead of "mv"
> iotests: 095: Use TEST_IMG override instead of "mv"
>
> tests/qemu-iotests/018 | 8 ++++----
> tests/qemu-iotests/018.out | 2 +-
> tests/qemu-iotests/019 | 13 +++++++------
> tests/qemu-iotests/019.out | 4 ++--
> tests/qemu-iotests/020 | 7 +++++--
> tests/qemu-iotests/020.out | 2 +-
> tests/qemu-iotests/024 | 10 ++++++++--
> tests/qemu-iotests/024.out | 4 ++--
> tests/qemu-iotests/028 | 5 ++++-
> tests/qemu-iotests/028.out | 2 +-
> tests/qemu-iotests/034 | 6 +++++-
> tests/qemu-iotests/034.out | 2 +-
> tests/qemu-iotests/037 | 5 ++++-
> tests/qemu-iotests/037.out | 2 +-
> tests/qemu-iotests/038 | 5 ++++-
> tests/qemu-iotests/038.out | 2 +-
> tests/qemu-iotests/050 | 9 +++++++--
> tests/qemu-iotests/050.out | 4 ++--
> tests/qemu-iotests/095 | 12 ++++++------
> tests/qemu-iotests/095.out | 8 ++++----
> 20 files changed, 70 insertions(+), 42 deletions(-)
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread