]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
securityselinuxlabeltest: Add debug statements for testUserXattrEnabled return value
authorPeter Krempa <pkrempa@redhat.com>
Fri, 23 Jul 2021 13:25:44 +0000 (15:25 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 26 Jul 2021 19:08:17 +0000 (21:08 +0200)
I've noticed the test being skipped in my build scenario (tmpfs) and
the output doesn't make it clear why it's happening.

Add debug statements for the various return values of
testUserXattrEnabled.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/securityselinuxlabeltest.c

index b1a6735d335756c3f0c24049e245a1c804f46651..f7dd3c866a6ba6c7bb233799e7dd6bfad0f5fe80 100644 (file)
@@ -325,10 +325,15 @@ mymain(void)
     int rc = testUserXattrEnabled();
     g_autoptr(virQEMUCaps) qemuCaps = NULL;
 
-    if (rc < 0)
+    if (rc < 0) {
+        VIR_TEST_VERBOSE("failed to determine xattr support");
         return EXIT_FAILURE;
-    if (!rc)
+    }
+
+    if (rc == 0) {
+        VIR_TEST_VERBOSE("xattr unsupported");
         return EXIT_AM_SKIP;
+    }
 
     if (!(mgr = virSecurityManagerNew("selinux", "QEMU",
                                       VIR_SECURITY_MANAGER_DEFAULT_CONFINED |