]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix nodeinfotest on NUMA machines
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 13 Apr 2010 10:39:16 +0000 (11:39 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 13 Apr 2010 14:50:07 +0000 (15:50 +0100)
The nodeinfotest was reliant on the host NUMA topology, but all
the test data files assumed 1 single NUMA node. This test thus
failed on any NUMA machine with > 1 node

* tests/nodeinfotest.c: Hardcode 1 single numa node

tests/nodeinfotest.c

index 768fd4d4cd418f0ecb12758520e20c51f2d84ddb..9aeb459924bf619e14d59e0d97aec0a372be45eb 100644 (file)
@@ -46,6 +46,11 @@ static int linuxTestCompareFiles(const char *cpuinfofile, const char *outputfile
     }
     fclose(cpuinfo);
 
+    /* 'nodes' is filled using libnuma.so from current machine
+     * topology, which makes it unsuitable for the test suite
+     * so blank it to a predictable value */
+    nodeinfo.nodes = 1;
+
     snprintf(actualData, MAX_FILE,
              "CPUs: %u, MHz: %u, Nodes: %u, Cores: %u\n",
              nodeinfo.cpus, nodeinfo.mhz, nodeinfo.nodes, nodeinfo.cores);