]> xenbits.xensource.com Git - libvirt.git/commitdiff
domaincapstest: Propagate variant name into doTestQemuInternal
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Mar 2023 14:27:47 +0000 (15:27 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:06 +0000 (09:19 +0200)
Use it to format test file name as in other cases. Currently
domaincapstest will not run for any unknown variant. This patch is meant
to simplify the review of patches doing actual functional changes.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/domaincapstest.c

index 20163e0a72a1fa6a705c68894100dd6711aea8c1..a34eb820155ae3cfe98a62f2bbcc47872af3ccee 100644 (file)
@@ -246,6 +246,7 @@ static int
 doTestQemuInternal(const char *version,
                    const char *machine,
                    const char *arch,
+                   const char *variant,
                    virDomainVirtType type,
                    void *opaque)
 {
@@ -284,8 +285,8 @@ doTestQemuInternal(const char *version,
     else
         mach = g_strdup("");
 
-    data.name = name = g_strdup_printf("qemu_%s%s%s.%s",
-                                       version, typestr, mach, arch);
+    data.name = name = g_strdup_printf("qemu_%s%s%s.%s%s",
+                                       version, typestr, mach, arch, variant);
 
     if (STRPREFIX(version, "3.") ||
         STRPREFIX(version, "4.") ||
@@ -329,15 +330,15 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
          *   - KVM with Q35 machine
          *   - TCG with default machine
          */
-        if (doTestQemuInternal(version, NULL, arch,
+        if (doTestQemuInternal(version, NULL, arch, variant,
                                VIR_DOMAIN_VIRT_KVM, opaque) < 0)
             ret = -1;
 
-        if (doTestQemuInternal(version, "q35", arch,
+        if (doTestQemuInternal(version, "q35", arch, variant,
                                VIR_DOMAIN_VIRT_KVM, opaque) < 0)
             ret = -1;
 
-        if (doTestQemuInternal(version, NULL, arch,
+        if (doTestQemuInternal(version, NULL, arch, variant,
                                VIR_DOMAIN_VIRT_QEMU, opaque) < 0)
             ret = -1;
     } else if (STREQ(arch, "aarch64")) {
@@ -346,11 +347,11 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
          *   - KVM with default machine
          *   - KVM with virt machine
          */
-        if (doTestQemuInternal(version, NULL, arch,
+        if (doTestQemuInternal(version, NULL, arch, variant,
                                VIR_DOMAIN_VIRT_KVM, opaque) < 0)
             ret = -1;
 
-        if (doTestQemuInternal(version, "virt", arch,
+        if (doTestQemuInternal(version, "virt", arch, variant,
                                VIR_DOMAIN_VIRT_KVM, opaque) < 0)
             ret = -1;
     } else if (STRPREFIX(arch, "riscv")) {
@@ -359,15 +360,15 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
          *   - KVM with virt machine
          *   - TCG with virt machine
          */
-        if (doTestQemuInternal(version, "virt", arch,
+        if (doTestQemuInternal(version, "virt", arch, variant,
                                VIR_DOMAIN_VIRT_KVM, opaque) < 0)
             ret = -1;
 
-        if (doTestQemuInternal(version, "virt", arch,
+        if (doTestQemuInternal(version, "virt", arch, variant,
                                VIR_DOMAIN_VIRT_QEMU, opaque) < 0)
             ret = -1;
     } else {
-        if (doTestQemuInternal(version, NULL, arch,
+        if (doTestQemuInternal(version, NULL, arch, variant,
                                VIR_DOMAIN_VIRT_KVM, opaque) < 0)
             ret = -1;
     }