diff options
Diffstat (limited to 'debian/patches/Add-a-regression-test-for-connecting-to-XDG_RUNTIME_.patch')
-rw-r--r-- | debian/patches/Add-a-regression-test-for-connecting-to-XDG_RUNTIME_.patch | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/debian/patches/Add-a-regression-test-for-connecting-to-XDG_RUNTIME_.patch b/debian/patches/Add-a-regression-test-for-connecting-to-XDG_RUNTIME_.patch index aa6f96a0..855f87a9 100644 --- a/debian/patches/Add-a-regression-test-for-connecting-to-XDG_RUNTIME_.patch +++ b/debian/patches/Add-a-regression-test-for-connecting-to-XDG_RUNTIME_.patch @@ -6,11 +6,12 @@ Subject: Add a regression test for connecting to XDG_RUNTIME_DIR/bus by This test requires the unix:runtime=yes sub-transport from Bug #61303. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301 +Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> --- test/Makefile.am | 1 + .../valid-config-files/listen-unix-runtime.conf | 11 +++ - test/dbus-daemon.c | 78 +++++++++++++++++++++- - 3 files changed, 87 insertions(+), 3 deletions(-) + test/dbus-daemon.c | 81 +++++++++++++++++++++- + 3 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 test/data/valid-config-files/listen-unix-runtime.conf diff --git a/test/Makefile.am b/test/Makefile.am @@ -43,7 +44,7 @@ index 0000000..169de2c + </policy> +</busconfig> diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c -index 6b0e9b8..3497cc3 100644 +index 6b0e9b8..86163b9 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -2,6 +2,7 @@ @@ -129,7 +130,7 @@ index 6b0e9b8..3497cc3 100644 g_free (address); } -@@ -593,17 +632,43 @@ teardown (Fixture *f, +@@ -593,17 +632,46 @@ teardown (Fixture *f, f->daemon_pid = 0; } @@ -145,7 +146,10 @@ index 6b0e9b8..3497cc3 100644 + g_assert_cmpint (g_rmdir (f->tmp_runtime_dir), ==, 0); + + /* we're relying on being single-threaded for this to be safe */ -+ g_setenv ("XDG_RUNTIME_DIR", f->saved_runtime_dir, TRUE); ++ if (f->saved_runtime_dir != NULL) ++ g_setenv ("XDG_RUNTIME_DIR", f->saved_runtime_dir, TRUE); ++ else ++ g_unsetenv ("XDG_RUNTIME_DIR"); + g_free (f->saved_runtime_dir); + g_free (f->tmp_runtime_dir); + } @@ -175,7 +179,7 @@ index 6b0e9b8..3497cc3 100644 int main (int argc, char **argv) -@@ -621,6 +686,13 @@ main (int argc, +@@ -621,6 +689,13 @@ main (int argc, g_test_add ("/processid", Fixture, NULL, setup, test_processid, teardown); g_test_add ("/canonical-path/uae", Fixture, NULL, setup, test_canonical_path_uae, teardown); |