aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/051
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2014-06-04 15:09:35 +0200
committerKevin Wolf <kwolf@redhat.com>2014-06-26 13:51:01 +0200
commit8ee79e707a005c9274df7ce34265bb7d008b8cef (patch)
treef8402fad14af55bef4457d8a5888db05d1d11fec /tests/qemu-iotests/051
parent76c591b013782217cad67b35c74cd249e0413439 (diff)
downloadqemu-8ee79e707a005c9274df7ce34265bb7d008b8cef.zip
qemu-8ee79e707a005c9274df7ce34265bb7d008b8cef.tar.gz
qemu-8ee79e707a005c9274df7ce34265bb7d008b8cef.tar.bz2
block: Catch backing files assigned to non-COW drivers
Since we parse backing.* options to add a backing file from the command line when the driver didn't assign one, it has been possible to have a backing file for e.g. raw images (it just was never accessed). This is obvious nonsense and should be rejected. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/051')
-rwxr-xr-xtests/qemu-iotests/0515
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 30a712f..a41334e 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -100,6 +100,11 @@ echo
echo "info block" | run_qemu -drive file="$TEST_IMG",driver=qcow2,backing.file.filename="$TEST_IMG.orig" -nodefaults
+# Drivers that don't support backing files
+run_qemu -drive file="$TEST_IMG",driver=raw,backing.file.filename="$TEST_IMG.orig"
+run_qemu -drive file="$TEST_IMG",file.backing.driver=file,file.backing.filename="$TEST_IMG.orig"
+run_qemu -drive file="$TEST_IMG",file.backing.driver=qcow2,file.backing.file.filename="$TEST_IMG.orig"
+
echo
echo === Enable and disable lazy refcounting on the command line, plus some invalid values ===
echo