Skip to content

tests: Add G_TEST_OPTION_ISOLATE_DIRS to almost all gdbus tests

Philip Withnall requested to merge pwithnall/glib:gdbus-tests-isolate-dirs into main

This is a spiritual follow-up to commit 8cff5315, which added G_TEST_OPTION_ISOLATE_DIRS to the gdbus-connection-flush test to avoid its D-Bus cookie lock file from being erroneously deleted by other tests running in parallel.

The same failure mode could affect any of the other D-Bus tests which connect to a bus. As an easy fix, enable G_TEST_OPTION_ISOLATE_DIRS for all of them.

The only test it’s not (yet) enabled for is gdbus-address-get-session as that messes around with XDG_RUNTIME_DIR to test finding the session bus. It might be possible to use G_TEST_OPTION_ISOLATE_DIRS with it, but that would take longer than I have right now.

In any case, the more tests (which try to connect to a bus) that this is enabled for, the lower the chances of spurious test failure due to them conflicting over shared resources.

Signed-off-by: Philip Withnall pwithnall@endlessos.org

Merge request reports