Skip to contentSkip to conversation

Add testcase for scsi-hd devices without drive property

PATCH Applied Christian Borntraeger 4 participants 4 messages Mar 3, 2015 – Mar 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add testcase for scsi-hd devices without drive property

Lets add a test for scsi devices without a drive. This was broken by a recent block patch, thus indicating that we need a testcase.

---
 tests/qemu-iotests/051     |    6 ++++++
 tests/qemu-iotests/051.out |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
tests/qemu-iotests/051 +6 -0
index 11c858f..6ab40e2 100755
@@ -95,6 +95,12 @@ run_qemu -drive file="$TEST_IMG",driver=foo
 run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2
 
 echo
+echo === Device without drive ===
+echo
+
+run_qemu -device virtio-scsi-pci -device scsi-hd
+
+echo
 echo === Overriding backing file ===
 echo
 
tests/qemu-iotests/051.out +8 -0
index f497c57..e8e3258 100644
@@ -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
Signature · 1 line
1.7.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Christian Borntraeger

Lets add a test for scsi devices without a drive. This was broken by a recent block patch, thus indicating that we need a testcase.

---
  tests/qemu-iotests/051     |    6 ++++++
  tests/qemu-iotests/051.out |    8 ++++++++
  2 files changed, 14 insertions(+), 0 deletions(-)

I think we should wait with applying this patch until the relevant patch to scsi-disk.c is applied, though (I'm not completely opposed to applying patches that fail from the start, but it does make bisecting more difficult).

Max

Reviewed-by on v2 1/1
#2 lore raw
In reply to Christian Borntraeger
Quoted 9 lines · Christian Borntraeger

Lets add a test for scsi devices without a drive. This was broken by a recent block patch, thus indicating that we need a testcase.

---
 tests/qemu-iotests/051     |    6 ++++++
 tests/qemu-iotests/051.out |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)