From fb267eec985027bb2c96db256f8e517c09b45e34 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 5 Jul 2017 15:30:05 +0100 Subject: [PATCH 2/3] test/dbus-daemon: Unset DBUS_SESSION_BUS_ADDRESS When we intend to exercise the default behaviour in the absence of XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS, it would help if we unset DBUS_SESSION_BUS_ADDRESS. Otherwise we'll just connect to the real session bus, if there is one. Signed-off-by: Simon McVittie --- test/dbus-daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index 99d2bc63..d940f431 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -147,6 +147,7 @@ setup (Fixture *f, /* we're relying on being single-threaded for this to be safe */ f->saved_runtime_dir = g_strdup (g_getenv ("XDG_RUNTIME_DIR")); g_setenv ("XDG_RUNTIME_DIR", f->tmp_runtime_dir, TRUE); + g_unsetenv ("DBUS_SESSION_BUS_ADDRESS"); } address = test_get_dbus_daemon (config ? config->config_file : NULL, -- 2.13.2