[PATCH 10/31] tests: vircaps: Remove pointless testing of virCapabilitiesHostNUMAGetCpus

Peter Krempa pkrempa at redhat.com
Thu Mar 30 13:38:04 UTC 2023


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 at redhat.com>
---
 tests/vircapstest.c | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/tests/vircapstest.c b/tests/vircapstest.c
index 30e56ccc20..2101d35198 100644
--- a/tests/vircapstest.c
+++ b/tests/vircapstest.c
@@ -22,34 +22,11 @@
 #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)
-- 
2.39.2



More information about the libvir-list mailing list