[PATCH] viridentitytest: Run more frequently

Michal Privoznik mprivozn at redhat.com
Mon Nov 9 11:19:09 UTC 2020


The viridentitytest tests our viridentity module which is
compiled on all platforms and OSes. There is no need to have
SELinux secdriver as individual test cases are skipped if SELinux
is missing.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---

Successfully build here:

https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/213586713

While technically this is a v2 of:

https://www.redhat.com/archives/libvir-list/2020-November/msg00308.html

it's implementing completely different approach and thus I did not mark
it as v2.

 tests/meson.build       | 2 +-
 tests/viridentitytest.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/meson.build b/tests/meson.build
index 8decdfa20c..9f0051303d 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -312,6 +312,7 @@ tests += [
   { 'name': 'virfirewalltest' },
   { 'name': 'virhostcputest', 'link_whole': [ test_file_wrapper_lib ] },
   { 'name': 'virhostdevtest' },
+  { 'name': 'viridentitytest' },
   { 'name': 'viriscsitest' },
   { 'name': 'virkeycodetest' },
   { 'name': 'virkmodtest' },
@@ -480,7 +481,6 @@ if conf.has('WITH_SECDRIVER_SELINUX')
   if conf.has('WITH_LIBATTR')
     tests += [
       { 'name': 'securityselinuxtest' },
-      { 'name': 'viridentitytest' },
     ]
 
     if conf.has('WITH_QEMU')
diff --git a/tests/viridentitytest.c b/tests/viridentitytest.c
index fd01eeaa80..afb9fdaec4 100644
--- a/tests/viridentitytest.c
+++ b/tests/viridentitytest.c
@@ -88,8 +88,7 @@ static int testIdentityGetSystem(const void *data)
 #if !WITH_SELINUX
     if (context) {
         VIR_DEBUG("libvirt not compiled with SELinux, skipping this test");
-        ret = EXIT_AM_SKIP;
-        return -1;
+        return EXIT_AM_SKIP;
     }
 #endif
 
-- 
2.26.2




More information about the libvir-list mailing list