From bc48522cceed863fbe5fda0179a17fc13f56a41f Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 8 Mar 2023 15:27:47 +0100 Subject: [PATCH] domaincapstest: Propagate variant name into doTestQemuInternal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Martin Kletzander Reviewed-by: Ján Tomko --- tests/domaincapstest.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 20163e0a72..a34eb82015 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -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; }