From: Peter Krempa Date: Fri, 17 Mar 2023 13:52:28 +0000 (+0100) Subject: tests: vircaps: Remove pointless testing of virCapabilitiesHostNUMAGetCpus X-Git-Tag: v9.3.0-rc1~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=702620bd6b8062ee9b2d02c9944e4224109c77f5;p=thirdparty%2Flibvirt.git tests: vircaps: Remove pointless testing of virCapabilitiesHostNUMAGetCpus 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 Reviewed-by: Ján Tomko --- 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)