From: Andrea Bolognani Date: Wed, 10 Aug 2022 09:42:37 +0000 (+0200) Subject: tests: Mock virQEMUCapsProbeHVF() X-Git-Tag: v8.7.0-rc1~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f14dbccbc9c5daa3aed31798a6413399820cf53;p=thirdparty%2Flibvirt.git tests: Mock virQEMUCapsProbeHVF() 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'/> Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko Reviewed-by: Christophe de Dinechin Tested-by: Christophe de Dinechin --- 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