[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv2 07/18] qemu-iotests: fix test 019 to work with any
From: |
Peter Lieven |
Subject: |
[Qemu-devel] [PATCHv2 07/18] qemu-iotests: fix test 019 to work with any protocol |
Date: |
Sun, 5 Jan 2014 18:21:57 +0100 |
Signed-off-by: Peter Lieven <address@hidden>
---
tests/qemu-iotests/019 | 30 ++++++++++++++----------------
tests/qemu-iotests/019.out | 4 ++--
2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019
index d75d125..5638611 100755
--- a/tests/qemu-iotests/019
+++ b/tests/qemu-iotests/019
@@ -32,9 +32,11 @@ status=1 # failure is the default!
_cleanup()
{
- _cleanup_test_img
- rm -f "$TEST_IMG.base"
- rm -f "$TEST_IMG.orig"
+ _cleanup_test_img
+ if [ "$IMGPROTO" = "file" ]; then
+ rm -f "$TEST_IMG.base"
+ rm -f "$TEST_IMG.orig"
+ fi
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -45,46 +47,42 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Any format supporting backing files
_supported_fmt qcow qcow2 vmdk qed
-_supported_proto file
+_supported_proto generic
_supported_os Linux
TEST_OFFSETS="0 4294967296"
CLUSTER_SIZE=65536
-_make_test_img 6G
+TEST_IMG=$TEST_IMG.base _make_test_img 6G
echo "Filling base image"
echo
for offset in $TEST_OFFSETS; do
# Some clusters with alternating backing file/image file reads
- io_pattern writev $(( offset )) 512 1024 64 42
+ TEST_IMG=$TEST_IMG.base io_pattern writev $(( offset )) 512 1024 64 42
# Complete backing clusters
- io_pattern writev $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE
1 42
+ TEST_IMG=$TEST_IMG.base io_pattern writev $(( offset + 1024 * 1024))
$CLUSTER_SIZE $CLUSTER_SIZE 1 42
done
-_check_test_img
+TEST_IMG=$TEST_IMG.base _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.orig _make_test_img -b "$TEST_IMG.base" 6G
echo "Filling test image"
echo
for offset in $TEST_OFFSETS; do
# Some clusters with alternating backing file/image file reads
- io_pattern writev $(( offset + 512 )) 512 1024 64 43
+ TEST_IMG=$TEST_IMG.orig io_pattern writev $(( offset + 512 )) 512 1024 64
43
# Complete test image clusters
- io_pattern writev $(( offset + 1024 * 1024 + $CLUSTER_SIZE))
$CLUSTER_SIZE $CLUSTER_SIZE 1 43
+ TEST_IMG=$TEST_IMG.orig io_pattern writev $(( offset + 1024 * 1024 +
$CLUSTER_SIZE)) $CLUSTER_SIZE $CLUSTER_SIZE 1 43
done
-_check_test_img
-
-mv "$TEST_IMG" "$TEST_IMG.orig"
-
+TEST_IMG=$TEST_IMG.orig _check_test_img
# Test the conversion twice: One test with the old-style -B option and another
diff --git a/tests/qemu-iotests/019.out b/tests/qemu-iotests/019.out
index f0c6e63..f2c3da3 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
--
1.7.9.5
- Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol, (continued)
[Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 10/18] qemu-iotests: fix test 028 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 09/18] qemu-iotests: fix test 024 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 11/18] qemu-iotests: fix test 034 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 13/18] qemu-iotests: fix test 038 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 07/18] qemu-iotests: fix test 019 to work with any protocol,
Peter Lieven <=
[Qemu-devel] [PATCHv2 08/18] qemu-iotests: fix test 020 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 12/18] qemu-iotests: fix test 037 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 14/18] qemu-iotests: fix test 043 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 16/18] qemu-iotests: fix expected output of test 067, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 18/18] qemu-iotests: test 026 store blkdebug.cfg locally, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 15/18] qemu-iotests: fix test 046 to work with any protocol, Peter Lieven, 2014/01/05
[Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol, Peter Lieven, 2014/01/05