aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/051
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/051')
-rwxr-xr-xtests/qemu-iotests/05117
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 1f39c6ad21..78e11823b4 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -45,7 +45,14 @@ _supported_os Linux
function do_run_qemu()
{
echo Testing: "$@"
- echo quit | $QEMU -nographic -monitor stdio -serial none "$@"
+ (
+ if ! test -t 0; then
+ while read cmd; do
+ echo $cmd
+ done
+ fi
+ echo quit
+ ) | $QEMU -nographic -monitor stdio -serial none "$@"
echo
}
@@ -57,6 +64,9 @@ function run_qemu()
size=128M
_make_test_img $size
+cp $TEST_IMG $TEST_IMG.orig
+mv $TEST_IMG $TEST_IMG.base
+_make_test_img -b $TEST_IMG.base $size
echo
echo === Unknown option ===
@@ -67,6 +77,11 @@ run_qemu -drive file=$TEST_IMG,format=qcow2,unknown_opt=on
run_qemu -drive file=$TEST_IMG,format=qcow2,unknown_opt=1234
run_qemu -drive file=$TEST_IMG,format=qcow2,unknown_opt=foo
+echo
+echo === Overriding backing file ===
+echo
+
+echo "info block" | run_qemu -drive file=$TEST_IMG,driver=qcow2,backing.file.filename=$TEST_IMG.orig -nodefaults
echo
echo === Enable and disable lazy refcounting on the command line, plus some invalid values ===