[PATCHv2 7/9] qemu: remove test for allowing ide controller in s390, rename usb tests

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

 



Back in 2013, commit 877bc089 added in some tests that made sure no
error was generated on a domain definition that had an automatically
added usb controller if that domain didn't have a PCI bus to attach
the usb controller to. This was done because, at that time, libvirt
was automatically adding a usb controller to *any* domain definition
that didn't have one.  Along with permitting the controller, two
s390-specific tests were added to ensure this behavior was maintained:
one with <controller type='usb' model='none'/> and another (called
"s390-piix-controllers") that had both usb and ide controllers, but
nothing attached to them.

Then in February of this year, commit 09ab9dcc eliminated the annoying
auto-adding of a usb device for s390 and s390x machines, stating:

 "Since s390 does not support usb the default creation of a usb
  controller for a domain should not occur."

Although, as verified here, the s390 doesn't support usb, and usb
controllers aren't currently added to s390 domain definitions
automatically, there are likely still some domain definitions in the
wild that have a usb controller (which was added *by libvirt*, not by
the user), so we will keep the tests verifying that behavior for
now. But this patch changes the names of the tests to reflect that
they don't actually contain a valid s390 config; this way future
developers won't propagate the incorrect idea that an s390 virtual
machine can have a USB (or IDE) bus.

In the case of the IDE controller, though, libvirt has never
automatically added an IDE controller unless a user added an IDE disk
(which itself would have caused an error), and we specifically *do*
want to begin generating an error when someone tries to add an IDE
controller to a domain that can't support one. For that reason, while
renaming the sz390-piix-controllers patch, this patch removes the
<controller type='ide'...> from it (otherwise the upcoming patch would
break make check)
---

Change from V1: (this was patch 10/13 in V1)

None - already ACKed (technically, this is V3, since I previously
posted the patch by itself and modified it based on feedback from
jtomko). Included here because it's needed for the next patch.

...rollers.args => qemuxml2argv-s390-allow-bogus-usb-controller.args} | 0
 ...ntrollers.xml => qemuxml2argv-s390-allow-bogus-usb-controller.xml} | 3 ---
 ...s390-usb-none.args => qemuxml2argv-s390-allow-bogus-usb-none.args} | 0
 ...v-s390-usb-none.xml => qemuxml2argv-s390-allow-bogus-usb-none.xml} | 0
 tests/qemuxml2argvtest.c                                              | 4 ++--
 5 files changed, 2 insertions(+), 5 deletions(-)
 rename tests/qemuxml2argvdata/{qemuxml2argv-s390-piix-controllers.args => qemuxml2argv-s390-allow-bogus-usb-controller.args} (100%)
 rename tests/qemuxml2argvdata/{qemuxml2argv-s390-piix-controllers.xml => qemuxml2argv-s390-allow-bogus-usb-controller.xml} (86%)
 rename tests/qemuxml2argvdata/{qemuxml2argv-s390-usb-none.args => qemuxml2argv-s390-allow-bogus-usb-none.args} (100%)
 rename tests/qemuxml2argvdata/{qemuxml2argv-s390-usb-none.xml => qemuxml2argv-s390-allow-bogus-usb-none.xml} (100%)

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-piix-controllers.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.args
similarity index 100%
rename from tests/qemuxml2argvdata/qemuxml2argv-s390-piix-controllers.args
rename to tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.args
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-piix-controllers.xml b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.xml
similarity index 86%
rename from tests/qemuxml2argvdata/qemuxml2argv-s390-piix-controllers.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.xml
index a8b72d7..ba0e6f7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-s390-piix-controllers.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-controller.xml
@@ -22,9 +22,6 @@
     <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>
     <memballoon model='virtio'>
     </memballoon>
     <rng model='virtio'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-usb-none.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args
similarity index 100%
rename from tests/qemuxml2argvdata/qemuxml2argv-s390-usb-none.args
rename to tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.args
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-usb-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.xml
similarity index 100%
rename from tests/qemuxml2argvdata/qemuxml2argv-s390-usb-none.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-s390-allow-bogus-usb-none.xml
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index e67d909..c08b3e0 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1415,12 +1415,12 @@ mymain(void)
             QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_VIRTIO_RNG,
             QEMU_CAPS_OBJECT_RNG_RANDOM);
 
-    DO_TEST("s390-usb-none",
+    DO_TEST("s390-allow-bogus-usb-none",
             QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
             QEMU_CAPS_DRIVE, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_S390,
             QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
 
-    DO_TEST("s390-piix-controllers",
+    DO_TEST("s390-allow-bogus-usb-controller",
             QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
             QEMU_CAPS_DRIVE, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_S390,
             QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
-- 
2.1.0

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