Philip Withnall 8530a6a8e4 tests: Add missing wakeup calls to gdbus-names test
The tests in `gdbus-names.c` use a mixture of `GMainLoop` and iterating
a `GMainContext` directly. Some of the helper functions based around the
`OwnNameData` struct use the `loop` `GMainLoop` even when called from
tests like `watch_with_different_context()` which themselves use
`GMainContext` directly.

Thus, it’s possible for the `GMainLoop` to not be running, while the
test is iterating on `g_main_context_iteration()`. In this case,
`g_main_loop_quit()` is a no-op and will not wake up the `GMainContext`.
This causes the test to livelock in around 1 in 1200 test runs.

Fix this by adding an explicit `g_main_context_wakeup()` call after each
`g_main_loop_quit()` call. A more comprehensive fix would be to port all
the tests in this file to iterating `GMainContext` directly, and drop
all the `GMainLoop` usage, but I don’t have time for that right now.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-06-15 13:01:28 +01:00
..
2019-01-15 15:11:43 +00:00
2021-01-25 15:00:12 +01:00
2021-05-13 22:16:27 +01:00
2014-09-09 14:11:38 -04:00
2020-11-17 15:50:07 +00:00
2017-05-29 19:53:34 +02:00
2020-11-17 15:50:07 +00:00
2020-11-17 15:50:07 +00:00
2020-11-17 15:50:07 +00:00
2019-01-10 13:50:26 -05:00
2021-06-03 19:04:48 +02:00
2021-05-13 22:16:27 +01:00