testsuite
Peter O'Gorman
dbus at mlists.thewrittenword.com
Thu Jul 19 11:49:04 PDT 2007
Hi,
We've been trying to run the dbus-1.0.2 testsuite on various
platforms, I notice that one of my compliaints seems to have been
fixed in cvs, strtod "0xff" only works on linux and aix5.2 and 5.3 (it
does not work on solaris* hpux* osf* or older aix.
We also ran into a problem that the spawn test hung forever on aix,
after much time it was discovered that the signal handler has a bug:
static void
babysit_signal_handler (int signo)
{
char b = '\0';
again:
write (babysit_sigchld_pipe, &b, 1);
if (errno == EINTR)
goto again;
}
because errno is not reset to 0 before calling write, and write
succeeds so does not set errno, this loops forever on aix. Debugging
this took a while due to the fact that there are three processes
involved, the dying grandchild, the babysitter and the grandparent.
We patched it so it now looks like this:
static void
babysit_signal_handler (int signo)
{
char b = '\0';
/* Set errno to zero and/or test that the write() fails, otherwise we
* can hang here forever. */
errno = 0;
again:
if (write (babysit_sigchld_pipe, &b, 1) <= 0) {
if (errno == EINTR)
goto again;
}
}
Also there is a test to get the pid of the process at the other end of
the unix domain socket. This fails for us on solaris, hp-ux, aix,
tru64, and IRIX. I see in ViewCVS that there are a few DBU_WIN ifdefs
in there, but that won't help us :-)
We added this:
Index: bus/dispatch.c
===================================================================
--- bus/dispatch.c.orig 2007-07-19 01:27:12.021366416 +0000
+++ bus/dispatch.c 2007-07-19 01:47:00.168980275 +0000
@@ -34,7 +34,9 @@
#include "test.h"
#include <dbus/dbus-internals.h>
#include <string.h>
-
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
static dbus_bool_t
send_one_message (DBusConnection *connection,
BusContext *context,
@@ -4049,10 +4051,10 @@
if (!check_get_connection_unix_user (context, baz))
_dbus_assert_not_reached ("GetConnectionUnixUser message
failed");
-
+#if defined(HAVE_GETPEERUCRED) || defined(SO_PEERCRED) ||
defined(HAVE_CMSGCRED)
if (!check_get_connection_unix_process_id (context, baz))
_dbus_assert_not_reached ("GetConnectionUnixProcessID message
failed");
-
+#endif
if (!check_list_services (context, baz))
_dbus_assert_not_reached ("ListActivatableNames message failed");
It would be most helpful if the testsuite did not stop on the first
failure, but continued to run all the tests and report which pass and
which fail.
Thanks,
Peter
More information about the dbus
mailing list