The whole test is built only if SELinux secdriver is enabled and
thus the !WITH_SELINUX can't be satisfied really. Also, the block
references @ret variable which exists no more after v5.9.0-rc1~269.
Signed-off-by: Michal Privoznik <mprivozn@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
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@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
>
On 11/6/20 11:17 AM, Ján Tomko wrote: > 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. > Well, it's like that for 6+ years :-) cdc5f3f1a3a960cbc988ad6a21078f135c936457 But okay, let me see if I can make the test run more often. Michal
© 2016 - 2026 Red Hat, Inc.