mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
tests: Isolate directory access for gdbus-non-socket test
When multiple tests were run in parallel, this would race on its access to `~/.dbus-keyrings` to authenticate with the D-Bus server, since the keyring directory was not appropriately sandboxed to the unit test. Use `G_TEST_OPTION_ISOLATE_DIRS` to automatically isolate each unit test’s directory usage. This should hopefully fix the failure seen in https://gitlab.gnome.org/pwithnall/glib/-/jobs/1879558. ``` 228/266 glib:gio / gdbus-non-socket FAIL 8.64 s (killed by signal 6 SIGABRT) … --- stderr --- GDBus-DBUS_COOKIE_SHA1: Deleted stale lock file '/home/user/.dbus-keyrings/org_gtk_gdbus_general.lock' ** GLib-GIO:ERROR:../gio/tests/gdbus-non-socket.c:253:test_non_socket: assertion failed (error == NULL): Exhausted all available authentication mechanisms (tried: EXTERNAL, DBUS_COOKIE_SHA1) (available: EXTERNAL, DBUS_COOKIE_SHA1) (g-io-error-quark, 0) ``` Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
404d5d40e0
commit
a3c768732d
@ -293,7 +293,7 @@ main (int argc,
|
||||
{
|
||||
gint ret;
|
||||
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
|
||||
|
||||
g_test_add_func ("/gdbus/non-socket", test_non_socket);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user