CC: Max Reitz <mre...@redhat.com> 
Suggested-by: Kevin Wolf <kw...@redhat.com>
Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com>
---
 tests/qemu-iotests/051     |    9 +++++++++
 tests/qemu-iotests/051.out |    8 ++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 11c858f..1eec350 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -95,6 +95,15 @@ run_qemu -drive file="$TEST_IMG",driver=foo
 run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
 
 echo
+echo === Device without drive ===
+echo
+
+# virtio-scsi-pci, virtio-scsi-ccw, virtio-scsi-s390...
+VIRTSCSIDEV=`${QEMU} -device help 2>&1 | grep -v virtio-scsi-device | grep -m 
1 virtio-scsi | cut -d \" -f 2`
+
+run_qemu -device ${VIRTSCSIDEV} -device scsi-hd 
+
+echo
 echo === Overriding backing file ===
 echo
 
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
index f497c57..e8e3258 100644
--- a/tests/qemu-iotests/051.out
+++ b/tests/qemu-iotests/051.out
@@ -44,6 +44,14 @@ 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
 
 
+=== 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
-- 
1.7.1


Reply via email to