summaryrefslogtreecommitdiff
path: root/test/internals
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-07-21 10:29:10 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2016-08-11 16:41:16 +0100
commit8ef699dd20c8ca7ec0afe6147655f2cb6d4117fc (patch)
treefd74f49d3778944904b4ace3e1b0ec0b393258ae /test/internals
parenta2271779184676b9ff1f5b4d660a85abc63c263f (diff)
downloaddbus-8ef699dd20c8ca7ec0afe6147655f2cb6d4117fc.tar.gz
_dbus_init_system_log: record a syslog tag (executable name)
Instead of hard-coding "dbus", report what the executable really is. Signed-off-by: Simon McVittie <smcv@debian.org> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97009
Diffstat (limited to 'test/internals')
-rw-r--r--test/internals/syslog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/internals/syslog.c b/test/internals/syslog.c
index 805c5784..c0c1f910 100644
--- a/test/internals/syslog.c
+++ b/test/internals/syslog.c
@@ -56,7 +56,7 @@ test_syslog (Fixture *f,
#ifndef G_OS_WIN32
if (g_test_trap_fork (0, 0))
{
- _dbus_init_system_log (FALSE);
+ _dbus_init_system_log ("test-syslog", FALSE);
_dbus_system_log (DBUS_SYSTEM_LOG_FATAL, MESSAGE "%d", 23);
/* should not be reached: exit 0 so the assertion in the main process
* will fail */
@@ -68,7 +68,7 @@ test_syslog (Fixture *f,
if (g_test_trap_fork (0, 0))
{
- _dbus_init_system_log (FALSE);
+ _dbus_init_system_log ("test-syslog", FALSE);
_dbus_system_log (DBUS_SYSTEM_LOG_INFO, MESSAGE "%d", 42);
_dbus_system_log (DBUS_SYSTEM_LOG_WARNING, MESSAGE "%d", 45);
_dbus_system_log (DBUS_SYSTEM_LOG_SECURITY, MESSAGE "%d", 666);
@@ -79,7 +79,7 @@ test_syslog (Fixture *f,
g_test_trap_assert_stderr ("*" MESSAGE "42\n*" MESSAGE "45\n*" MESSAGE "666\n*");
#endif
/* manual test (this is the best we can do on Windows) */
- _dbus_init_system_log (FALSE);
+ _dbus_init_system_log ("test-syslog", FALSE);
_dbus_system_log (DBUS_SYSTEM_LOG_INFO, MESSAGE "%d", 42);
_dbus_system_log (DBUS_SYSTEM_LOG_WARNING, MESSAGE "%d", 45);
_dbus_system_log (DBUS_SYSTEM_LOG_SECURITY, MESSAGE "%d", 666);