OSDN Git Service

iotests: Add test for driver=qcow2, format=qcow2
authorMax Reitz <mreitz@redhat.com>
Thu, 5 Feb 2015 18:58:13 +0000 (13:58 -0500)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 16 Feb 2015 15:07:18 +0000 (15:07 +0000)
While specifying a different driver and format is obviously invalid,
specifying the same driver once through driver and once through format
is invalid as well. Add a test for it.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1423162705-32065-5-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/051
tests/qemu-iotests/051.out

index 11c858f..27138a2 100755 (executable)
@@ -93,6 +93,7 @@ echo
 run_qemu -drive file="$TEST_IMG",format=foo
 run_qemu -drive file="$TEST_IMG",driver=foo
 run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
+run_qemu -drive file="$TEST_IMG",driver=qcow2,format=qcow2
 
 echo
 echo === Overriding backing file ===
index 9596e20..e727dc1 100644 (file)
@@ -43,6 +43,9 @@ QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=foo: could not open disk image TE
 Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2
 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2: could not open disk image TEST_DIR/t.qcow2: Driver specified twice
 
+Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: could not open disk image TEST_DIR/t.qcow2: Driver specified twice
+
 
 === Overriding backing file ===