[PATCH] qemuxml2argvmock: Deduplicate some code

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

 



A stub implementation for virQEMUCapsGetKVMSupportsSecureGuest()
was added recently. However, the very same implementation was
added to domaincapsmock.c which is also loaded by
qemuxml2argvtest and thus one occurrence of the stub can be
dropped.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/qemuxml2argvmock.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index d7f77eabf7..9235c785b2 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -302,18 +302,3 @@ virIdentityEnsureSystemToken(void)
 {
     return g_strdup("3de80bcbf22d4833897f1638e01be9b2");
 }
-
-static bool (*real_virQEMUCapsGetKVMSupportsSecureGuest)(virQEMUCaps *qemuCaps);
-
-bool
-virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps)
-{
-    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT) &&
-        virQEMUCapsGet(qemuCaps, QEMU_CAPS_S390_PV_GUEST))
-        return true;
-
-    if (!real_virQEMUCapsGetKVMSupportsSecureGuest)
-        VIR_MOCK_REAL_INIT(virQEMUCapsGetKVMSupportsSecureGuest);
-
-    return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps);
-}
-- 
2.31.1




[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