On 1/8/20 7:20 PM, Daniel P. Berrangé wrote:
bhyveargv2xmlmock calls virBhyveCapsBuild which in turn
calls virCPUProbeHost, probing the real host CPU. This
causes a test failure if the host CPU happens to contain
the 'arch-capabilities' feature as it triggers a call
to virHostCPUGetMSR() which fails on FreeBSD.
Fortunately we already have convenient code for mocking
the host CPU probing.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
tests/bhyveargv2xmlmock.c | 8 ++++++++
1 file changed, 8 insertions(+)
With this squashed in:
diff --git i/src/cpu/cpu.h w/src/cpu/cpu.h
index 13909bb7a4..2e8b8923ae 100644
--- i/src/cpu/cpu.h
+++ w/src/cpu/cpu.h
@@ -193,7 +193,7 @@ virCPUGetHost(virArch arch,
virDomainCapsCPUModelsPtr models);
virCPUDefPtr
-virCPUProbeHost(virArch arch);
+virCPUProbeHost(virArch arch) G_GNUC_NO_INLINE;
virCPUDefPtr
virCPUBaseline(virArch arch,
Reviewed-by: Michal Privoznik <mprivozn(a)redhat.com>
Michal