mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
tests: qemuxml2argv: Add tests for USB controller on q35
This commit is contained in:
parent
a4af45c065
commit
117375ca49
@ -0,0 +1,21 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/libexec/qemu-kvm \
|
||||
-name q35-test \
|
||||
-S \
|
||||
-M q35 \
|
||||
-m 2048 \
|
||||
-smp 1 \
|
||||
-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
|
||||
-nographic \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x1 \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
|
||||
-device piix3-usb-uhci,id=usb,bus=pcie.0,addr=0x1
|
@ -0,0 +1,27 @@
|
||||
<domain type='qemu'>
|
||||
<name>q35-test</name>
|
||||
<uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
|
||||
<memory unit='KiB'>2097152</memory>
|
||||
<currentMemory unit='KiB'>2097152</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='q35'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/qemu-kvm</emulator>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
|
||||
</controller>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -0,0 +1 @@
|
||||
qemuxml2argv-usb-controller-default-q35.xml
|
@ -0,0 +1,21 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/libexec/qemu-kvm \
|
||||
-name q35-test \
|
||||
-S \
|
||||
-M q35 \
|
||||
-m 2048 \
|
||||
-smp 1 \
|
||||
-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
|
||||
-nographic \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x1 \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
|
||||
-device nec-usb-xhci,id=usb,bus=pcie.0,addr=0x1
|
@ -0,0 +1,27 @@
|
||||
<domain type='qemu'>
|
||||
<name>q35-test</name>
|
||||
<uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
|
||||
<memory unit='KiB'>2097152</memory>
|
||||
<currentMemory unit='KiB'>2097152</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='q35'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/qemu-kvm</emulator>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='nec-xhci'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
|
||||
</controller>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -0,0 +1 @@
|
||||
qemuxml2argv-usb-controller-explicit-q35.xml
|
@ -1181,7 +1181,22 @@ mymain(void)
|
||||
QEMU_CAPS_USB_HUB);
|
||||
DO_TEST_PARSE_ERROR("usb-none-usbtablet",
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
|
||||
|
||||
DO_TEST("usb-controller-default-q35",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI,
|
||||
QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI);
|
||||
DO_TEST_FAILURE("usb-controller-default-unavailable-q35",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI,
|
||||
QEMU_CAPS_NEC_USB_XHCI);
|
||||
DO_TEST("usb-controller-explicit-q35",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI,
|
||||
QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI);
|
||||
DO_TEST_FAILURE("usb-controller-explicit-unavailable-q35",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI,
|
||||
QEMU_CAPS_PIIX3_USB_UHCI);
|
||||
|
||||
DO_TEST("smbios", QEMU_CAPS_SMBIOS_TYPE);
|
||||
DO_TEST_PARSE_ERROR("smbios-date", QEMU_CAPS_SMBIOS_TYPE);
|
||||
|
Loading…
Reference in New Issue
Block a user