mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
tests: Isolate directory access for gdbus-connection-flush 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/GNOME/glib/-/jobs/1849524, where the following was in the log for a test executed in parallel: ``` GDBus-DBUS_COOKIE_SHA1: Deleted stale lock file '/home/user/.dbus-keyrings/org_gtk_gdbus_general.lock' ``` Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
a3c768732d
commit
8cff531520
@ -368,7 +368,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 ("/gdbus/connection/flush/busy", Fixture, NULL,
|
||||
setup, test_flush_busy, teardown);
|
||||
|
Loading…
Reference in New Issue
Block a user