---
tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.args | 5 ++++-
tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml | 8 ++++++++
tests/qemuxml2argvtest.c | 3 ++-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.args
b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.args
index 79aa270..1acbf0d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.args
@@ -17,4 +17,7 @@ QEMU_AUDIO_DRV=none \
-boot c \
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 \
--usb
+-usb \
+-drive file=/dev/null,format=raw,if=none,id=drive-usb-disk16,readonly=on,\
+cache=none \
+-device usb-storage,bus=usb.0,port=1,drive=drive-usb-disk16,id=usb-disk16
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml
b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml
index 20ad0a5..aa93487 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml
@@ -19,6 +19,14 @@
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw' cache='none'/>
+ <source file='/dev/null'/>
+ <target dev='sdq' bus='usb'/>
+ <readonly/>
+ <shareable/>
+ <address type='usb' bus='0' port='1'/>
+ </disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a53af53..43bbb15 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1726,7 +1726,8 @@ mymain(void)
QEMU_CAPS_DEVICE_PCI_BRIDGE);
DO_TEST("hotplug-base",
- QEMU_CAPS_KVM, QEMU_CAPS_VIRTIO_SCSI);
+ QEMU_CAPS_KVM, QEMU_CAPS_VIRTIO_SCSI,
+ QEMU_CAPS_DEVICE_USB_STORAGE);
DO_TEST("pcihole64", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE);
DO_TEST_FAILURE("pcihole64-none", NONE);
--
2.7.3