aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/050
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/050')
-rwxr-xr-xtests/qemu-iotests/05019
1 files changed, 7 insertions, 12 deletions
diff --git a/tests/qemu-iotests/050 b/tests/qemu-iotests/050
index 03b4a5d620..1de01c312e 100755
--- a/tests/qemu-iotests/050
+++ b/tests/qemu-iotests/050
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/usr/bin/env bash
+# group: rw auto backing quick
#
# Test qemu-img rebase with zero clusters
#
@@ -24,14 +25,13 @@ owner=pbonzini@redhat.com
seq=`basename $0`
echo "QA output created by $seq"
-here=`pwd`
status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
- rm -f "$TEST_IMG.old"
- rm -f "$TEST_IMG.new"
+ _rm_test_img "$TEST_IMG.old"
+ _rm_test_img "$TEST_IMG.new"
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -40,12 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2 qed
-_supported_proto file
-_supported_os Linux
-
-if test "$IMGFMT" = qcow2 && test $IMGOPTS = ""; then
- IMGOPTS=compat=1.1
-fi
+_supported_proto file fuse
echo
echo "== Creating images =="
@@ -64,13 +59,13 @@ $QEMU_IO -c "write -P 0x5a 0 1048576" "$TEST_IMG" | _filter_qemu_io
TEST_IMG="$TEST_IMG_SAVE"
-_make_test_img -b "$TEST_IMG.old" $size
+_make_test_img -b "$TEST_IMG.old" -F $IMGFMT $size
$QEMU_IO -c "write -z 0 1048576" "$TEST_IMG" | _filter_qemu_io
echo
echo "== Rebasing the image =="
-$QEMU_IMG rebase -b "$TEST_IMG.new" "$TEST_IMG"
+$QEMU_IMG rebase -b "$TEST_IMG.new" -F $IMGFMT "$TEST_IMG"
$QEMU_IO -c "read -P 0x00 0 1048576" "$TEST_IMG" | _filter_qemu_io
# success, all done