]> xenbits.xensource.com Git - libvirt.git/commitdiff
vircapstest: Remove 'qemu' testing
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Mar 2023 23:10:48 +0000 (00:10 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:07 +0000 (09:19 +0200)
We have testing based on real capabilities in 'qemucaps2xmltest' for
qemu guest related data and 'vircaps2xmltest' tests the host data
gathering. The testing done here makes no sense.

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

index be93325307e98026d35a6b4144d062a8ebc5fbb7..30e56ccc20a9213cf208d9aed577f1158c9e6e43 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "testutils.h"
 #include "testutilslxc.h"
-#include "testutilsqemu.h"
 #include "capabilities.h"
 #include "virbitmap.h"
 
@@ -51,25 +50,6 @@ test_virCapabilitiesGetCpusForNodemask(const void *data G_GNUC_UNUSED)
 }
 
 
-static bool G_GNUC_UNUSED
-doCapsExpectFailure(virCaps *caps,
-                    int ostype,
-                    virArch arch,
-                    int domaintype,
-                    const char *emulator,
-                    const char *machinetype)
-{
-    virCapsDomainData *data = virCapabilitiesDomainDataLookup(caps, ostype,
-        arch, domaintype, emulator, machinetype);
-
-    if (data) {
-        VIR_FREE(data);
-        return false;
-    }
-
-    return true;
-}
-
 static bool G_GNUC_UNUSED
 doCapsCompare(virCaps *caps,
               int ostype,
@@ -135,55 +115,6 @@ doCapsCompare(virCaps *caps,
     if (!doCapsCompare(caps, o, a, d, e, m, fo, fa, fd, fe, fm)) \
         ret = -1;
 
-#define CAPS_EXPECT_ERR(o, a, d, e, m) \
-    if (!doCapsExpectFailure(caps, o, a, d, e, m)) \
-        ret = -1;
-
-#ifdef WITH_QEMU
-static int
-test_virCapsDomainDataLookupQEMU(const void *data G_GNUC_UNUSED)
-{
-    int ret = 0;
-    g_autoptr(virCaps) caps = NULL;
-
-    if (!(caps = testQemuCapsInit()))
-        return -1;
-
-    /* Checking each parameter individually */
-    CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
-        VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,
-        VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-x86_64", "pc");
-    CAPSCOMP(VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
-        VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,
-        VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-x86_64", "pc");
-    CAPSCOMP(-1, VIR_ARCH_AARCH64, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
-        VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_AARCH64,
-        VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-aarch64", "virt");
-    CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_KVM, NULL, NULL,
-        VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,
-        VIR_DOMAIN_VIRT_KVM, "/usr/bin/qemu-system-x86_64", "pc");
-    CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, "/usr/bin/qemu-system-ppc64", NULL,
-        VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64,
-        VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-ppc64", "pseries");
-
-    CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, "pseries",
-        VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64,
-        VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-ppc64", "pseries");
-    CAPSCOMP(-1, VIR_ARCH_PPC64LE, VIR_DOMAIN_VIRT_NONE, NULL, "pseries",
-        VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64LE,
-        VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-ppc64", "pseries");
-
-    CAPS_EXPECT_ERR(VIR_DOMAIN_OSTYPE_LINUX, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, NULL);
-    CAPS_EXPECT_ERR(-1, VIR_ARCH_PPC64LE, VIR_DOMAIN_VIRT_NONE, NULL, "pc");
-    CAPS_EXPECT_ERR(-1, VIR_ARCH_MIPS, VIR_DOMAIN_VIRT_NONE, NULL, NULL);
-    CAPS_EXPECT_ERR(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE,
-        "/usr/bin/qemu-system-aarch64", "pc");
-    CAPS_EXPECT_ERR(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_VMWARE, NULL, "pc");
-
-    return ret;
-}
-#endif /* WITH_QEMU */
-
 #ifdef WITH_LXC
 static int
 test_virCapsDomainDataLookupLXC(const void *data G_GNUC_UNUSED)
@@ -213,11 +144,6 @@ mymain(void)
     if (virTestRun("virCapabilitiesGetCpusForNodemask",
                    test_virCapabilitiesGetCpusForNodemask, NULL) < 0)
         ret = -1;
-#ifdef WITH_QEMU
-    if (virTestRun("virCapsDomainDataLookupQEMU",
-                   test_virCapsDomainDataLookupQEMU, NULL) < 0)
-        ret = -1;
-#endif
 #ifdef WITH_LXC
     if (virTestRun("virCapsDomainDataLookupLXC",
                    test_virCapsDomainDataLookupLXC, NULL) < 0)