diff options
Diffstat (limited to 'tests/qemu-iotests/common')
-rw-r--r-- | tests/qemu-iotests/common | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index 130f647a4d..2e98e64d5c 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -19,6 +19,24 @@ # common procedures for QA scripts # +_full_imgfmt_details() +{ + if [ -n "$IMGOPTS" ]; then + echo "$IMGFMT ($IMGOPTS)" + else + echo "$IMGFMT" + fi +} + +_full_platform_details() +{ + os=`uname -s` + host=`hostname -s` + kernel=`uname -r` + platform=`uname -m` + echo "$os/$platform $host $kernel" +} + diff="diff -u" verbose=false debug=false @@ -404,7 +422,12 @@ if [ "$IMGOPTSSYNTAX" != "true" ]; then fi # Set default options for qemu-img create -o if they were not specified -_set_default_imgopts +if [ "$IMGFMT" == "qcow2" ] && ! (echo "$IMGOPTS" | grep "compat=" > /dev/null); then + IMGOPTS=$(_optstr_add "$IMGOPTS" "compat=1.1") +fi +if [ "$IMGFMT" == "luks" ] && ! (echo "$IMGOPTS" | grep "iter-time=" > /dev/null); then + IMGOPTS=$(_optstr_add "$IMGOPTS" "iter-time=10") +fi if [ -s $tmp.list ] then |