diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-22 04:07:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-05-20 02:09:30 +0200 |
commit | 004f01fa451b0341e7ea69ce7f08a1c4690f759a (patch) | |
tree | ce2438f8deecddbea5a3bed7f5689d6c3231e6ec /bus/test-main.c | |
parent | 2eb14dbcac1870dda1b36ce1e6fedfe7500572cb (diff) |
unix-fd: add test for passing unix fds
This adds a full test for passing multiple fds across a D-Bus
connection.
Diffstat (limited to 'bus/test-main.c')
-rw-r--r-- | bus/test-main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bus/test-main.c b/bus/test-main.c index 994550e2..2583f9a8 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -27,6 +27,7 @@ #include <dbus/dbus-string.h> #include <dbus/dbus-sysdeps.h> #include <dbus/dbus-internals.h> +#include <dbus/dbus-message-private.h> #include "selinux.h" #ifdef DBUS_BUILD_TESTS @@ -69,6 +70,7 @@ test_post_hook (void) if (_dbus_getenv ("DBUS_TEST_SELINUX")) bus_selinux_shutdown (); check_memleaks (progname); + _dbus_check_fdleaks(); } int @@ -138,6 +140,14 @@ main (int argc, char **argv) die ("service reload"); test_post_hook (); +#ifdef HAVE_UNIX_FD_PASSING + test_pre_hook (); + printf ("%s: Running unix fd passing test\n", argv[0]); + if (!bus_unix_fds_passing_test (&test_data_dir)) + die ("unix fd passing"); + test_post_hook (); +#endif + printf ("%s: Success\n", argv[0]); |