Skip unreliable gdbus-threading tests by default

test_threaded_singleton() test to reproduce a race condition between
last-unref of the global singleton GDBusConnection and g_bus_get_sync().

test_method_calls_in_thread() checks that multiple threads can all make
method calls to the same proxy.

However, test setup intermittently times out with:

    # GLib-GIO-DEBUG: run 0: refcount is 2, sleeping
    Bail out! GLib-GIO-FATAL-ERROR: connection had too many refs

The current theory upstream is that this might be a reference leak in
test_delivery_in_thread().

Furthermore, test teardown is now often failing when destroying the test
bus.

Demote these tests to be run as part of the "flaky" autopkgtests, but
not at build time or in the part of the autopkgtest run that gates
progress into testing.

Bug: https://gitlab.gnome.org/GNOME/glib/issues/1515
Forwarded: no
This commit is contained in:
Simon McVittie 2019-01-04 08:37:20 +00:00 committed by su-fang
parent f13e0ea17e
commit e0482d2935
1 changed files with 6 additions and 0 deletions

View File

@ -679,6 +679,12 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
{
g_print("ok 1 # SKIP all gdbus-threading tests skipped because they are too unreliable (glib#1515)\n");
return 77;
}
session_bus_up ();
/* this is safe; testserver will exit once the bus goes away */