mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
tests: PCI controller checks
Check if PCI bridges with duplicate indexes are rejected. PCI root controllers with non-zero indexes or addresses should also be rejected.
This commit is contained in:
parent
926055474d
commit
e4f0a55e79
@ -0,0 +1,16 @@
|
||||
<domain type='qemu'>
|
||||
<name>fdr-br</name>
|
||||
<memory unit='KiB'>2097152</memory>
|
||||
<currentMemory unit='KiB'>2097152</currentMemory>
|
||||
<vcpu placement='static' cpuset='0-1'>2</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc-1.2'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/qemu-kvm</emulator>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<controller type='pci' index='1' model='pci-bridge'/>
|
||||
<controller type='pci' index='1' model='pci-bridge'/>
|
||||
</devices>
|
||||
</domain>
|
16
tests/qemuxml2argvdata/qemuxml2argv-pci-root-address.xml
Normal file
16
tests/qemuxml2argvdata/qemuxml2argv-pci-root-address.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<domain type='qemu'>
|
||||
<name>fdr-br</name>
|
||||
<memory unit='KiB'>2097152</memory>
|
||||
<currentMemory unit='KiB'>2097152</currentMemory>
|
||||
<vcpu placement='static' cpuset='0-1'>2</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc-1.2'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/qemu-kvm</emulator>
|
||||
<controller type='pci' index='0' model='pci-root'>
|
||||
<address type='pci' domain='0' bus='0' slot='0' function='0'/>
|
||||
</controller>
|
||||
</devices>
|
||||
</domain>
|
@ -0,0 +1,14 @@
|
||||
<domain type='qemu'>
|
||||
<name>fdr-br</name>
|
||||
<memory unit='KiB'>2097152</memory>
|
||||
<currentMemory unit='KiB'>2097152</currentMemory>
|
||||
<vcpu placement='static' cpuset='0-1'>2</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc-1.2'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/qemu-kvm</emulator>
|
||||
<controller type='pci' index='7' model='pci-root'/>
|
||||
</devices>
|
||||
</domain>
|
@ -1020,6 +1020,12 @@ mymain(void)
|
||||
|
||||
DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
||||
DO_TEST_PARSE_ERROR("pci-bridge-duplicate-index",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
||||
DO_TEST_PARSE_ERROR("pci-root-nonzero-index",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
||||
DO_TEST_PARSE_ERROR("pci-root-address",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
||||
|
||||
virObjectUnref(driver.config);
|
||||
virObjectUnref(driver.caps);
|
||||
|
Loading…
Reference in New Issue
Block a user