]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: update tests to not assume dmi-to-pci-bridge is always added
authorLaine Stump <laine@laine.org>
Fri, 11 Nov 2016 17:14:02 +0000 (12:14 -0500)
committerLaine Stump <laine@laine.org>
Mon, 14 Nov 2016 19:21:15 +0000 (14:21 -0500)
A few of the qemu test cases assume that a dmi-to-pci-bridge will
always be added at index 1, and so they omit it from the input data
even though a pci-bridge is present at index 2, e.g.:

   <controller type='pci' index='0' model='pcie-root'/>
   <controller type='pci' index='2' model='pci-bridge'/>

Support for this odd practice was discussed on libvir-list and we
decided that the complex code required to make this continue was not
worth the headache of maintaining. So instead, this patch modifies the
test cases to manually add a dmi-to-pci-bridge at index 1 (since an
upcoming patch is going to eliminate the unconditional adding of
dmi-to-pci-bridge).

Because the auto-add was placing the dmi-to-pci-bridge later in the
list (even though it has a lower index) the test output is also
updated to take account for the new order (which puts the pci
controllers in index-order)

tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args
tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml
tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args
tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml

index f98f83804ff766faa50b3a4c031690a4fcf0dbe1..f45400d575f284edbacf3aa43ad3290af6c3d7d2 100644 (file)
@@ -16,6 +16,6 @@ QEMU_AUDIO_DRV=none \
 -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \
 -no-acpi \
 -boot c \
--device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
+-device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \
 -device piix3-usb-uhci,id=usb,bus=pcie.0,addr=0x1
index 26eecefe90abf9d2ed0bf1b0170dc4ed62f47b98..5f949d67eceef1f339d62b5c949bcefa1f5cec46 100644 (file)
@@ -15,6 +15,7 @@
   <devices>
     <emulator>/usr/libexec/qemu-kvm</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='dmi-to-pci-bridge'/>
     <controller type='pci' index='2' model='pci-bridge'>
       <model name='pci-bridge'/>
       <target chassisNr='56'/>
index 5eb39ba82bc99d024a17d62fb70a551f507160c4..92a4ee3c8dc2ab7af2df8ace75564e979710a3de 100644 (file)
@@ -16,6 +16,6 @@ QEMU_AUDIO_DRV=none \
 -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \
 -no-acpi \
 -boot c \
--device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
+-device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \
 -device nec-usb-xhci,id=usb,bus=pcie.0,addr=0x1
index f3b34ee6d1bc5fdd38df37ad79c6c088bf28e187..f6d95b43333b94840ddfcb114cb9e6f442a33a35 100644 (file)
@@ -15,6 +15,7 @@
   <devices>
     <emulator>/usr/libexec/qemu-kvm</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='dmi-to-pci-bridge'/>
     <controller type='pci' index='2' model='pci-bridge'>
       <model name='pci-bridge'/>
       <target chassisNr='56'/>
index 082a92e452c50d7ba09d6efccd07a5c663bc5394..456fd54bc9edb73a5f9175f6627154bcc8cab663 100644 (file)
   <devices>
     <emulator>/usr/libexec/qemu-kvm</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
+      <model name='i82801b11-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+    </controller>
     <controller type='pci' index='2' model='pci-bridge'>
       <model name='pci-bridge'/>
       <target chassisNr='56'/>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
     </controller>
-    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
-      <model name='i82801b11-bridge'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
-    </controller>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
index 540e8175e4bc93ce18a5a8193b7595c64a0928cd..db92c22e753d5e3c22745f1ca21f96c7b2fa36e7 100644 (file)
   <devices>
     <emulator>/usr/libexec/qemu-kvm</emulator>
     <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
+      <model name='i82801b11-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+    </controller>
     <controller type='pci' index='2' model='pci-bridge'>
       <model name='pci-bridge'/>
       <target chassisNr='56'/>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
     </controller>
-    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
-      <model name='i82801b11-bridge'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
-    </controller>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>