On Tue, Aug 13, 2019 at 05:40:26PM +0200, Boris Fiuczynski wrote:
Adding a failure test for booting from a vhost scsi hostdev device.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
---
.../hostdev-scsi-vhost-scsi-pci-boot-fail.xml | 41 +++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
2 files changed, 44 insertions(+)
create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pci-boot-fail.xml
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pci-boot-fail.xml
b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pci-boot-fail.xml
new file mode 100644
index 0000000000..94f590b11b
--- /dev/null
+++ b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pci-boot-fail.xml
@@ -0,0 +1,41 @@
+<domain type='qemu'>
+ <name>QEMUGuest2</name>
+ <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i686</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest2'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <controller type='scsi' index='0' model='virtio-scsi'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
+ </controller>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <hostdev mode='subsystem' type='scsi_host'
managed='no'>
+ <source protocol='vhost' wwpn='naa.5123456789abcde0'/>
+ <boot order='1'/>
+ </hostdev>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index f113dbb0fd..5f94780f61 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2444,6 +2444,9 @@ mymain(void)
DO_TEST("hostdev-scsi-vhost-scsi-pci",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_DEVICE_VHOST_SCSI);
+ DO_TEST_FAILURE("hostdev-scsi-vhost-scsi-pci-boot-fail",
+ QEMU_CAPS_VIRTIO_SCSI,
+ QEMU_CAPS_DEVICE_VHOST_SCSI);
DO_TEST_CAPS_LATEST_FAILURE here
Jano
DO_TEST("hostdev-scsi-vhost-scsi-pcie",
QEMU_CAPS_KVM,
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI,
--
2.17.0
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list