[libvirt PATCH 3/3] tests: Mock virQEMUCapsProbeHVF()

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

 



Successfully returning without doing anything is what the
function already does on non-Apple platforms.

When building on macOS, however, the check for HVF availability
will be performed. When running on bare metal, that will result
in the QEMU_CAPS_HVF flag being added to the virQEMUCaps
instance, and a bunch of error messages along the lines of

  In 'tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml':
  Offset 7557
  Expect [c]
  Actual [hvf'/>
    <flag name=‘c]

showing up.

Up until now we hadn't noticed because our CI jobs run in VMs,
where HVF support is not available.

Reported-by: Christophe de Dinechin <cdupontd@xxxxxxxxxx>
Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 tests/domaincapsmock.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/domaincapsmock.c b/tests/domaincapsmock.c
index d382d06e27..4d53e48c48 100644
--- a/tests/domaincapsmock.c
+++ b/tests/domaincapsmock.c
@@ -51,6 +51,12 @@ virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps)
 
     return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps);
 }
+
+int
+virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
+{
+    return 0;
+}
 #endif
 
 int
-- 
2.37.1




[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