Re: [libvirt PATCH v2 18/44] Deprecate QEMU_CAPS_NODEFCONFIG

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

 



On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote:
> @@ -1349,156 +1305,133 @@ mymain(void)
>      driver.config->chardevTLS = 0;
>      VIR_FREE(driver.config->chardevTLSx509certdir);
>      DO_TEST("serial-many-chardev",
> -            QEMU_CAPS_DEVICE_ISA_SERIAL,
> -            QEMU_CAPS_NODEFCONFIG);
> -    DO_TEST("parallel-tcp-chardev",
> -            QEMU_CAPS_NODEFCONFIG);
> +            QEMU_CAPS_DEVICE_ISA_SERIAL);
> +    DO_TEST("parallel-tcp-chardev", NONE);
>      DO_TEST("parallel-parport-chardev",
> -            QEMU_CAPS_NODEFCONFIG);
> +            NONE);

NONE should be on the same line as the test name in this case.
There are a few more instances of the same issue below.

>      DO_TEST("console-compat-chardev",
>              QEMU_CAPS_DEVICE_ISA_SERIAL,
> -            QEMU_CAPS_NODEFCONFIG);
> +            NONE);

I guess technically this will work, but it's definitely not what
you were aiming for, is it? Again, more instances below.

> @@ -1783,14 +1698,10 @@ mymain(void)
>              QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH);
>  
>      DO_TEST("multifunction-pci-device",
> -            QEMU_CAPS_NODEFCONFIG,
>              QEMU_CAPS_SCSI_LSI);
>  
> -    DO_TEST("monitor-json",
> -            QEMU_CAPS_NODEFCONFIG);
> -    DO_TEST("no-shutdown",
> -            QEMU_CAPS_NODEFCONFIG,
> -            QEMU_CAPS_NO_SHUTDOWN);
> +    DO_TEST("monitor-json", NONE);
> +    DO_TEST("no-shutdown", QEMU_CAPS_NO_SHUTDOWN);

Here the NO_SHUTDOWN capability should have stayed on its own line.

I'm attaching a patch that fixes all the issues I could find,
because that's faster than pointing them all out :)

With that squashed in

  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization
From c2c4f6f937a450685dc53ea1859c8f11f87f13b5 Mon Sep 17 00:00:00 2001
From: Andrea Bolognani <abologna@xxxxxxxxxx>
Date: Mon, 16 Apr 2018 15:03:23 +0200
Subject: [PATCH] fixup

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 tests/qemuxml2argvtest.c | 93 ++++++++++++++++++------------------------------
 tests/qemuxml2xmltest.c  | 15 +++-----
 2 files changed, 40 insertions(+), 68 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index f5edb0eaba..5ca8da6230 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1305,31 +1305,21 @@ mymain(void)
     DO_TEST("serial-many-chardev",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST("parallel-tcp-chardev", NONE);
-    DO_TEST("parallel-parport-chardev",
-            NONE);
+    DO_TEST("parallel-parport-chardev", NONE);
     DO_TEST("console-compat-chardev",
-            QEMU_CAPS_DEVICE_ISA_SERIAL,
-            NONE);
+            QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST("pci-serial-dev-chardev",
             QEMU_CAPS_DEVICE_PCI_SERIAL);
 
-    DO_TEST("channel-guestfwd",
-            NONE);
-    DO_TEST("channel-virtio",
-            NONE);
-    DO_TEST("channel-virtio-state",
-            NONE);
-    DO_TEST("channel-virtio-auto",
-            NONE);
-    DO_TEST("channel-virtio-autoassign",
-            NONE);
-    DO_TEST("channel-virtio-autoadd",
-            NONE);
-    DO_TEST("console-virtio",
-            NONE);
+    DO_TEST("channel-guestfwd", NONE);
+    DO_TEST("channel-virtio", NONE);
+    DO_TEST("channel-virtio-state", NONE);
+    DO_TEST("channel-virtio-auto", NONE);
+    DO_TEST("channel-virtio-autoassign", NONE);
+    DO_TEST("channel-virtio-autoadd", NONE);
+    DO_TEST("console-virtio", NONE);
     DO_TEST("console-virtio-many",
-            QEMU_CAPS_DEVICE_ISA_SERIAL,
-            NONE);
+            QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST("console-virtio-s390",
             QEMU_CAPS_BOOTINDEX,
             QEMU_CAPS_VIRTIO_S390);
@@ -1351,8 +1341,7 @@ mymain(void)
     DO_TEST("channel-virtio-default",
             QEMU_CAPS_SPICE,
             QEMU_CAPS_CHARDEV_SPICEVMC);
-    DO_TEST("channel-virtio-unix",
-            NONE);
+    DO_TEST("channel-virtio-unix", NONE);
 
     DO_TEST("smartcard-host",
             QEMU_CAPS_CCID_EMULATED);
@@ -1377,15 +1366,12 @@ mymain(void)
     DO_TEST_PARSE_ERROR("chardev-reconnect-generated-path",
                         QEMU_CAPS_CHARDEV_RECONNECT);
 
-    DO_TEST("usb-controller",
-            NONE);
+    DO_TEST("usb-controller", NONE);
     DO_TEST("usb-piix3-controller",
-            QEMU_CAPS_PIIX3_USB_UHCI,
-            NONE);
+            QEMU_CAPS_PIIX3_USB_UHCI);
     DO_TEST("usb-ich9-ehci-addr",
             QEMU_CAPS_ICH9_USB_EHCI1);
-    DO_TEST("input-usbmouse-addr",
-            NONE);
+    DO_TEST("input-usbmouse-addr", NONE);
     DO_TEST("usb-ich9-companion",
             QEMU_CAPS_ICH9_USB_EHCI1);
     DO_TEST_PARSE_ERROR("usb-ich9-no-companion",
@@ -1394,35 +1380,25 @@ mymain(void)
             QEMU_CAPS_ICH9_USB_EHCI1,
             QEMU_CAPS_USB_HUB);
     DO_TEST("usb-hub",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST("usb-hub-autoadd",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST("usb-hub-autoadd-deluxe",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST_PARSE_ERROR("usb-hub-conflict",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST_PARSE_ERROR("usb-hub-nonexistent",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST("usb-port-missing",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST_FAILURE("usb-bus-missing",
-                    QEMU_CAPS_USB_HUB,
-                    NONE);
+                    QEMU_CAPS_USB_HUB);
     DO_TEST("usb-ports",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST_PARSE_ERROR("usb-ports-out-of-range",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST("usb-port-autoassign",
-            QEMU_CAPS_USB_HUB,
-            NONE);
+            QEMU_CAPS_USB_HUB);
     DO_TEST("usb-redir",
             QEMU_CAPS_USB_HUB,
             QEMU_CAPS_ICH9_USB_EHCI1,
@@ -1453,14 +1429,11 @@ mymain(void)
             QEMU_CAPS_PIIX3_USB_UHCI,
             QEMU_CAPS_USB_HUB,
             QEMU_CAPS_ICH9_USB_EHCI1);
-    DO_TEST("usb-none",
-            NONE);
-    DO_TEST_PARSE_ERROR("usb-none-other",
-            NONE);
+    DO_TEST("usb-none", NONE);
+    DO_TEST_PARSE_ERROR("usb-none-other", NONE);
     DO_TEST_PARSE_ERROR("usb-none-hub",
             QEMU_CAPS_USB_HUB);
-    DO_TEST_PARSE_ERROR("usb-none-usbtablet",
-            NONE);
+    DO_TEST_PARSE_ERROR("usb-none-usbtablet", NONE);
     DO_TEST("usb-controller-default-q35",
             QEMU_CAPS_DEVICE_IOH3420,
             QEMU_CAPS_PCI_OHCI,
@@ -1699,7 +1672,8 @@ mymain(void)
             QEMU_CAPS_SCSI_LSI);
 
     DO_TEST("monitor-json", NONE);
-    DO_TEST("no-shutdown", QEMU_CAPS_NO_SHUTDOWN);
+    DO_TEST("no-shutdown",
+            QEMU_CAPS_NO_SHUTDOWN);
 
     DO_TEST("seclabel-dynamic", NONE);
     DO_TEST("seclabel-dynamic-baselabel", NONE);
@@ -2568,10 +2542,13 @@ mymain(void)
     DO_TEST("kvm-pit-discard", QEMU_CAPS_KVM_PIT_TICK_POLICY);
     DO_TEST("no-kvm-pit-device", NONE);
 
-    DO_TEST("panic", QEMU_CAPS_DEVICE_PANIC);
-    DO_TEST("panic-double", QEMU_CAPS_DEVICE_PANIC);
+    DO_TEST("panic",
+            QEMU_CAPS_DEVICE_PANIC);
+    DO_TEST("panic-double",
+            QEMU_CAPS_DEVICE_PANIC);
 
-    DO_TEST("panic-no-address", QEMU_CAPS_DEVICE_PANIC);
+    DO_TEST("panic-no-address",
+            QEMU_CAPS_DEVICE_PANIC);
 
     DO_TEST("fips-enabled", QEMU_CAPS_ENABLE_FIPS);
 
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 8f2464de0a..d5010d2973 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -643,12 +643,9 @@ mymain(void)
     DO_TEST("pseries-console-virtio",
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
 
-    DO_TEST("mach-virt-serial-native",
-            NONE);
-    DO_TEST("mach-virt-serial+console-native",
-            NONE);
-    DO_TEST("mach-virt-serial-compat",
-            NONE);
+    DO_TEST("mach-virt-serial-native", NONE);
+    DO_TEST("mach-virt-serial+console-native", NONE);
+    DO_TEST("mach-virt-serial-compat", NONE);
     DO_TEST("mach-virt-serial-pci",
             QEMU_CAPS_OBJECT_GPEX,
             QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
@@ -660,10 +657,8 @@ mymain(void)
             QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
             QEMU_CAPS_DEVICE_QEMU_XHCI,
             QEMU_CAPS_DEVICE_USB_SERIAL);
-    DO_TEST("mach-virt-console-native",
-            NONE);
-    DO_TEST("mach-virt-console-virtio",
-            NONE);
+    DO_TEST("mach-virt-console-native", NONE);
+    DO_TEST("mach-virt-console-virtio", NONE);
 
     DO_TEST("balloon-device-auto", NONE);
     DO_TEST("balloon-device-period", NONE);
-- 
2.14.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]

  Powered by Linux