aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2012-03-27 13:45:14 +0200
committerKevin Wolf <kwolf@redhat.com>2012-04-20 15:57:30 +0200
commit8900436891cd8955b0795945aa020c04eaa0e5d2 (patch)
treea99526c912164f53f68b6fee3e3910f035db8f55 /tests/qemu-iotests/common
parent621f058940ea9f1ef3d8774ef3203544f1228df1 (diff)
qemu-iotests: Add -o and make v3 the default for qcow2
This adds an -o option to qemu-iotests, which is an option string that is passed through to qemu-img create -o... This allows testing different subformat with a command like './check -qcow2 -o compat=0.10'. For qcow2, if no compat option is specified, compat=1.1 is the new default. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common')
-rw-r--r--tests/qemu-iotests/common17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
index c187f6c573..eeb70cbcdc 100644
--- a/tests/qemu-iotests/common
+++ b/tests/qemu-iotests/common
@@ -35,6 +35,7 @@ diff="diff -u"
verbose=false
group=false
xgroup=false
+imgopts=false
showme=false
sortme=false
expunge=true
@@ -44,6 +45,7 @@ rm -f $tmp.list $tmp.tmp $tmp.sed
export IMGFMT=raw
export IMGPROTO=file
+export IMGOPTS=""
export QEMU_IO_OPTIONS=""
for r
@@ -103,6 +105,13 @@ s/ .*//p
mv $tmp.tmp $tmp.list
xgroup=false
continue
+
+ elif $imgopts
+ then
+ IMGOPTS="$r"
+ imgopts=false
+ continue
+
fi
xpand=true
@@ -130,6 +139,7 @@ check options
-nocache use O_DIRECT on backing file
-misalign misalign memory allocations
-n show me, do not run tests
+ -o options -o options to pass to qemu-img create/convert
-T output timestamps
-r randomize test order
@@ -223,6 +233,10 @@ testlist options
showme=true
xpand=false
;;
+ -o)
+ imgopts=true
+ xpand=false
+ ;;
-r) # randomize test order
randomize=true
xpand=false
@@ -299,6 +313,9 @@ BEGIN { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \
done
+# Set default options for qemu-img create -o if they were not specified
+_set_default_imgopts
+
if [ -s $tmp.list ]
then
# found some valid test numbers ... this is good