mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
621f058940
commit
8900436891
3 changed files with 52 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue