dbus/test/data
Simon McVittie e9f0378bbf Merge tests' cmake and autotools bus configuration
In Unix, the tests listened on both debug-pipe (which is a socketpair,
or a TCP emulation of socketpair on Windows) and a Unix socket.

In the Windows port, the tests were hard-coded to listen on a particular
port, which allowed the dispatch test to connect to that port, as long
as no two tests ran simultaneously (which I don't think was ever guaranteed -
make -j can violate this). That's valid out-of-process, and also
fully-specified, so they only needed one <listen> directive, so the
CMake input only had one.

To make the tests work under CMake on Unix, there was a hack: the string
substituted for the content of the <listen> directive contained
</listen><listen> to get the other address in, which is pretty nasty.

Instead of doing that, I've made both build systems, on both Unix and
Windows, use both debug-pipe and a more normal transport (Unix or TCP).
debug-pipe has a Windows implementation and it's used in
dbus-spawn-win.c, so it'd better work. The use of debug-pipe is now
hard-coded rather than being a configure parameter (there's no reason
to vary it in different builds), and I used TEST_LISTEN as the name of the
Unix/TCP address, because it's a "vague" address (no specific Unix path, no
TCP port), that you can listen on but not connect to.

This in turn means that we can merge the Autoconf .in and CMake .cmake
files, similar to Bug #41033.

You might wonder why I've kept debug-pipe. I did try to get rid of it, but
it turns out that the tests in dispatch.c rely on
dbus_connection_open_private() not blocking, and normal socket
connections block on connect(). Until we fix that by adding an async
version of dbus_connection_open_private(), it won't be safe to have a
test like dispatch.c that "talks to itself", unless it uses a transport
as trivial as debug-pipe in which neither end has to block on the other.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:56 +01:00
..
auth * dbus/dbus-auth-script.c (_dbus_auth_script_run): added UNIX_ONLY and WIN_ONLY commands for auth scripts 2007-06-23 07:45:17 +00:00
equiv-config-files 2005-01-18 Havoc Pennington <hp@redhat.com> 2005-01-18 20:42:15 +00:00
incomplete-messages 2003-09-21 Mark McLoughlin <mark@skynet.ie> 2003-09-21 18:43:20 +00:00
invalid-config-files 2004-10-18 Colin Walters <walters@verbum.org> 2004-10-18 04:04:12 +00:00
invalid-messages 2005-02-17 Colin Walters <walters@verbum.org> 2005-02-17 21:19:49 +00:00
invalid-service-files-system Simplify substitution of test executables to use fewer variables 2011-09-28 19:00:49 +01:00
sha-1 2003-02-22 Havoc Pennington <hp@pobox.com> 2003-02-22 17:29:48 +00:00
valid-config-files Merge tests' cmake and autotools bus configuration 2011-09-28 19:00:56 +01:00
valid-config-files-system Merge tests' cmake and autotools bus configuration 2011-09-28 19:00:56 +01:00
valid-introspection-files 2004-05-31 Havoc Pennington <hp@redhat.com> 2004-06-01 03:02:26 +00:00
valid-messages 2004-06-07 Havoc Pennington <hp@redhat.com> 2004-06-07 19:27:51 +00:00
valid-service-files Simplify substitution of test executables to use fewer variables 2011-09-28 19:00:49 +01:00
valid-service-files-system Simplify substitution of test executables to use fewer variables 2011-09-28 19:00:49 +01:00