bhyvexml2argvmock: Provide virCPUProbeHost()

The bhyvexml2argvmock is loaded by bhyvexml2argvtest which calls
virBhyveCapsBuild() which in turn calls virCPUProbeHost(). To
make our test environment stable, it shouldn't depend on actual
CPU and thus mocked implementation for virCPUProbeHost should be
offered. Surprisingly, this is done in bhyveargv2xmlmock but not
in bhyvexml2argvmock. Until now.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
This commit is contained in:
Michal Privoznik committed 2026-02-04 08:29:38 +01:00
1 parent 2f1421d83b
commit fcc5910557
1 file changed
+8
+8
View File
@@ -8,6 +8,8 @@
#include "virnetdevtap.h"
#include "virmock.h"
#include "internal.h"
#include "cpu/cpu.h"
#include "testutilshostcpus.h"
#define VIR_FROM_THIS VIR_FROM_BHYVE
@@ -89,3 +91,9 @@ int bind(int sockfd G_GNUC_UNUSED,
{
return 0;
}
virCPUDef *
virCPUProbeHost(virArch arch)
{
return testUtilsHostCpusGetDefForArch(arch);
}