|
|
e8e641 |
From 2349387743e56e658fb56fcdadd522e6df9f42f2 Mon Sep 17 00:00:00 2001
|
|
|
e8e641 |
Message-Id: <2349387743e56e658fb56fcdadd522e6df9f42f2@dist-git>
|
|
|
e8e641 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
e8e641 |
Date: Tue, 7 Mar 2023 15:36:35 +0100
|
|
|
e8e641 |
Subject: [PATCH] qemuxml2argvtest: Use virnuma mock
|
|
|
e8e641 |
|
|
|
e8e641 |
While no part of cmd line building process currently depends on a
|
|
|
e8e641 |
host NUMA configuration, this will change soon. Use freshly
|
|
|
e8e641 |
changed virnumamock from qemuxml2argvtest and make the mock read
|
|
|
e8e641 |
NUMA data from vircaps2xmldata which seems to have the most rich
|
|
|
e8e641 |
NUMA configuration.
|
|
|
e8e641 |
|
|
|
e8e641 |
This also means, we have to start building virnumamock
|
|
|
e8e641 |
unconditionally. But this is not a problem, since nothing inside
|
|
|
e8e641 |
of the mock relies on Linux specificity. The whole mock is merely
|
|
|
e8e641 |
just reading files and parsing them.
|
|
|
e8e641 |
|
|
|
e8e641 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
e8e641 |
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
|
|
|
e8e641 |
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
e8e641 |
(cherry picked from commit 28ec9d86b3db4bd9ea29891350366ffa6895d4e9)
|
|
|
e8e641 |
|
|
|
e8e641 |
Conflicts:
|
|
|
e8e641 |
- tests/qemuxml2argvtest.c: Context, some cleanup patches (e.g.
|
|
|
e8e641 |
v9.2.0-rc1~191) are not backported.
|
|
|
e8e641 |
|
|
|
e8e641 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2185039
|
|
|
e8e641 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
e8e641 |
---
|
|
|
e8e641 |
tests/meson.build | 2 +-
|
|
|
e8e641 |
tests/qemuxml2argvtest.c | 5 ++++-
|
|
|
e8e641 |
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
|
e8e641 |
|
|
|
e8e641 |
diff --git a/tests/meson.build b/tests/meson.build
|
|
|
e8e641 |
index 3365dce307..6d0e62c02f 100644
|
|
|
e8e641 |
--- a/tests/meson.build
|
|
|
e8e641 |
+++ b/tests/meson.build
|
|
|
e8e641 |
@@ -84,6 +84,7 @@ mock_libs = [
|
|
|
e8e641 |
{ 'name': 'virnetdaemonmock' },
|
|
|
e8e641 |
{ 'name': 'virnetdevmock' },
|
|
|
e8e641 |
{ 'name': 'virnetserverclientmock' },
|
|
|
e8e641 |
+ { 'name': 'virnumamock' },
|
|
|
e8e641 |
{ 'name': 'virpcimock' },
|
|
|
e8e641 |
{ 'name': 'virportallocatormock' },
|
|
|
e8e641 |
{ 'name': 'virprocessmock' },
|
|
|
e8e641 |
@@ -94,7 +95,6 @@ if host_machine.system() == 'linux'
|
|
|
e8e641 |
mock_libs += [
|
|
|
e8e641 |
{ 'name': 'virfilemock' },
|
|
|
e8e641 |
{ 'name': 'virnetdevbandwidthmock' },
|
|
|
e8e641 |
- { 'name': 'virnumamock' },
|
|
|
e8e641 |
{ 'name': 'virtestmock' },
|
|
|
e8e641 |
{ 'name': 'virusbmock' },
|
|
|
e8e641 |
]
|
|
|
e8e641 |
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
|
|
|
e8e641 |
index e23b32e96a..3fb2d5dc74 100644
|
|
|
e8e641 |
--- a/tests/qemuxml2argvtest.c
|
|
|
e8e641 |
+++ b/tests/qemuxml2argvtest.c
|
|
|
e8e641 |
@@ -872,6 +872,8 @@ mymain(void)
|
|
|
e8e641 |
VIR_FREE(driver.config->nvramDir);
|
|
|
e8e641 |
driver.config->nvramDir = g_strdup("/var/lib/libvirt/qemu/nvram");
|
|
|
e8e641 |
|
|
|
e8e641 |
+ virFileWrapperAddPrefix("/sys/devices/system",
|
|
|
e8e641 |
+ abs_srcdir "/vircaps2xmldata/linux-basic/system");
|
|
|
e8e641 |
virFileWrapperAddPrefix(SYSCONFDIR "/qemu/firmware",
|
|
|
e8e641 |
abs_srcdir "/qemufirmwaredata/etc/qemu/firmware");
|
|
|
e8e641 |
virFileWrapperAddPrefix(PREFIX "/share/qemu/firmware",
|
|
|
e8e641 |
@@ -2999,7 +3001,8 @@ VIR_TEST_MAIN_PRELOAD(mymain,
|
|
|
e8e641 |
VIR_TEST_MOCK("domaincaps"),
|
|
|
e8e641 |
VIR_TEST_MOCK("virrandom"),
|
|
|
e8e641 |
VIR_TEST_MOCK("qemucpu"),
|
|
|
e8e641 |
- VIR_TEST_MOCK("virpci"))
|
|
|
e8e641 |
+ VIR_TEST_MOCK("virpci"),
|
|
|
e8e641 |
+ VIR_TEST_MOCK("virnuma"))
|
|
|
e8e641 |
|
|
|
e8e641 |
#else
|
|
|
e8e641 |
|
|
|
e8e641 |
--
|
|
|
e8e641 |
2.40.0
|