From c5834ec148b075130a1db139566dc14249ee5e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 20 Nov 2012 19:47:09 +0100 Subject: [PATCH] tests: add boot order for host and redirected USB to qemu argv test --- ...2argv-hostdev-usb-address-device-boot.args | 6 +++ ...l2argv-hostdev-usb-address-device-boot.xml | 28 +++++++++++++ .../qemuxml2argv-usb-redir-boot.args | 13 ++++++ .../qemuxml2argv-usb-redir-boot.xml | 42 +++++++++++++++++++ tests/qemuxml2argvtest.c | 9 ++++ 5 files changed, 98 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.args new file mode 100644 index 0000000000..beb093cff8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.args @@ -0,0 +1,6 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ +pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor \ +unix:/tmp/test-monitor,server,nowait -no-acpi -usb -hda \ +/dev/HostVG/QEMUGuest1 \ +-device usb-host,hostbus=14,hostaddr=6,id=hostdev0,bootindex=1 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.xml new file mode 100644 index 0000000000..c11a963443 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device-boot.xml @@ -0,0 +1,28 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + +
+ + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.args new file mode 100644 index 0000000000..92ea6dc644 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.args @@ -0,0 +1,13 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc \ +-m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi \ +-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 \ +-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \ +-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \ +-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \ +-chardev socket,id=charredir0,host=localhost,port=4000 \ +-device usb-redir,chardev=charredir0,id=redir0,bootindex=1 \ +-chardev spicevmc,id=charredir1,name=usbredir \ +-device usb-redir,chardev=charredir1,id=redir1,bootindex=2,bus=usb.0,port=4 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.xml new file mode 100644 index 0000000000..02a27c1ad0 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-boot.xml @@ -0,0 +1,42 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu + +
+ + + +
+ + + +
+ + + +
+ + + + + + + +
+ + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 48e09ab245..4cccbb0f72 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -715,6 +715,12 @@ mymain(void) QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_USB_HUB, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_USB_REDIR, QEMU_CAPS_SPICE, QEMU_CAPS_CHARDEV_SPICEVMC); + DO_TEST("usb-redir-boot", + QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_USB_HUB, + QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_USB_REDIR, + QEMU_CAPS_SPICE, QEMU_CAPS_CHARDEV_SPICEVMC, QEMU_CAPS_BOOTINDEX, + QEMU_CAPS_USB_REDIR_BOOTINDEX); DO_TEST("usb-redir-filter", QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_USB_HUB, @@ -755,6 +761,9 @@ mymain(void) DO_TEST("hostdev-usb-address", NONE); DO_TEST("hostdev-usb-address-device", QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); + DO_TEST("hostdev-usb-address-device-boot", QEMU_CAPS_DEVICE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_BOOTINDEX, + QEMU_CAPS_USB_HOST_BOOTINDEX); DO_TEST("hostdev-pci-address", QEMU_CAPS_PCIDEVICE); DO_TEST("hostdev-pci-address-device", QEMU_CAPS_PCIDEVICE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);