]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Mock virQEMUCapsProbeHVF directly in qemucapabilitiestest
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Mar 2023 17:16:06 +0000 (18:16 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:06 +0000 (09:19 +0200)
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>
tests/domaincapsmock.c
tests/qemucapabilitiestest.c

index 8f27eeb3a1e9ae64615b8bd8a420dc0d36fdeb26..d382d06e2718523f25e3c624e005954bbac297a2 100644 (file)
@@ -51,12 +51,6 @@ virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps)
 
     return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps);
 }
-
-bool
-virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
-{
-    return false;
-}
 #endif
 
 int
index 7575f9fd440e5859db26e08599fb439ca845cd5b..dcc965130e44c824d67c6806ee04908525044bb2 100644 (file)
@@ -45,6 +45,13 @@ struct _testQemuData {
 };
 
 
+bool
+virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
+{
+    return false;
+}
+
+
 static int
 testQemuDataInit(testQemuData *data)
 {