]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Use virnuma mock
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 7 Mar 2023 14:36:35 +0000 (15:36 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 15 Mar 2023 11:46:24 +0000 (12:46 +0100)
While no part of cmd line building process currently depends on a
host NUMA configuration, this will change soon. Use freshly
changed virnumamock from qemuxml2argvtest and make the mock read
NUMA data from vircaps2xmldata which seems to have the most rich
NUMA configuration.

This also means, we have to start building virnumamock
unconditionally. But this is not a problem, since nothing inside
of the mock relies on Linux specificity. The whole mock is merely
just reading files and parsing them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
tests/meson.build
tests/qemuxml2argvtest.c

index 15b049c6ac39414d9e7357afc86e9ed6c2754a66..0fd3bc62cfe0f735f922a999811c04c520d1a0e9 100644 (file)
@@ -84,6 +84,7 @@ mock_libs = [
   { 'name': 'virnetdaemonmock' },
   { 'name': 'virnetdevmock' },
   { 'name': 'virnetserverclientmock' },
+  { 'name': 'virnumamock' },
   { 'name': 'virpcimock' },
   { 'name': 'virportallocatormock' },
   { 'name': 'virprocessmock' },
@@ -94,7 +95,6 @@ if host_machine.system() == 'linux'
   mock_libs += [
     { 'name': 'virfilemock' },
     { 'name': 'virnetdevbandwidthmock' },
-    { 'name': 'virnumamock' },
     { 'name': 'virtestmock' },
     { 'name': 'virusbmock' },
   ]
index c879fa90e042083f5396173a177827c7ec286ad8..efecb7c89d78c413bcc4d55fb42e6f23fe8a037b 100644 (file)
@@ -830,6 +830,8 @@ mymain(void)
     linuxCaps = driver.caps;
     macOSCaps = testQemuCapsInitMacOS();
 
+    virFileWrapperAddPrefix("/sys/devices/system",
+                            abs_srcdir "/vircaps2xmldata/linux-basic/system");
     virFileWrapperAddPrefix(SYSCONFDIR "/qemu/firmware",
                             abs_srcdir "/qemufirmwaredata/etc/qemu/firmware");
     virFileWrapperAddPrefix(PREFIX "/share/qemu/firmware",
@@ -2911,7 +2913,8 @@ VIR_TEST_MAIN_PRELOAD(mymain,
                       VIR_TEST_MOCK("domaincaps"),
                       VIR_TEST_MOCK("virrandom"),
                       VIR_TEST_MOCK("qemucpu"),
-                      VIR_TEST_MOCK("virpci"))
+                      VIR_TEST_MOCK("virpci"),
+                      VIR_TEST_MOCK("virnuma"))
 
 #else