The tests for device type "ide_cd" should only be tested for the pc
platform.
The default device id of hard disk on the s390 platform differs to that
of the x86 platform. A new variable device_id is defined and "virtio0"
set for the s390 platform. A x86 platform specific output file is also
needed.
A new filter was added to filter orphan warnings.

Reviewed-by: Max Reitz <mre...@redhat.com>
Signed-off-by: Bo Tu <t...@linux.vnet.ibm.com>
---
 tests/qemu-iotests/051           |  85 +++++---
 tests/qemu-iotests/051.out       | 158 +++++---------
 tests/qemu-iotests/051.pc.out    | 433 +++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/common.filter |   7 +
 4 files changed, 550 insertions(+), 133 deletions(-)
 create mode 100644 tests/qemu-iotests/051.pc.out

diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 0360f37..f06ba78 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -102,7 +102,13 @@ echo
 echo === Device without drive ===
 echo
 
-run_qemu -device virtio-scsi-pci -device scsi-hd
+case "$QEMU_DEFAULT_MACHINE" in
+            pc)
+               run_qemu -device virtio-scsi-pci -device scsi-hd
+               ;;
+            *)
+               ;;
+esac
 
 echo
 echo === Overriding backing file ===
@@ -147,13 +153,19 @@ run_qemu -drive if=ide
 run_qemu -drive if=virtio
 run_qemu -drive if=scsi
 
-run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
-run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
+case "$QEMU_DEFAULT_MACHINE" in
+    pc)
+        run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
+        run_qemu -drive if=none,id=disk -device lsi53c895a -device 
scsi-cd,drive=disk
 
-run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
-run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
-run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
-run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
+        run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
+        run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
+        run_qemu -drive if=none,id=disk -device lsi53c895a -device 
scsi-disk,drive=disk
+        run_qemu -drive if=none,id=disk -device lsi53c895a -device 
scsi-hd,drive=disk
+        ;;
+    *)
+        ;;
+esac
 
 echo
 echo === Read-only ===
@@ -167,13 +179,19 @@ run_qemu -drive file="$TEST_IMG",if=ide,readonly=on
 run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on
 run_qemu -drive file="$TEST_IMG",if=scsi,readonly=on
 
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
ide-cd,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-cd,drive=disk
+case "$QEMU_DEFAULT_MACHINE" in
+    pc)
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
ide-cd,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-cd,drive=disk
 
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
ide-drive,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
ide-hd,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-disk,drive=disk
-run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-hd,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
ide-drive,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
ide-hd,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-disk,drive=disk
+        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-hd,drive=disk
+        ;;
+    *)
+        ;;
+esac
 
 echo
 echo === Cache modes ===
@@ -182,12 +200,12 @@ echo
 # Cannot use the test image because cache=none might not work on the host FS
 # Use cdrom so that we won't get errors about missing media
 
-run_qemu -drive media=cdrom,cache=none
-run_qemu -drive media=cdrom,cache=directsync
-run_qemu -drive media=cdrom,cache=writeback
-run_qemu -drive media=cdrom,cache=writethrough
-run_qemu -drive media=cdrom,cache=unsafe
-run_qemu -drive media=cdrom,cache=invalid_value
+run_qemu -drive if=scsi,media=cdrom,cache=none
+run_qemu -drive if=scsi,media=cdrom,cache=directsync
+run_qemu -drive if=scsi,media=cdrom,cache=writeback
+run_qemu -drive if=scsi,media=cdrom,cache=writethrough
+run_qemu -drive if=scsi,media=cdrom,cache=unsafe
+run_qemu -drive if=scsi,media=cdrom,cache=invalid_value
 
 echo
 echo === Specifying the protocol layer ===
@@ -251,28 +269,37 @@ echo
 echo === Snapshot mode ===
 echo
 
+case "$QEMU_DEFAULT_MACHINE" in
+    pc)
+        device_id="ide0-hd0"
+        ;;
+    s390)
+        device_id="virtio0"
+        ;;
+esac
+
 $QEMU_IO -c "write -P 0x11 0 4k" "$TEST_IMG" | _filter_qemu_io
 
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file="$TEST_IMG" -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file="$TEST_IMG",snapshot=on | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file.filename="$TEST_IMG",driver=qcow2,snapshot=on | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file.filename="$TEST_IMG",driver=qcow2 -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file="file:$TEST_IMG" -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file="file:$TEST_IMG",snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file="$TEST_IMG" -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file="$TEST_IMG",snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file.filename="$TEST_IMG",driver=qcow2,snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file.filename="$TEST_IMG",driver=qcow2 -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file="file:$TEST_IMG" -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file="file:$TEST_IMG",snapshot=on | _filter_qemu_io
 
 # Opening a read-only file r/w with snapshot=on
 chmod u-w "$TEST_IMG"
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file="$TEST_IMG" -snapshot | _filter_qemu_io
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file="$TEST_IMG",snapshot=on | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file="$TEST_IMG" -snapshot | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file="$TEST_IMG",snapshot=on | _filter_qemu_io
 chmod u+w "$TEST_IMG"
 
 $QEMU_IO -c "read -P 0x11 0 4k" "$TEST_IMG" | _filter_qemu_io
 
-echo 'qemu-io ide0-hd0 "write -P 0x22 0 4k"' | run_qemu -drive 
file="$TEST_IMG",snapshot=off | _filter_qemu_io
+echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive 
file="$TEST_IMG",snapshot=off | _filter_qemu_io
 
 $QEMU_IO -c "read -P 0x22 0 4k" "$TEST_IMG" | _filter_qemu_io
 
-echo -e 'qemu-io ide0-hd0 "write -P 0x33 0 4k"\ncommit ide0-hd0' | run_qemu 
-drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
+echo -e "qemu-io $device_id \"write -P 0x33 0 4k\"\ncommit $device_id" | 
run_qemu -drive file="$TEST_IMG",snapshot=on | _filter_qemu_io
 
 $QEMU_IO -c "read -P 0x33 0 4k" "$TEST_IMG" | _filter_qemu_io
 
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
index 2890eac..f9584d5 100644
--- a/tests/qemu-iotests/051.out
+++ b/tests/qemu-iotests/051.out
@@ -5,16 +5,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 
backing_file='TEST_DIR
 === Unknown option ===
 
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
-QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: Block 
format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
 
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
-QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: Block 
format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
 
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
-QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: Block 
format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
 
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
-QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: Block 
format 'qcow2' used by device 'virtio0' doesn't support the option 'unknown_opt'
 
 
 === Unknown protocol option ===
@@ -49,18 +49,13 @@ QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: Cannot specif
 
 === Device without drive ===
 
-Testing: -device virtio-scsi-pci -device scsi-hd
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-hd: drive property not set
-QEMU_PROG: -device scsi-hd: Device 'scsi-hd' could not be initialized
-
 
 === Overriding backing file ===
 
 Testing: -drive 
file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig 
-nodefaults
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) iininfinfoinfo 
info binfo 
blinfo bloinfo 
blocinfo block
-ide0-hd0: TEST_DIR/t.qcow2 (qcow2)
+virtio0: TEST_DIR/t.qcow2 (qcow2)
     Cache mode:       writeback
     Backing file:     TEST_DIR/t.qcow2.orig (chain depth: 1)
 (qemu) qququiquit
@@ -110,79 +105,56 @@ QEMU X.Y.Z monitor - type 'help' for more information
 
 Testing: -drive if=floppy
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
 Testing: -drive if=ide,media=cdrom
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
 Testing: -drive if=scsi,media=cdrom
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
 Testing: -drive if=ide
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: Device needs media, but drive is empty
-QEMU_PROG: Initialization of device ide-hd failed: Device initialization 
failed.
+(qemu)
+qququiquit
 
 Testing: -drive if=virtio
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
-QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized
+QEMU_PROG: -drive if=virtio: Device 'virtio-blk-s390' could not be initialized
 
 Testing: -drive if=scsi
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: Initialization of device lsi53c895a failed: Device needs 
media, but drive is empty
-
-Testing: -drive if=none,id=disk -device ide-cd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
-
-Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
-
-Testing: -drive if=none,id=disk -device ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive 
is empty
-QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
-QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be 
initialized
-
-Testing: -drive if=none,id=disk -device ide-hd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is 
empty
-QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
-QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
-
-Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive 
is empty
-QEMU_PROG: -device scsi-disk,drive=disk: Device 'scsi-disk' could not be 
initialized
-
-Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is 
empty
-QEMU_PROG: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be 
initialized
+(qemu)
+qququiquit
 
 
 === Read-only ===
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: Can't use a read-only drive
-QEMU_PROG: Initialization of device ide-hd failed: Device initialization 
failed.
+(qemu)
+qququiquit
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
@@ -190,61 +162,39 @@ QEMU X.Y.Z monitor - type 'help' for more information
 
 Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
-
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
ide-cd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
-
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-cd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
-
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: Can't use a read-only drive
-QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
-QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be 
initialized
-
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
ide-hd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-hd,drive=disk: Can't use a read-only drive
-QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
-QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
-
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
-
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-hd,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
 
 === Cache modes ===
 
-Testing: -drive media=cdrom,cache=none
+Testing: -drive if=scsi,media=cdrom,cache=none
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
-Testing: -drive media=cdrom,cache=directsync
+Testing: -drive if=scsi,media=cdrom,cache=directsync
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
-Testing: -drive media=cdrom,cache=writeback
+Testing: -drive if=scsi,media=cdrom,cache=writeback
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
-Testing: -drive media=cdrom,cache=writethrough
+Testing: -drive if=scsi,media=cdrom,cache=writethrough
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
-Testing: -drive media=cdrom,cache=unsafe
+Testing: -drive if=scsi,media=cdrom,cache=unsafe
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) qququiquit
+(qemu)
+qququiquit
 
-Testing: -drive media=cdrom,cache=invalid_value
-QEMU_PROG: -drive media=cdrom,cache=invalid_value: invalid cache option
+Testing: -drive if=scsi,media=cdrom,cache=invalid_value
+QEMU_PROG: -drive if=scsi,media=cdrom,cache=invalid_value: invalid cache option
 
 
 === Specifying the protocol layer ===
@@ -355,56 +305,56 @@ wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 Testing: -drive file=TEST_DIR/t.qcow2 -snapshot
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
 
 Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
 
 Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2,snapshot=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
 
 Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2 -snapshot
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
 
 Testing: -drive file=file:TEST_DIR/t.qcow2 -snapshot
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
 
 Testing: -drive file=file:TEST_DIR/t.qcow2,snapshot=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
 
 Testing: -drive file=TEST_DIR/t.qcow2 -snapshot
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
 
 Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
@@ -413,7 +363,7 @@ read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 Testing: -drive file=TEST_DIR/t.qcow2,snapshot=off
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x2qemu-io
 virtio0 "write -P 
0x22qemu-io
 virtio0 "wr!
 ite -P 0x22 
qemu-io
 virtio0 "write -P 0x22 
0qemu-io
 virtio0 "write -P 0x22 0 
qemu-io
 virtio0 "write -P 0x22 0 
4qemu-io
 virtio0 "write -P 0x22 0 
4kqemu-io
 virtio0 "write -P 0x22 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 (qemu) qququiquit
@@ -422,10 +372,10 @@ read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
 QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x3qemu-io
 ide0-hd0 "w!
 rite -P 
0x33qemu-io
 ide0-hd0 "write -P 0x33 
qemu-io
 ide0-hd0 "write -P 0x33 
0qemu-io
 ide0-hd0 "write -P 0x33 0 
qemu-io
 ide0-hd0 "write -P 0x33 0 
4qemu-io
 ide0-hd0 "write -P 0x33 0 
4kqemu-io
 ide0-hd0 "write -P 0x33 0 4k"
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io vqemu-io 
viqemu-io 
virqemu-io 
virtqemu-io 
virtiqemu-io 
virtioqemu-io 
virtio0qemu-io virtio0 
qemu-io virtio0 
"qemu-io virtio0 
"wqemu-io virtio0 
"wrqemu-io virtio0 
"wriqemu-io 
virtio0 "writ!
 qemu-io virtio0 
"writeqemu-io
 virtio0 "write 
qemu-io 
virtio0 "write 
-qemu-io
 virtio0 "write 
-Pqemu-io
 virtio0 "write -P 
qemu-io
 virtio0 "write -P 
0qemu-io
 virtio0 "write -P 
0xqemu-io
 virtio0 "write -P 
0x3qemu-io
 virtio0 "write -P 
0x33qemu-io
 virtio0 "wr!
 ite -P 0x33 
qemu-io
 virtio0 "write -P 0x33 
0qemu-io
 virtio0 "write -P 0x33 0 
qemu-io
 virtio0 "write -P 0x33 0 
4qemu-io
 virtio0 "write -P 0x33 0 
4kqemu-io
 virtio0 "write -P 0x33 0 4k"
 wrote 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-(qemu) 
ccocomcommcommicommitcommit
 commit icommit 
idcommit 
idecommit 
ide0commit 
ide0-commit 
ide0-hcommit 
ide0-hdcommit ide0-hd0
+(qemu) 
ccocomcommcommicommitcommit
 commit vcommit 
vicommit 
vircommit 
virtcommit 
virticommit 
virtiocommit virtio0
 (qemu) qququiquit
 
 read 4096/4096 bytes at offset 0
diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out
new file mode 100644
index 0000000..4c9224d
--- /dev/null
+++ b/tests/qemu-iotests/051.pc.out
@@ -0,0 +1,433 @@
+QA output created by 051
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 
backing_file='TEST_DIR/t.IMGFMT.base'
+
+=== Unknown option ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: Block 
format 'qcow2' used by device 'ide0-hd0' doesn't support the option 
'unknown_opt'
+
+
+=== Unknown protocol option ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=: Block 
protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on: 
Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234: 
Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo: 
Block protocol 'file' doesn't support the option 'unknown_opt'
+
+
+=== Invalid format ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=foo: Unknown driver 'foo'
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=foo: Unknown driver 'foo'
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2: Cannot 
specify both 'driver' and 'format'
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: Cannot 
specify both 'driver' and 'format'
+
+
+=== Device without drive ===
+
+Testing: -device virtio-scsi-pci -device scsi-hd
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -device scsi-hd: drive property not set
+QEMU_PROG: -device scsi-hd: Device 'scsi-hd' could not be initialized
+
+
+=== Overriding backing file ===
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig 
-nodefaults
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) iininfinfoinfo 
info binfo 
blinfo bloinfo 
blocinfo block
+ide0-hd0: TEST_DIR/t.qcow2 (qcow2)
+    Cache mode:       writeback
+    Backing file:     TEST_DIR/t.qcow2.orig (chain depth: 1)
+(qemu) qququiquit
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig: 
Driver doesn't support backing files
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig:
 Driver doesn't support backing files
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig:
 Driver doesn't support backing files
+
+
+=== Enable and disable lazy refcounting on the command line, plus some invalid 
values ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=: 
Parameter 'lazy-refcounts' expects 'on' or 'off'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42: 
Parameter 'lazy-refcounts' expects 'on' or 'off'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo: 
Parameter 'lazy-refcounts' expects 'on' or 'off'
+
+
+=== With version 2 images enabling lazy refcounts must fail ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: Lazy 
refcounts require a qcow2 image with at least qemu 1.1 compatibility level
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+
+=== No medium ===
+
+Testing: -drive if=floppy
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=ide,media=cdrom
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=scsi,media=cdrom
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=ide
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: Device needs media, but drive is empty
+QEMU_PROG: Initialization of device ide-hd failed: Device initialization 
failed.
+
+Testing: -drive if=virtio
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
+QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized
+
+Testing: -drive if=scsi
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: Initialization of device lsi53c895a failed: Device needs 
media, but drive is empty
+
+Testing: -drive if=none,id=disk -device ide-cd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=none,id=disk -device ide-drive,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive 
is empty
+QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
+QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be 
initialized
+
+Testing: -drive if=none,id=disk -device ide-hd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is 
empty
+QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
+QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
+
+Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive 
is empty
+QEMU_PROG: -device scsi-disk,drive=disk: Device 'scsi-disk' could not be 
initialized
+
+Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is 
empty
+QEMU_PROG: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be 
initialized
+
+
+=== Read-only ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: Can't use a read-only drive
+QEMU_PROG: Initialization of device ide-hd failed: Device initialization 
failed.
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
ide-cd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-cd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
ide-drive,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -device ide-drive,drive=disk: Can't use a read-only drive
+QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
+QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be 
initialized
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
ide-hd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) QEMU_PROG: -device ide-hd,drive=disk: Can't use a read-only drive
+QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
+QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-disk,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device 
lsi53c895a -device scsi-hd,drive=disk
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+
+=== Cache modes ===
+
+Testing: -drive if=scsi,media=cdrom,cache=none
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=scsi,media=cdrom,cache=directsync
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=scsi,media=cdrom,cache=writeback
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=scsi,media=cdrom,cache=writethrough
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=scsi,media=cdrom,cache=unsafe
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive if=scsi,media=cdrom,cache=invalid_value
+QEMU_PROG: -drive if=scsi,media=cdrom,cache=invalid_value: invalid cache option
+
+
+=== Specifying the protocol layer ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,file.driver=file
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2: Block format 
'qcow2' used by device '' doesn't support the option 'filename'
+
+
+=== Leaving out required options ===
+
+Testing: -drive driver=file
+QEMU_PROG: -drive driver=file: The 'file' block driver requires a file name
+
+Testing: -drive driver=nbd
+QEMU_PROG: -drive driver=nbd: one of path and host must be specified.
+
+Testing: -drive driver=raw
+QEMU_PROG: -drive driver=raw: Can't use 'raw' as a block driver for the 
protocol level
+
+Testing: -drive file.driver=file
+QEMU_PROG: -drive file.driver=file: The 'file' block driver requires a file 
name
+
+Testing: -drive file.driver=nbd
+QEMU_PROG: -drive file.driver=nbd: one of path and host must be specified.
+
+Testing: -drive file.driver=raw
+QEMU_PROG: -drive file.driver=raw: Can't use 'raw' as a block driver for the 
protocol level
+
+Testing: -drive foo=bar
+QEMU_PROG: -drive foo=bar: Must specify either driver or file
+
+
+=== Specifying both an option and its legacy alias ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops=1234,throttling.iops-total=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops=1234,throttling.iops-total=5678: 
'throttling.iops-total' and its alias 'iops' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_rd=1234,throttling.iops-read=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,iops_rd=1234,throttling.iops-read=5678: 
'throttling.iops-read' and its alias 'iops_rd' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_wr=1234,throttling.iops-write=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,iops_wr=1234,throttling.iops-write=5678: 
'throttling.iops-write' and its alias 'iops_wr' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps=1234,throttling.bps-total=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=1234,throttling.bps-total=5678: 
'throttling.bps-total' and its alias 'bps' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps_rd=1234,throttling.bps-read=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd=1234,throttling.bps-read=5678: 
'throttling.bps-read' and its alias 'bps_rd' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,bps_wr=1234,throttling.bps-write=5678
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_wr=1234,throttling.bps-write=5678: 
'throttling.bps-write' and its alias 'bps_wr' can't be used at the same time
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,iops_max=1234,throttling.iops-total-max=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,iops_max=1234,throttling.iops-total-max=5678: 
'throttling.iops-total-max' and its alias 'iops_max' can't be used at the same 
time
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,iops_rd_max=1234,throttling.iops-read-max=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,iops_rd_max=1234,throttling.iops-read-max=5678: 
'throttling.iops-read-max' and its alias 'iops_rd_max' can't be used at the 
same time
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,iops_wr_max=1234,throttling.iops-write-max=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,iops_wr_max=1234,throttling.iops-write-max=5678: 
'throttling.iops-write-max' and its alias 'iops_wr_max' can't be used at the 
same time
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,bps_max=1234,throttling.bps-total-max=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,bps_max=1234,throttling.bps-total-max=5678: 
'throttling.bps-total-max' and its alias 'bps_max' can't be used at the same 
time
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,bps_rd_max=1234,throttling.bps-read-max=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,bps_rd_max=1234,throttling.bps-read-max=5678: 
'throttling.bps-read-max' and its alias 'bps_rd_max' can't be used at the same 
time
+
+Testing: -drive 
file=TEST_DIR/t.qcow2,bps_wr_max=1234,throttling.bps-write-max=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,bps_wr_max=1234,throttling.bps-write-max=5678: 
'throttling.bps-write-max' and its alias 'bps_wr_max' can't be used at the same 
time
+
+Testing: -drive file=TEST_DIR/t.qcow2,iops_size=1234,throttling.iops-size=5678
+QEMU_PROG: -drive 
file=TEST_DIR/t.qcow2,iops_size=1234,throttling.iops-size=5678: 
'throttling.iops-size' and its alias 'iops_size' can't be used at the same time
+
+Testing: -drive file=TEST_DIR/t.qcow2,readonly=on,read-only=off
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,readonly=on,read-only=off: 'read-only' 
and its alias 'readonly' can't be used at the same time
+
+
+=== Parsing protocol from file name ===
+
+Testing: -hda foo:bar
+QEMU_PROG: -hda foo:bar: Unknown protocol 'foo'
+
+Testing: -drive file=foo:bar
+QEMU_PROG: -drive file=foo:bar: Unknown protocol 'foo'
+
+Testing: -drive file.filename=foo:bar
+QEMU_PROG: -drive file.filename=foo:bar: Could not open 'foo:bar': No such 
file or directory
+
+Testing: -hda file:TEST_DIR/t.qcow2
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file=file:TEST_DIR/t.qcow2
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) qququiquit
+
+Testing: -drive file.filename=file:TEST_DIR/t.qcow2
+QEMU_PROG: -drive file.filename=file:TEST_DIR/t.qcow2: Could not open 
'file:TEST_DIR/t.qcow2': No such file or directory
+
+
+=== Snapshot mode ===
+
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive file=TEST_DIR/t.qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+Testing: -drive file=file:TEST_DIR/t.qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+Testing: -drive file=file:TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2 -snapshot
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+read 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x2qemu-io
 ide0-hd0 "w!
 rite -P 
0x22qemu-io
 ide0-hd0 "write -P 0x22 
qemu-io
 ide0-hd0 "write -P 0x22 
0qemu-io
 ide0-hd0 "write -P 0x22 0 
qemu-io
 ide0-hd0 "write -P 0x22 0 
4qemu-io
 ide0-hd0 "write -P 0x22 0 
4kqemu-io
 ide0-hd0 "write -P 0x22 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) qququiquit
+
+read 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) 
qqeqemqemuqemu-qemu-iqemu-ioqemu-io
 qemu-io iqemu-io 
idqemu-io 
ideqemu-io 
ide0qemu-io 
ide0-qemu-io 
ide0-hqemu-io 
ide0-hdqemu-io 
ide0-hd0qemu-io ide0-hd0 
qemu-io ide0-hd0 
"qemu-io ide0-hd0 
"wqemu-io ide0-hd0 
"wrqemu-io 
ide0-hd0 "wri!
 qemu-io ide0-hd0 
"writqemu-io
 ide0-hd0 
"writeqemu-io
 ide0-hd0 "write 
qemu-io
 ide0-hd0 "write 
-qemu-io
 ide0-hd0 "write 
-Pqemu-io
 ide0-hd0 "write -P 
qemu-io
 ide0-hd0 "write -P 
0qemu-io
 ide0-hd0 "write -P 
0xqemu-io
 ide0-hd0 "write -P 
0x3qemu-io
 ide0-hd0 "w!
 rite -P 
0x33qemu-io
 ide0-hd0 "write -P 0x33 
qemu-io
 ide0-hd0 "write -P 0x33 
0qemu-io
 ide0-hd0 "write -P 0x33 0 
qemu-io
 ide0-hd0 "write -P 0x33 0 
4qemu-io
 ide0-hd0 "write -P 0x33 0 
4kqemu-io
 ide0-hd0 "write -P 0x33 0 4k"
+wrote 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+(qemu) 
ccocomcommcommicommitcommit
 commit icommit 
idcommit 
idecommit 
ide0commit 
ide0-commit 
ide0-hcommit 
ide0-hdcommit ide0-hd0
+(qemu) qququiquit
+
+read 4096/4096 bytes at offset 0
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+*** done
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 012a812..db86fd7 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -154,9 +154,16 @@ _filter_qemu_io()
         -e "s/qemu-io> //g"
 }
 
+# removes orphan warnings
+_filter_orphan()
+{
+    sed -e 's/ Warning: Orphaned drive without device:.*$//g'
+}
+
 # replace occurrences of QEMU_PROG with "qemu"
 _filter_qemu()
 {
+    _filter_orphan | \
     sed -e "s#\\(^\\|(qemu) \\)$(basename $QEMU_PROG):#\1QEMU_PROG:#" \
         -e 's#^QEMU [0-9]\+\.[0-9]\+\.[0-9]\+ monitor#QEMU X.Y.Z monitor#' \
         -e '/main-loop: WARNING: I\/O thread spun for [0-9]\+ iterations/d' \
-- 
2.3.0


Reply via email to