dbus/test
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
..
data Merge tests' cmake and autotools bus configuration 2011-09-28 19:00:56 +01:00
internals refs test: fix unused variable 2011-09-21 11:56:28 +01:00
name-test Merge branch 'dbus-1.4' 2011-09-21 11:39:32 +01:00
.gitignore Add a test for marshalling and endian-swapping 2011-06-10 18:32:43 +01:00
break-loader.c Revert merge of master (dbus-1.5) into dbus-1.4 2011-03-14 11:53:09 +00:00
corrupt.c Test that a message with the byte order mangled causes disconnection but no crash 2011-06-10 18:32:58 +01:00
dbus-daemon-eavesdrop.c Remove more never-used variables 2011-09-19 13:50:37 +01:00
dbus-daemon.c Merge branch 'dbus-1.4' 2011-08-12 10:26:13 +01:00
dbus-test-runner Add support for installing most of the modular tests 2011-06-10 18:32:35 +01:00
loopback.c Fix copyright dates 2011-06-10 18:33:22 +01:00
Makefile.am Fix compilation of syslog test in master 2011-09-21 11:56:28 +01:00
marshal.c Remove various never-used variables 2011-08-05 12:26:51 +01:00
relay.c relay test: don't leak the server's address 2011-08-05 14:46:09 +01:00
shell-test.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
spawn-test.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
test-exit.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
test-names.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
test-segfault.c Make more signal and locale interface use conditional. 2010-03-22 17:28:55 +01:00
test-service.c test-service, test-shell-service: check what RequestName returned 2011-08-05 12:26:48 +01:00
test-shell-service.c test-service, test-shell-service: check what RequestName returned 2011-08-05 12:26:48 +01:00
test-sleep-forever.c fix warning, use Sleep, not _sleep on windows (cherry picked from commit ea36c743ad60a2dd5c6286571d1a475903519809) 2009-11-30 12:00:14 +01:00
test-utils.c DBusLoop: remove second layer of watch callbacks where possible 2011-06-13 16:09:50 +01:00
test-utils.h Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
unused-code-gc.py 2005-01-16 Havoc Pennington <hp@redhat.com> 2005-01-17 03:53:40 +00:00