[libvirt PATCH] qemuxml2argvmock: drop virQEMUCapsGetKVMSupportsSecureGuest

Pavel Hrdina posted 1 patch 2 years, 9 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/867ddeead2d328ef5d4071a87ac0737f6611995e.1626959819.git.phrdina@redhat.com
tests/qemuxml2argvmock.c | 16 ----------------
1 file changed, 16 deletions(-)
[libvirt PATCH] qemuxml2argvmock: drop virQEMUCapsGetKVMSupportsSecureGuest
Posted by Pavel Hrdina 2 years, 9 months ago
It is actually not needed because in qemuxml2argvtest we preload
domaincapsmock as well.

Reported-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 tests/qemuxml2argvmock.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index d7f77eabf7..2265492f1e 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -41,7 +41,6 @@
 #include "virutil.h"
 #include "qemu/qemu_interface.h"
 #include "qemu/qemu_command.h"
-#include "qemu/qemu_capabilities.h"
 #include <time.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -302,18 +301,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

Re: [libvirt PATCH] qemuxml2argvmock: drop virQEMUCapsGetKVMSupportsSecureGuest
Posted by Michal Prívozník 2 years, 9 months ago
On 7/22/21 3:17 PM, Pavel Hrdina wrote:
> It is actually not needed because in qemuxml2argvtest we preload
> domaincapsmock as well.
> 
> Reported-by: Michal Privoznik <mprivozn@redhat.com>
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
>  tests/qemuxml2argvmock.c | 16 ----------------
>  1 file changed, 16 deletions(-)
> 

D'oh! I've just sent the same patch. I had it ready but was waiting for
my perl packages to upgrade, because git-send-email was unhappy about
openssl lib version mismatch :-)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal