linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] unit: Fix intermitent failure of SDP tests
@ 2013-01-10  1:03 Anderson Lizardo
  2013-01-10  1:03 ` [PATCH BlueZ 2/2] unit: Print D-Bus error message in verbose mode Anderson Lizardo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anderson Lizardo @ 2013-01-10  1:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

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 |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c
index 7c849f0..cfbe4e0 100644
--- a/unit/test-gdbus-client.c
+++ b/unit/test-gdbus-client.c
@@ -68,6 +68,10 @@ static struct context *create_context(void)
 		return NULL;
 	}
 
+	/* Make sure D-Bus library will not call _exit() and interrupt the next
+	 * tests. */
+	dbus_connection_set_exit_on_disconnect(context->dbus_conn, FALSE);
+
 	return context;
 }
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-10 12:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10  1:03 [PATCH BlueZ 1/2] unit: Fix intermitent failure of SDP tests Anderson Lizardo
2013-01-10  1:03 ` [PATCH BlueZ 2/2] unit: Print D-Bus error message in verbose mode Anderson Lizardo
2013-01-10  1:22   ` Marcel Holtmann
2013-01-10  1:21 ` [PATCH BlueZ 1/2] unit: Fix intermitent failure of SDP tests Marcel Holtmann
2013-01-10 12:30 ` [PATCH v2 BlueZ] unit: Avoid D-Bus calling _exit() during " Anderson Lizardo
2013-01-10 12:31   ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).