diff mbox

[PATCHv2,10/18] qemu-iotests: fix test 028 to work with any protocol

Message ID 1388942528-10453-11-git-send-email-pl@kamp.de
State New
Headers show

Commit Message

Peter Lieven Jan. 5, 2014, 5:22 p.m. UTC
Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/028     |    9 ++++-----
 tests/qemu-iotests/028.out |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028
index a99e4fa..4c7644d 100755
--- a/tests/qemu-iotests/028
+++ b/tests/qemu-iotests/028
@@ -45,7 +45,7 @@  trap "_cleanup; exit \$status" 0 1 2 3 15
 # Any format supporting backing files except vmdk and qcow which do not support
 # smaller backing files.
 _supported_fmt qcow2 qed
-_supported_proto file
+_supported_proto generic
 _supported_os Linux
 
 # Choose a size that is not necessarily a cluster size multiple for image
@@ -58,20 +58,19 @@  base_size=$(( image_size - 1024 * 1024 * 1024 ))
 
 offset=$(( base_size - 32 * 1024 ))
 
-_make_test_img $base_size
+TEST_IMG=$TEST_IMG.base _make_test_img $base_size
 
 echo "Filling base image"
 echo
 
 # Fill end of base image with a pattern, skipping every other sector
-io writev $offset 512 1024 32
+TEST_IMG=$TEST_IMG.base io writev $offset 512 1024 32
 
-_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" $image_size
 
 echo "Filling test image"
diff --git a/tests/qemu-iotests/028.out b/tests/qemu-iotests/028.out
index 8affb7f..444e89a 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