[PATCH 15/24] tests: Mock virQEMUCapsProbeHVF directly in qemucapabilitiestest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux