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 <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-03-08 18:16:06 +01:00
parent 6af47df5ac
commit 1f85c31bd8
2 changed files with 7 additions and 6 deletions

View File

@ -51,12 +51,6 @@ virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps)
return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps);
}
bool
virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
{
return false;
}
#endif
int

View File

@ -45,6 +45,13 @@ struct _testQemuData {
};
bool
virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
{
return false;
}
static int
testQemuDataInit(testQemuData *data)
{