]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test_try_connect_to_bus: Allow skipping the use of a DBusLoop
authorSimon McVittie <smcv@collabora.com>
Thu, 1 Feb 2018 19:46:28 +0000 (19:46 +0000)
committerSimon McVittie <smcv@collabora.com>
Tue, 6 Feb 2018 18:49:02 +0000 (18:49 +0000)
DBusLoop isn't thread-safe, so we can't use it to test multi-threaded
situations.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102839
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
test/test-utils-glib.c

index 48e3e8072dd7a4ac83300a75aad3747ddec946f6..a9bbbb26d92a221545a2e6dff6afd862600aa566 100644 (file)
@@ -346,7 +346,7 @@ test_try_connect_to_bus (TestMainContext *ctx,
 
   g_assert (dbus_bus_get_unique_name (conn) != NULL);
 
-  if (!test_connection_try_setup (ctx, conn))
+  if (ctx != NULL && !test_connection_try_setup (ctx, conn))
     {
       _DBUS_SET_OOM (&error);
       goto fail;