]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: vircaps: Remove pointless testing of virCapabilitiesHostNUMAGetCpus
authorPeter Krempa <pkrempa@redhat.com>
Fri, 17 Mar 2023 13:52:28 +0000 (14:52 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:07 +0000 (09:19 +0200)
The test case doesn't validate the returned map of cpus, just checks
that it didn't fail. We test the returned value indirectly via
qemuxml2argvtest.

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

index 30e56ccc20a9213cf208d9aed577f1158c9e6e43..2101d35198e1742414036bbbc60f9ae63b80b69e 100644 (file)
 #include "testutils.h"
 #include "testutilslxc.h"
 #include "capabilities.h"
-#include "virbitmap.h"
 
 
 #define VIR_FROM_THIS VIR_FROM_NONE
 
 
-static int
-test_virCapabilitiesGetCpusForNodemask(const void *data G_GNUC_UNUSED)
-{
-    const char *nodestr = "3,4,5,6";
-    g_autoptr(virBitmap) nodemask = NULL;
-    g_autoptr(virBitmap) cpumap = NULL;
-    g_autoptr(virCapsHostNUMA) caps = NULL;
-    int mask_size = 8;
-
-    if (!(caps = virTestCapsBuildNUMATopology(3)))
-        return -1;
-
-    if (virBitmapParse(nodestr, &nodemask, mask_size) < 0)
-        return -1;
-
-    if (!(cpumap = virCapabilitiesHostNUMAGetCpus(caps, nodemask)))
-        return -1;
-
-    return 0;
-}
-
-
 static bool G_GNUC_UNUSED
 doCapsCompare(virCaps *caps,
               int ostype,
@@ -141,9 +118,6 @@ mymain(void)
 {
     int ret = 0;
 
-    if (virTestRun("virCapabilitiesGetCpusForNodemask",
-                   test_virCapabilitiesGetCpusForNodemask, NULL) < 0)
-        ret = -1;
 #ifdef WITH_LXC
     if (virTestRun("virCapsDomainDataLookupLXC",
                    test_virCapsDomainDataLookupLXC, NULL) < 0)