From: Peter Krempa Date: Wed, 8 Mar 2023 17:16:06 +0000 (+0100) Subject: tests: Mock virQEMUCapsProbeHVF directly in qemucapabilitiestest X-Git-Tag: v9.3.0-rc1~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f85c31bd811e945065c3f78a2cdbc893e4d5d82;p=thirdparty%2Flibvirt.git tests: Mock virQEMUCapsProbeHVF directly in qemucapabilitiestest It needs to be mocked only for 'qemucapabilitiestest'. Additionally moving it here will allow to control the return value based on the test data which will be required for testing dumps from HVF accelerated qemu. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander Reviewed-by: Ján Tomko --- diff --git a/tests/domaincapsmock.c b/tests/domaincapsmock.c index 8f27eeb3a1..d382d06e27 100644 --- a/tests/domaincapsmock.c +++ b/tests/domaincapsmock.c @@ -51,12 +51,6 @@ virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps) return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps); } - -bool -virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED) -{ - return false; -} #endif int diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index 7575f9fd44..dcc965130e 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -45,6 +45,13 @@ struct _testQemuData { }; +bool +virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED) +{ + return false; +} + + static int testQemuDataInit(testQemuData *data) {