From 3caf0339168b99d27a4385b9f2bba4a4c2b29416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 6 Aug 2019 16:45:14 +0100 Subject: [PATCH] tests: fix debug messages wrt selinux context when test fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Michal Privoznik Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- tests/viridentitytest.c | 3 ++- tests/virnetserverclienttest.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/viridentitytest.c b/tests/viridentitytest.c index 17d6e5f3b3..3c9eb8683a 100644 --- a/tests/viridentitytest.c +++ b/tests/viridentitytest.c @@ -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; } diff --git a/tests/virnetserverclienttest.c b/tests/virnetserverclienttest.c index 5015273e55..aaecfe7987 100644 --- a/tests/virnetserverclienttest.c +++ b/tests/virnetserverclienttest.c @@ -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; }