From 8900436891cd8955b0795945aa020c04eaa0e5d2 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 27 Mar 2012 13:45:14 +0200 Subject: 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 --- tests/qemu-iotests/common | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/qemu-iotests/common') 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 -- cgit v1.2.3