[PATCH] viridentitytest: Drop #if !WITH_SELINUX block

Ján Tomko jtomko at redhat.com
Fri Nov 6 10:17:13 UTC 2020


On a Friday in 2020, Michal Privoznik wrote:
>The whole test is built only if SELinux secdriver is enabled and
>thus the !WITH_SELINUX can't be satisfied really.

Which seems like a mistake. testIdentityAttrs does not depend on SELinux
and the virIdentity APIs it tests are called even from code that does
not require SELinux.

Jano

>Also, the block
>references @ret variable which exists no more after v5.9.0-rc1~269.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> tests/viridentitytest.c | 8 --------
> 1 file changed, 8 deletions(-)
>
>diff --git a/tests/viridentitytest.c b/tests/viridentitytest.c
>index fd01eeaa80..7a7101ba2a 100644
>--- a/tests/viridentitytest.c
>+++ b/tests/viridentitytest.c
>@@ -85,14 +85,6 @@ static int testIdentityGetSystem(const void *data)
>     const char *val;
>     int rc;
>
>-#if !WITH_SELINUX
>-    if (context) {
>-        VIR_DEBUG("libvirt not compiled with SELinux, skipping this test");
>-        ret = EXIT_AM_SKIP;
>-        return -1;
>-    }
>-#endif
>-
>     if (!(ident = virIdentityGetSystem())) {
>         VIR_DEBUG("Unable to get system identity");
>         return -1;
>-- 
>2.26.2
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201106/34a2f13e/attachment-0001.sig>


More information about the libvir-list mailing list