dbus/test
Simon McVittie 2b3272c75a Make taking a global lock automatically initialize locking if needed
This lets them be thread-safe by default, at the cost that they can
now fail.

init_uninitialized_locks() and init_global_locks() must now both
reimplement the equivalent of _dbus_register_shutdown_func(), by using
_dbus_platform_rmutex_lock() on the same underlying mutex around a call
to _dbus_register_shutdown_func_unlocked().

This is because if they used the usual _DBUS_LOCK() API (as
_dbus_register_shutdown_func() does), it would automatically try to
initialize global locking, leading to infinite recursion.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: Anas Nashif <anas.nashif@intel.com>
2013-06-17 17:00:00 +01:00
..
data test: enforce own_prefix policy rules 2012-03-22 11:51:23 +00:00
internals Merge branch 'dbus-1.6' 2013-06-12 14:49:37 +01:00
name-test Make taking a global lock automatically initialize locking if needed 2013-06-17 17:00:00 +01:00
.gitignore Add a test for marshalling and endian-swapping 2011-06-10 18:32:43 +01:00
break-loader.c Avoid using monotonic time in the DBUS_COOKIE_SHA1 authentication method 2012-04-12 11:18:07 -04:00
corrupt.c corrupt test: compile successfully against older GLib (Debian stable) 2011-11-02 15:20:51 +00:00
dbus-daemon-eavesdrop.c Revert addition of files which were only meant to exist on master, too 2012-01-23 10:27:32 +00:00
dbus-daemon.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00: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 Add a test-case for CVE-2013-2168 2013-06-12 13:56:39 +01:00
marshal.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00: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
syntax.c Accept non-characters when validating Unicode 2013-04-22 15:36:32 +01:00
test-exit.c Include config.h as the first thing in every .c file 2013-02-22 13:08:27 +00: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 Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
test-shell-service.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00: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 Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00: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