From e90c260d7d2178818e6a048d51e62646faa43ec1 Mon Sep 17 00:00:00 2001 From: Anderson Lizardo Date: Thu, 10 Jan 2013 08:30:30 -0400 Subject: [PATCH] unit: Avoid D-Bus calling _exit() during SDP tests While running tests, the D-Bus library was set to call _exit() when the client leaves the bus. This caused the second test to be interrupted without providing a PASS/FAIL result. This was confirmed by running test-sdp with DBUS_VERBOSE=1. This commit disables this behavior, which does not exist on BlueZ because g_dbus_set_disconnect_function() implicitly does this. --- unit/test-gdbus-client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c index aaf834297..34c714e98 100644 --- a/unit/test-gdbus-client.c +++ b/unit/test-gdbus-client.c @@ -78,6 +78,9 @@ static struct context *create_context(void) return NULL; } + /* Avoid D-Bus library calling _exit() before next test finishes. */ + dbus_connection_set_exit_on_disconnect(context->dbus_conn, FALSE); + return context; } -- 2.47.3