提交 e9843279 编写于 作者: J Ján Tomko

Add a test for long USB port paths

We support up to four levels of nested USB devices in the guest.

Add a test for a domain using all four and a negative test for a domain
using five.
上级 d85c3a54
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu \
-name QEMUGuest1 \
-S \
-M pc \
-m 214 \
-smp 1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
-nodefconfig \
-nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
server,nowait \
-mon chardev=charmonitor,id=monitor,mode=readline \
-no-acpi \
-boot c \
-usb \
-device usb-hub,id=hub0,bus=usb.0,port=1 \
-device usb-hub,id=hub1,bus=usb.0,port=1.1 \
-device usb-hub,id=hub2,bus=usb.0,port=1.1.1 \
-device usb-hub,id=hub3,bus=usb.0,port=1.1.1.1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<emulator>/usr/bin/qemu</emulator>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<hub type='usb'>
<address type='usb' bus='0' port='1'/>
</hub>
<hub type='usb'>
<address type='usb' bus='0' port='1.1'/>
</hub>
<hub type='usb'>
<address type='usb' bus='0' port='1.1.1'/>
</hub>
<hub type='usb'>
<address type='usb' bus='0' port='1.1.1.1'/>
</hub>
<memballoon model='virtio'/>
</devices>
</domain>
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<emulator>/usr/bin/qemu</emulator>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<hub type='usb'>
<address type='usb' bus='0' port='1'/>
</hub>
<hub type='usb'>
<address type='usb' bus='0' port='1.1'/>
</hub>
<hub type='usb'>
<address type='usb' bus='0' port='1.1.1'/>
</hub>
<hub type='usb'>
<address type='usb' bus='0' port='1.1.1.1'/>
</hub>
<hub type='usb'>
<address type='usb' bus='0' port='1.1.1.1.1'/>
</hub>
<memballoon model='virtio'/>
</devices>
</domain>
......@@ -2015,6 +2015,11 @@ mymain(void)
DO_TEST("debug-threads", QEMU_CAPS_NAME_DEBUG_THREADS);
DO_TEST("master-key", QEMU_CAPS_OBJECT_SECRET);
DO_TEST("usb-long-port-path", QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
QEMU_CAPS_USB_HUB);
DO_TEST_PARSE_FLAGS_ERROR("usb-too-long-port-path-invalid",
QEMU_CAPS_CHARDEV,
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_USB_HUB);
DO_TEST("acpi-table", NONE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册