qemuxml2argvtest: Use virnuma mock

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>
This commit is contained in:
Michal Privoznik 2023-03-07 15:36:35 +01:00
parent 213b6822a8
commit 28ec9d86b3
2 changed files with 5 additions and 2 deletions

View 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' },
]

View 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