]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: fix debug messages wrt selinux context when test fails
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 6 Aug 2019 15:45:14 +0000 (16:45 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 16 Sep 2019 10:25:17 +0000 (11:25 +0100)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tests/viridentitytest.c
tests/virnetserverclienttest.c

index 17d6e5f3b3628e703f9f68720b6497a1f68ee7f1..3c9eb8683a303c2433a806fa960b7f9d67a89975 100644 (file)
@@ -187,7 +187,8 @@ static int testIdentityGetSystem(const void *data)
         goto cleanup;
 
     if (STRNEQ_NULLABLE(val, context)) {
-        VIR_DEBUG("Unexpected SELinux context attribute");
+        VIR_DEBUG("Want SELinux context '%s' got '%s'",
+                  context, val);
         goto cleanup;
     }
 
index 5015273e55ba0890b868e61c143bd86398648e83..aaecfe7987c447fd39b792d400be9e4576a67245 100644 (file)
@@ -140,8 +140,8 @@ static int testIdentity(const void *opaque ATTRIBUTE_UNUSED)
         goto cleanup;
     }
     if (STRNEQ_NULLABLE("foo_u:bar_r:wizz_t:s0-s0:c0.c1023", gotSELinuxContext)) {
-        fprintf(stderr, "Want groupname 'foo_u:bar_r:wizz_t:s0-s0:c0.c1023' got '%s'\n",
-                NULLSTR(gotGroupID));
+        fprintf(stderr, "Want SELinux context 'foo_u:bar_r:wizz_t:s0-s0:c0.c1023' got '%s'\n",
+                NULLSTR(gotSELinuxContext));
         goto cleanup;
     }