From 815b51d97ab6e9512b2cf1819d57e3cc88c413e1 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Fri, 11 Nov 2016 12:14:02 -0500 Subject: [PATCH] qemu: update tests to not assume dmi-to-pci-bridge is always added 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.: 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) --- .../qemuxml2argv-usb-controller-default-q35.args | 2 +- .../qemuxml2argv-usb-controller-default-q35.xml | 1 + .../qemuxml2argv-usb-controller-explicit-q35.args | 2 +- .../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 f98f83804f..f45400d575 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 26eecefe90..5f949d67ec 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml @@ -15,6 +15,7 @@ /usr/libexec/qemu-kvm + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args index 5eb39ba82b..92a4ee3c8d 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 f3b34ee6d1..f6d95b4333 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml @@ -15,6 +15,7 @@ /usr/libexec/qemu-kvm + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml index 082a92e452..456fd54bc9 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml @@ -15,6 +15,10 @@ /usr/libexec/qemu-kvm + + +
+ @@ -26,10 +30,6 @@
- - -
- diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml index 540e8175e4..db92c22e75 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml @@ -15,6 +15,10 @@ /usr/libexec/qemu-kvm + + +
+ @@ -26,10 +30,6 @@
- - -
-