[PATCH 3/3] Add XML test for too many PCI devices on default PCI bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 tests/qemuxml2argvdata/qemuxml2argv-pci-many.args |  63 +++++++
 tests/qemuxml2argvdata/qemuxml2argv-pci-many.xml  | 214 ++++++++++++++++++++++
 tests/qemuxml2argvtest.c                          |   2 +
 3 files changed, 279 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pci-many.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pci-many.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-many.args b/tests/qemuxml2argvdata/qemuxml2argv-pci-many.args
new file mode 100644
index 0000000..9551c91
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-many.args
@@ -0,0 +1,63 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
+/usr/libexec/qemu-kvm \
+-S -M pc-1.2 -m 2048 -smp 2 -nographic -nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait -boot c \
+-usb -drive file=/var/iso/f18kde.iso,if=none,media=cdrom,id=drive-ide0-1-0 \
+-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
+-drive file=/var/lib/libvirt/images/test.img,if=none,id=drive-virtio-disk0 \
+-device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0 \
+-drive file=/var/lib/libvirt/images/test1.img,if=none,id=drive-virtio-disk0 \
+-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \
+-drive file=/var/lib/libvirt/images/disk-a-a.img,if=none,id=drive-virtio-disk0 \
+-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 \
+-drive file=/var/lib/libvirt/images/disk-a-b.img,if=none,id=drive-virtio-disk27 \
+-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk27,id=virtio-disk27 \
+-drive file=/var/lib/libvirt/images/disk-a-c.img,if=none,id=drive-virtio-disk28 \
+-device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive-virtio-disk28,id=virtio-disk28 \
+-drive file=/var/lib/libvirt/images/disk-a-d.img,if=none,id=drive-virtio-disk29 \
+-device virtio-blk-pci,bus=pci.0,addr=0x9,drive=drive-virtio-disk29,id=virtio-disk29 \
+-drive file=/var/lib/libvirt/images/disk-b-a.img,if=none,id=drive-virtio-disk52 \
+-device virtio-blk-pci,bus=pci.0,addr=0xa,drive=drive-virtio-disk52,id=virtio-disk52 \
+-drive file=/var/lib/libvirt/images/disk-b-b.img,if=none,id=drive-virtio-disk53 \
+-device virtio-blk-pci,bus=pci.0,addr=0xb,drive=drive-virtio-disk53,id=virtio-disk53 \
+-drive file=/var/lib/libvirt/images/disk-b-c.img,if=none,id=drive-virtio-disk54 \
+-device virtio-blk-pci,bus=pci.0,addr=0xc,drive=drive-virtio-disk54,id=virtio-disk54 \
+-drive file=/var/lib/libvirt/images/disk-b-d.img,if=none,id=drive-virtio-disk55 \
+-device virtio-blk-pci,bus=pci.0,addr=0xd,drive=drive-virtio-disk55,id=virtio-disk55 \
+-drive file=/var/lib/libvirt/images/disk-c-a.img,if=none,id=drive-virtio-disk78 \
+-device virtio-blk-pci,bus=pci.0,addr=0xe,drive=drive-virtio-disk78,id=virtio-disk78 \
+-drive file=/var/lib/libvirt/images/disk-c-b.img,if=none,id=drive-virtio-disk79 \
+-device virtio-blk-pci,bus=pci.0,addr=0xf,drive=drive-virtio-disk79,id=virtio-disk79 \
+-drive file=/var/lib/libvirt/images/disk-c-c.img,if=none,id=drive-virtio-disk80 \
+-device virtio-blk-pci,bus=pci.0,addr=0x10,drive=drive-virtio-disk80,id=virtio-disk80 \
+-drive file=/var/lib/libvirt/images/disk-c-d.img,if=none,id=drive-virtio-disk81 \
+-device virtio-blk-pci,bus=pci.0,addr=0x11,drive=drive-virtio-disk81,id=virtio-disk81 \
+-drive file=/var/lib/libvirt/images/disk-d-a.img,if=none,id=drive-virtio-disk104 \
+-device virtio-blk-pci,bus=pci.0,addr=0x12,drive=drive-virtio-disk104,id=virtio-disk104 \
+-drive file=/var/lib/libvirt/images/disk-d-b.img,if=none,id=drive-virtio-disk105 \
+-device virtio-blk-pci,bus=pci.0,addr=0x13,drive=drive-virtio-disk105,id=virtio-disk105 \
+-drive file=/var/lib/libvirt/images/disk-d-c.img,if=none,id=drive-virtio-disk106 \
+-device virtio-blk-pci,bus=pci.0,addr=0x14,drive=drive-virtio-disk106,id=virtio-disk106 \
+-drive file=/var/lib/libvirt/images/disk-d-d.img,if=none,id=drive-virtio-disk107 \
+-device virtio-blk-pci,bus=pci.0,addr=0x15,drive=drive-virtio-disk107,id=virtio-disk107 \
+-drive file=/var/lib/libvirt/images/disk-e-a.img,if=none,id=drive-virtio-disk130 \
+-device virtio-blk-pci,bus=pci.0,addr=0x16,drive=drive-virtio-disk130,id=virtio-disk130 \
+-drive file=/var/lib/libvirt/images/disk-e-b.img,if=none,id=drive-virtio-disk131 \
+-device virtio-blk-pci,bus=pci.0,addr=0x17,drive=drive-virtio-disk131,id=virtio-disk131 \
+-drive file=/var/lib/libvirt/images/disk-e-c.img,if=none,id=drive-virtio-disk132 \
+-device virtio-blk-pci,bus=pci.0,addr=0x18,drive=drive-virtio-disk132,id=virtio-disk132 \
+-drive file=/var/lib/libvirt/images/disk-e-d.img,if=none,id=drive-virtio-disk133 \
+-device virtio-blk-pci,bus=pci.0,addr=0x19,drive=drive-virtio-disk133,id=virtio-disk133 \
+-drive file=/var/lib/libvirt/images/disk-f-a.img,if=none,id=drive-virtio-disk156 \
+-device virtio-blk-pci,bus=pci.0,addr=0x1a,drive=drive-virtio-disk156,id=virtio-disk156 \
+-drive file=/var/lib/libvirt/images/disk-f-b.img,if=none,id=drive-virtio-disk157 \
+-device virtio-blk-pci,bus=pci.0,addr=0x1b,drive=drive-virtio-disk157,id=virtio-disk157 \
+-drive file=/var/lib/libvirt/images/disk-f-c.img,if=none,id=drive-virtio-disk158 \
+-device virtio-blk-pci,bus=pci.0,addr=0x1c,drive=drive-virtio-disk158,id=virtio-disk158 \
+-drive file=/var/lib/libvirt/images/disk-f-d.img,if=none,id=drive-virtio-disk159 \
+-device virtio-blk-pci,bus=pci.0,addr=0x1d,drive=drive-virtio-disk159,id=virtio-disk159 \
+-drive file=/var/lib/libvirt/images/disk-g-a.img,if=none,id=drive-virtio-disk182 \
+-device virtio-blk-pci,bus=pci.0,addr=0x1e,drive=drive-virtio-disk182,id=virtio-disk182 \
+-drive file=/var/lib/libvirt/images/disk-g-b.img,if=none,id=drive-virtio-disk183 \
+-device virtio-blk-pci,bus=pci.0,addr=0x1f,drive=drive-virtio-disk183,id=virtio-disk183 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-many.xml
new file mode 100644
index 0000000..400470e
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-many.xml
@@ -0,0 +1,214 @@
+<domain type='qemu'>
+  <name>fdr-br</name>
+  <uuid>3ec6cbe1-b5a2-4515-b800-31a61855df41</uuid>
+  <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>
+  <features>
+    <acpi/>
+    <apic/>
+    <pae/>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <devices>
+    <emulator>/usr/libexec/qemu-kvm</emulator>
+    <disk type='file' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/iso/f18kde.iso'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='ide' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/test.img'/>
+      <target dev='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/test1.img'/>
+      <target dev='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-a-a.img'/>
+      <target dev='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-a-b.img'/>
+      <target dev='vdab' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-a-c.img'/>
+      <target dev='vdac' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-a-d.img'/>
+      <target dev='vdad' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-b-a.img'/>
+      <target dev='vdba' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-b-b.img'/>
+      <target dev='vdbb' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-b-c.img'/>
+      <target dev='vdbc' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-b-d.img'/>
+      <target dev='vdbd' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-c-a.img'/>
+      <target dev='vdca' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-c-b.img'/>
+      <target dev='vdcb' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-c-c.img'/>
+      <target dev='vdcc' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-c-d.img'/>
+      <target dev='vdcd' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-d-a.img'/>
+      <target dev='vdda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x12' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-d-b.img'/>
+      <target dev='vddb' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-d-c.img'/>
+      <target dev='vddc' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-d-d.img'/>
+      <target dev='vddd' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x15' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-e-a.img'/>
+      <target dev='vdea' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x16' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-e-b.img'/>
+      <target dev='vdeb' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x17' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-e-c.img'/>
+      <target dev='vdec' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x18' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-e-d.img'/>
+      <target dev='vded' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x19' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-f-a.img'/>
+      <target dev='vdfa' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1a' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-f-b.img'/>
+      <target dev='vdfb' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-f-c.img'/>
+      <target dev='vdfc' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1c' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-f-d.img'/>
+      <target dev='vdfd' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-g-a.img'/>
+      <target dev='vdga' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/disk-g-b.img'/>
+      <target dev='vdgb' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/>
+    </disk>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+    </memballoon>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 1d0bd61..87f86a3 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1409,6 +1409,8 @@ mymain(void)
 
     DO_TEST("pci-autoadd-addr", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
     DO_TEST("pci-autoadd-idx", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
+    DO_TEST("pci-many",
+            QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
     DO_TEST("pci-bridge-many-disks",
             QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
     DO_TEST("pcie-root",
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]