summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2012-07-24 12:57:09 +0200
committerMiloslav Trmač <mitr@redhat.com>2012-07-30 07:28:36 +0200
commit806e452f28c55ee08d5a433978967fb20de02d31 (patch)
treef781654115123d11a1c74ee47f9afb00e4d31e6f /t
parent410e2d500152ed176ba8695fb9a938b0b9bfb545 (diff)
downloadlibumberlog-806e452f28c55ee08d5a433978967fb20de02d31.tar.gz
libumberlog-806e452f28c55ee08d5a433978967fb20de02d31.tar.xz
libumberlog-806e452f28c55ee08d5a433978967fb20de02d31.zip
Default ident (log tag) to program_invocation_short_name
This is a glibc variable, so leave the "program" field missing on platforms that don't support it. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 't')
-rw-r--r--t/test_umberlog.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/test_umberlog.c b/t/test_umberlog.c
index 92644a6..2548001 100644
--- a/t/test_umberlog.c
+++ b/t/test_umberlog.c
@@ -258,7 +258,11 @@ START_TEST (test_closelog)
free (msg);
verify_value (jo, "facility", "local0");
+#ifdef HAVE_PROGRAM_INVOCATION_SHORT_NAME
+ verify_value (jo, "program", "test_umberlog");
+#else
verify_value_missing (jo, "program");
+#endif
json_object_put (jo);
}
@@ -308,7 +312,11 @@ START_TEST (test_openlog_defaults)
free (msg);
verify_value (jo, "facility", "user");
+#ifdef HAVE_PROGRAM_INVOCATION_SHORT_NAME
+ verify_value (jo, "program", "test_umberlog");
+#else
verify_value_missing (jo, "program");
+#endif
json_object_put (jo);
closelog ();