Re: [PATCH] tests: avoid probing host CPU from bhyve test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
  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@xxxxxxxxxx>

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux