]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
qemu-iotests: make a few more tests generic
authorChristoph Hellwig <hch@lst.de>
Thu, 9 Jul 2009 13:26:11 +0000 (15:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 22 Feb 2012 15:17:01 +0000 (16:17 +0100)
Pretend that a non-implemented check is always successful and thus allow
various tests that were qcow2-specific before to be generic.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/009
tests/qemu-iotests/010
tests/qemu-iotests/011
tests/qemu-iotests/013
tests/qemu-iotests/014
tests/qemu-iotests/015
tests/qemu-iotests/common.pattern
tests/qemu-iotests/common.rc

index 9b2920557d63d9baa9ea25799339c54daaee4ce2..00c16330fdbec18897e789f991ef280f44281dde 100755 (executable)
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
index 4cf969cd6cc899b06f6f0de11bf8e4cdc82fcd71..a5bee937f956191de2ce8a304df4b6eb8c632973 100755 (executable)
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
index c524367b12802cf97efcf1cd0a6981e8a4eef776..d16a14fada493f44d7ee6dbab76e21bc29c6e1a2 100755 (executable)
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
index ce13218ceb3ab3d787d89eaed8b17d5686377405..fda6ce1ffc413a94248c06d788d3f5f751720280 100755 (executable)
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.pattern
 
 # much of this could be generic for any format supporting compression.
-_supported_fmt qcow2
+_supported_fmt qcow qcow2
 _supported_os Linux
 
 TEST_OFFSETS="0 4294967296"
@@ -66,7 +66,7 @@ echo "Compressing image"
 echo
 
 mv $TEST_IMG $TEST_IMG.orig
-$QEMU_IMG convert -f qcow2 -O qcow2 -c $TEST_IMG.orig $TEST_IMG
+$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
 
 echo "Testing compressed image"
 echo
index 03a1298a84fdf08673764abd8c8929acecf87f06..ae932c7216cef9bbffde525173579e05da36edc6 100755 (executable)
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.filter
 . ./common.pattern
 
-# much of this could be generic for any format supporting compression.
+# much of this could be generic for any format supporting snapshots
 _supported_fmt qcow2
 _supported_os Linux
 
index a8add14a73aa5e831488b741f68643e9c7f872f5..b5f04e1a132c153ddc2b9ee5a2daee5dfa218f18 100755 (executable)
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
-# currently only qcow2 allows for consistency checks using qemu-img
+# actually any format that supports snapshots
 _supported_fmt qcow2
 _supported_os Linux
 
index f1b18296ddd0cb3b08ed4e0dba2afadefbd77642..9e7f2f20dbdb4732249eed950dbbe38d0d25b949 100644 (file)
@@ -96,7 +96,7 @@ function io_test2() {
     io_pattern writev $((offset + 8 * 4096)) 4096 $((9 * 4096)) 256 165
 
     mv $TEST_IMG $TEST_IMG.orig
-    $QEMU_IMG convert -f qcow2 -O qcow2 -c $TEST_IMG.orig $TEST_IMG
+    $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
 
     # Write the used clusters
     echo === Used clusters [1]
index c4337d50cb85846f58901a15a95c6b92a6f77445..a05a250d74effc83b40beae39d46bbded79d389c 100644 (file)
@@ -75,7 +75,8 @@ _cleanup_test_img()
 
 _check_test_img()
 {
-    $QEMU_IMG check -f $IMGFMT $TEST_IMG
+    $QEMU_IMG check -f $IMGFMT $TEST_IMG 2>&1 | \
+       sed -e 's/qemu-img\: This image format does not support checks/No errors were found on the image./'
 }
 
 _get_pids_by_name()