test suite failure

Olivier Andrieu oliv__a at users.sourceforge.net
Tue Apr 13 22:17:36 EST 2004


 Havoc Pennington <hp at redhat.com> [Mon, 12 Apr 2004 20:30:56 -0400]:
 > On Mon, 2004-03-29 at 08:40, Michael Meeks wrote:
 > > 	The attached patch fixes this somewhat inelegantly; better solutions
 > > might be to pass a '--fork-but-no-chdir' type parameter, to the config
 > > file - or somesuch; either way - I can't make that call; this makes the
 > > test at least activate stuff before it fails as Oliver describes with
 > > 'make check'.
 > 
 > This looks fine to me, I didn't realize the patch was so simple or I
 > wouldn't have procrastinated reading it...

By the way, how about adding the following patch that prevents the
test program from waiting forever for a reply ?

-- 
   Olivier
-------------- next part --------------
Index: test/glib/test-dbus-glib.c
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/test-dbus-glib.c,v
retrieving revision 1.5
diff -u -p -r1.5 test-dbus-glib.c
--- a/test/glib/test-dbus-glib.c	21 Oct 2003 05:46:52 -0000	1.5
+++ b/test/glib/test-dbus-glib.c	13 Apr 2004 12:12:48 -0000
@@ -7,6 +7,13 @@
 static GMainLoop *loop = NULL;
 static int n_times_foo_received = 0;
 
+static gboolean
+timed_exit (gpointer loop)
+{
+  g_main_loop_quit (loop);
+  return TRUE;
+}
+
 static void
 foo_signal_handler (DBusGProxy  *proxy,
                     DBusMessage *signal,
@@ -200,6 +207,8 @@ main (int argc, char **argv)
 
   dbus_connection_flush (connection);
   
+  g_timeout_add (5000, timed_exit, loop);
+
   g_main_loop_run (loop);
 
   if (n_times_foo_received != 1)


More information about the dbus mailing list