From 1f85c31bd811e945065c3f78a2cdbc893e4d5d82 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 8 Mar 2023 18:16:06 +0100 Subject: [PATCH] tests: Mock virQEMUCapsProbeHVF directly in qemucapabilitiestest MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/domaincapsmock.c | 6 ------ tests/qemucapabilitiestest.c | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) 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) { -- 2.47.2