[PATCH v7 11/17] qemu: update tests to not assume dmi-to-pci-bridge is always added

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

 



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)
---
 .../qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args | 2 +-
 .../qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml  | 1 +
 .../qemuxml2argv-usb-controller-explicit-q35.args                 | 2 +-
 .../qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml | 1 +
 .../qemuxml2xmlout-usb-controller-default-q35.xml                 | 8 ++++----
 .../qemuxml2xmlout-usb-controller-explicit-q35.xml                | 8 ++++----
 6 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args
index f98f838..f45400d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args
@@ -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
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml
index 26eecef..5f949d6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml
@@ -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'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args
index 5eb39ba..92a4ee3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args
@@ -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
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml
index f3b34ee..f6d95b4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml
@@ -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'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml
index 082a92e..456fd54 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml
@@ -15,6 +15,10 @@
   <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'/>
@@ -26,10 +30,6 @@
     <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'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml
index 540e817..db92c22 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml
@@ -15,6 +15,10 @@
   <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'/>
@@ -26,10 +30,6 @@
     <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'/>
-- 
2.7.4

--
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]