summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am147
-rw-r--r--test/Makefile.in1359
-rw-r--r--test/corrupt.c37
-rw-r--r--test/data/valid-config-files/incoming-limit.conf.in (renamed from test/data/valid-config-files/incoming-limit.conf)2
-rw-r--r--test/dbus-daemon-eavesdrop.c38
-rw-r--r--test/dbus-daemon.c252
-rw-r--r--test/internals/printf.c88
-rw-r--r--test/internals/refs.c1
-rw-r--r--test/internals/syslog.c10
-rw-r--r--test/loopback.c85
-rw-r--r--test/manual-authz.c409
-rw-r--r--test/marshal.c28
-rw-r--r--test/name-test/Makefile.am23
-rw-r--r--test/name-test/Makefile.in719
-rwxr-xr-xtest/name-test/run-test-systemserver.sh5
-rwxr-xr-xtest/name-test/run-test.sh5
-rw-r--r--test/name-test/test-autolaunch.c11
-rw-r--r--test/name-test/test-threads-init.c14
-rw-r--r--test/relay.c25
-rw-r--r--test/shell-test.c2
-rw-r--r--test/spawn-test.c4
-rw-r--r--test/test-exit.c2
-rw-r--r--test/test-segfault.c18
-rw-r--r--test/test-utils.c93
-rw-r--r--test/test-utils.h39
25 files changed, 2696 insertions, 720 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index e9448998..cec5cdab 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -19,25 +19,49 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
static_cppflags = \
$(AM_CPPFLAGS) \
-DDBUS_STATIC_BUILD \
+ -DDBUS_COMPILATION \
+ -DDBUS_TEST_USE_INTERNAL \
$(NULL)
-libdbus_testutils_la_CPPFLAGS = \
- $(static_cppflags)
+noinst_LTLIBRARIES = libdbus-testutils-internal.la
+
+# You can link either libdbus-testutils, dbus-glib and libdbus-1,
+# or libdbus-testutils-internal and libdbus-internal - never both in the
+# same binary.
+if DBUS_WITH_DBUS_GLIB
+noinst_LTLIBRARIES += libdbus-testutils.la
libdbus_testutils_la_SOURCES = \
test-utils.c \
test-utils.h \
$(NULL)
libdbus_testutils_la_LIBADD = \
- $(top_builddir)/dbus/libdbus-internal.la \
+ $(top_builddir)/dbus/libdbus-1.la \
+ $(GLIB_LIBS) \
+ $(DBUS_GLIB_LIBS) \
$(NULL)
+testutils_shared_if_possible_cppflags = $(AM_CPPFLAGS)
+testutils_shared_if_possible_libs = libdbus-testutils.la
+else
+testutils_shared_if_possible_cppflags = $(static_cppflags)
+testutils_shared_if_possible_libs = libdbus-testutils-internal.la
+endif
-noinst_LTLIBRARIES = libdbus-testutils.la
+libdbus_testutils_internal_la_CPPFLAGS = \
+ $(static_cppflags) \
+ $(NULL)
+libdbus_testutils_internal_la_SOURCES = \
+ test-utils.c \
+ test-utils.h \
+ $(NULL)
+libdbus_testutils_internal_la_LIBADD = \
+ $(top_builddir)/dbus/libdbus-internal.la \
+ $(NULL)
-if DBUS_BUILD_TESTS
+if DBUS_ENABLE_EMBEDDED_TESTS
## break-loader removed for now
## these binaries are used in tests but are not themselves tests
TEST_BINARIES = \
- spawn-test \
+ test-spawn \
test-exit \
test-names \
test-segfault \
@@ -50,44 +74,50 @@ TEST_BINARIES = \
## order, but we don't want to run them til we arrive in this directory,
## since they depend on stuff from this directory
TESTS = \
- ../bus/bus-test$(EXEEXT) \
- ../bus/bus-test-system$(EXEEXT) \
- ../dbus/dbus-test$(EXEEXT) \
+ ../bus/test-bus$(EXEEXT) \
+ ../bus/test-bus-system$(EXEEXT) \
+ ../dbus/test-dbus$(EXEEXT) \
$(NULL)
if DBUS_UNIX
-TESTS += ../bus/bus-test-launch-helper$(EXEEXT)
+TESTS += ../bus/test-bus-launch-helper$(EXEEXT)
endif
-else !DBUS_BUILD_TESTS
+else !DBUS_ENABLE_EMBEDDED_TESTS
TEST_BINARIES=
TESTS=
-endif !DBUS_BUILD_TESTS
+endif !DBUS_ENABLE_EMBEDDED_TESTS
noinst_PROGRAMS= $(TEST_BINARIES)
test_service_CPPFLAGS = $(static_cppflags)
-test_service_LDADD = libdbus-testutils.la
+test_service_LDADD = libdbus-testutils-internal.la
test_names_CPPFLAGS = $(static_cppflags)
-test_names_LDADD = libdbus-testutils.la
+test_names_LDADD = libdbus-testutils-internal.la
## break_loader_CPPFLAGS = $(static_cppflags)
## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
test_shell_service_CPPFLAGS = $(static_cppflags)
-test_shell_service_LDADD = libdbus-testutils.la
-shell_test_CPPFLAGS = $(static_cppflags)
-shell_test_LDADD = libdbus-testutils.la
-spawn_test_CPPFLAGS = $(static_cppflags)
-spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+test_shell_service_LDADD = libdbus-testutils-internal.la
+test_shell_SOURCES = shell-test.c
+test_shell_CPPFLAGS = $(static_cppflags)
+test_shell_LDADD = libdbus-testutils-internal.la
+test_spawn_SOURCES = spawn-test.c
+test_spawn_CPPFLAGS = $(static_cppflags)
+test_spawn_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+
+test_printf_SOURCES = internals/printf.c
+test_printf_CPPFLAGS = $(static_cppflags)
+test_printf_LDADD = $(top_builddir)/dbus/libdbus-internal.la
test_refs_SOURCES = internals/refs.c
test_refs_CPPFLAGS = $(static_cppflags)
-test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+test_refs_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS)
test_syslog_SOURCES = internals/syslog.c
test_syslog_CPPFLAGS = $(static_cppflags)
-test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+test_syslog_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS)
EXTRA_DIST = dbus-test-runner
@@ -96,7 +126,10 @@ testexecdir = $(libdir)/dbus-1.0/test
testexec_PROGRAMS =
installable_tests = \
- shell-test \
+ test-shell \
+ test-printf \
+ $(NULL)
+installable_manual_tests = \
$(NULL)
if DBUS_WITH_GLIB
@@ -111,66 +144,88 @@ installable_tests += \
test-syntax \
test-syslog \
$(NULL)
+installable_manual_tests += \
+ manual-authz \
+ $(NULL)
endif DBUS_WITH_GLIB
installcheck_tests =
installcheck_environment = \
+ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \
DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
TESTS_ENVIRONMENT = \
- DBUS_BLOCK_ON_ABORT=1 \
+ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
DBUS_FATAL_WARNINGS=1 \
DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
DBUS_TEST_DATA=@abs_top_builddir@/test/data \
DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
$(NULL)
+manual_authz_SOURCES = manual-authz.c
+manual_authz_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+manual_authz_LDADD = \
+ $(testutils_shared_if_possible_libs) \
+ $(GLIB_LIBS) \
+ $(NULL)
+
test_corrupt_SOURCES = corrupt.c
-test_corrupt_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_corrupt_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_corrupt_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_loopback_SOURCES = loopback.c
-test_loopback_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_loopback_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_loopback_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_relay_SOURCES = relay.c
-test_relay_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_relay_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_relay_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_dbus_daemon_SOURCES = dbus-daemon.c
-test_dbus_daemon_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_dbus_daemon_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_dbus_daemon_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_dbus_daemon_eavesdrop_SOURCES = dbus-daemon-eavesdrop.c
-test_dbus_daemon_eavesdrop_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
-test_dbus_daemon_eavesdrop_LDFLAGS = @R_DYNAMIC_LDFLAG@
-test_dbus_daemon_eavesdrop_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_dbus_daemon_eavesdrop_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_dbus_daemon_eavesdrop_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_marshal_SOURCES = marshal.c
-test_marshal_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_marshal_LDADD = \
+ $(top_builddir)/dbus/libdbus-1.la \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_syntax_SOURCES = syntax.c
-test_syntax_LDADD = $(top_builddir)/dbus/libdbus-1.la \
- $(GLIB_LIBS)
+test_syntax_LDADD = \
+ $(top_builddir)/dbus/libdbus-1.la \
+ $(GLIB_LIBS) \
+ $(NULL)
if DBUS_ENABLE_MODULAR_TESTS
TESTS += $(installable_tests)
installcheck_tests += $(installable_tests)
if DBUS_ENABLE_INSTALLED_TESTS
- testexec_PROGRAMS += $(installable_tests)
+ testexec_PROGRAMS += $(installable_tests) $(installable_manual_tests)
else !DBUS_ENABLE_INSTALLED_TESTS
- noinst_PROGRAMS += $(installable_tests)
+ noinst_PROGRAMS += $(installable_tests) $(installable_manual_tests)
endif !DBUS_ENABLE_INSTALLED_TESTS
endif DBUS_ENABLE_MODULAR_TESTS
@@ -194,6 +249,7 @@ in_data = \
data/valid-config-files-system/debug-allow-all-pass.conf.in \
data/valid-config-files/debug-allow-all-sha1.conf.in \
data/valid-config-files/debug-allow-all.conf.in \
+ data/valid-config-files/incoming-limit.conf.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \
@@ -265,7 +321,6 @@ static_data = \
data/valid-config-files/basic.conf \
data/valid-config-files/basic.d/basic.conf \
data/valid-config-files/entities.conf \
- data/valid-config-files/incoming-limit.conf \
data/valid-config-files/many-rules.conf \
data/valid-config-files/system.d/test.conf \
data/valid-messages/array-of-array-of-uint32.message \
@@ -316,12 +371,8 @@ imported_data = \
$(NULL)
noinst_DATA = $(imported_data)
-CLEANFILES = $(noinst_DATA)
-
-data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
- $(AM_V_at)$(MKDIR_P) data/valid-config-files
- $(AM_V_GEN)cp $< $@
+CLEANFILES = $(noinst_DATA) XDG_RUNTIME_DIR
-data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
+$(imported_data): data/valid-config-files/%.conf: $(top_builddir)/bus/%.conf
$(AM_V_at)$(MKDIR_P) data/valid-config-files
$(AM_V_GEN)cp $< $@
diff --git a/test/Makefile.in b/test/Makefile.in
index 95b4cc4e..d8fc34a2 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -18,23 +17,51 @@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -53,15 +80,21 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@DBUS_BUILD_TESTS_FALSE@TESTS = $(am__EXEEXT_6)
-@DBUS_BUILD_TESTS_TRUE@TESTS = ../bus/bus-test$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ ../bus/bus-test-system$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ ../dbus/dbus-test$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ $(am__append_1) $(am__EXEEXT_6)
-@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_1 = ../bus/bus-test-launch-helper$(EXEEXT)
-noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_4)
-testexec_PROGRAMS = $(am__EXEEXT_5)
-@DBUS_WITH_GLIB_TRUE@am__append_2 = \
+
+# You can link either libdbus-testutils, dbus-glib and libdbus-1,
+# or libdbus-testutils-internal and libdbus-internal - never both in the
+# same binary.
+@DBUS_WITH_DBUS_GLIB_TRUE@am__append_1 = libdbus-testutils.la
+@DBUS_ENABLE_EMBEDDED_TESTS_FALSE@TESTS = $(am__EXEEXT_8)
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@TESTS = ../bus/test-bus$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ ../bus/test-bus-system$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ ../dbus/test-dbus$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ $(am__append_2) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ $(am__EXEEXT_8)
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = ../bus/test-bus-launch-helper$(EXEEXT)
+noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_6)
+testexec_PROGRAMS = $(am__EXEEXT_7)
+@DBUS_WITH_GLIB_TRUE@am__append_3 = \
@DBUS_WITH_GLIB_TRUE@ test-corrupt \
@DBUS_WITH_GLIB_TRUE@ test-dbus-daemon \
@DBUS_WITH_GLIB_TRUE@ test-dbus-daemon-eavesdrop \
@@ -73,12 +106,17 @@ testexec_PROGRAMS = $(am__EXEEXT_5)
@DBUS_WITH_GLIB_TRUE@ test-syslog \
@DBUS_WITH_GLIB_TRUE@ $(NULL)
-@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_3 = $(installable_tests)
-@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_4 = $(installable_tests)
-@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_5 = $(installable_tests)
-@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_6 = $(installable_tests)
+@DBUS_WITH_GLIB_TRUE@am__append_4 = \
+@DBUS_WITH_GLIB_TRUE@ manual-authz \
+@DBUS_WITH_GLIB_TRUE@ $(NULL)
+
+@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_5 = $(installable_tests)
+@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_6 = $(installable_tests)
+@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_7 = $(installable_tests) $(installable_manual_tests)
+@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_8 = $(installable_tests) $(installable_manual_tests)
subdir = test
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/depcomp $(top_srcdir)/test-driver
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -94,19 +132,33 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
-libdbus_testutils_la_DEPENDENCIES = \
+libdbus_testutils_internal_la_DEPENDENCIES = \
$(top_builddir)/dbus/libdbus-internal.la
-am_libdbus_testutils_la_OBJECTS = libdbus_testutils_la-test-utils.lo
-libdbus_testutils_la_OBJECTS = $(am_libdbus_testutils_la_OBJECTS)
+am_libdbus_testutils_internal_la_OBJECTS = \
+ libdbus_testutils_internal_la-test-utils.lo
+libdbus_testutils_internal_la_OBJECTS = \
+ $(am_libdbus_testutils_internal_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
-@DBUS_BUILD_TESTS_TRUE@am__EXEEXT_1 = spawn-test$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-exit$(EXEEXT) test-names$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-segfault$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-service$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-shell-service$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-sleep-forever$(EXEEXT)
+am__v_lt_1 =
+am__DEPENDENCIES_1 =
+@DBUS_WITH_DBUS_GLIB_TRUE@libdbus_testutils_la_DEPENDENCIES = \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(top_builddir)/dbus/libdbus-1.la \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(am__DEPENDENCIES_1) \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(am__DEPENDENCIES_1)
+am__libdbus_testutils_la_SOURCES_DIST = test-utils.c test-utils.h
+@DBUS_WITH_DBUS_GLIB_TRUE@am_libdbus_testutils_la_OBJECTS = \
+@DBUS_WITH_DBUS_GLIB_TRUE@ test-utils.lo
+libdbus_testutils_la_OBJECTS = $(am_libdbus_testutils_la_OBJECTS)
+@DBUS_WITH_DBUS_GLIB_TRUE@am_libdbus_testutils_la_rpath =
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = test-spawn$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-exit$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-names$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-segfault$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-service$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-shell-service$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-sleep-forever$(EXEEXT)
@DBUS_WITH_GLIB_TRUE@am__EXEEXT_2 = test-corrupt$(EXEEXT) \
@DBUS_WITH_GLIB_TRUE@ test-dbus-daemon$(EXEEXT) \
@DBUS_WITH_GLIB_TRUE@ test-dbus-daemon-eavesdrop$(EXEEXT) \
@@ -114,78 +166,98 @@ am__v_lt_0 = --silent
@DBUS_WITH_GLIB_TRUE@ test-marshal$(EXEEXT) test-refs$(EXEEXT) \
@DBUS_WITH_GLIB_TRUE@ test-relay$(EXEEXT) test-syntax$(EXEEXT) \
@DBUS_WITH_GLIB_TRUE@ test-syslog$(EXEEXT)
-am__EXEEXT_3 = shell-test$(EXEEXT) $(am__EXEEXT_2)
-@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
-@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_5 = $(am__EXEEXT_3)
+am__EXEEXT_3 = test-shell$(EXEEXT) test-printf$(EXEEXT) \
+ $(am__EXEEXT_2)
+@DBUS_WITH_GLIB_TRUE@am__EXEEXT_4 = manual-authz$(EXEEXT)
+am__EXEEXT_5 = $(am__EXEEXT_4)
+@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_3) \
+@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@ $(am__EXEEXT_5)
+@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_7 = $(am__EXEEXT_3) \
+@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@ $(am__EXEEXT_5)
am__installdirs = "$(DESTDIR)$(testexecdir)"
PROGRAMS = $(noinst_PROGRAMS) $(testexec_PROGRAMS)
-shell_test_SOURCES = shell-test.c
-shell_test_OBJECTS = shell_test-shell-test.$(OBJEXT)
-shell_test_DEPENDENCIES = libdbus-testutils.la
-spawn_test_SOURCES = spawn-test.c
-spawn_test_OBJECTS = spawn_test-spawn-test.$(OBJEXT)
-spawn_test_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
-am_test_corrupt_OBJECTS = corrupt.$(OBJEXT)
+am_manual_authz_OBJECTS = manual_authz-manual-authz.$(OBJEXT)
+manual_authz_OBJECTS = $(am_manual_authz_OBJECTS)
+manual_authz_DEPENDENCIES = $(testutils_shared_if_possible_libs) \
+ $(am__DEPENDENCIES_1)
+am_test_corrupt_OBJECTS = test_corrupt-corrupt.$(OBJEXT)
test_corrupt_OBJECTS = $(am_test_corrupt_OBJECTS)
-am__DEPENDENCIES_1 =
-test_corrupt_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_test_dbus_daemon_OBJECTS = dbus-daemon.$(OBJEXT)
+test_corrupt_DEPENDENCIES = $(testutils_shared_if_possible_libs) \
+ $(am__DEPENDENCIES_1)
+am_test_dbus_daemon_OBJECTS = test_dbus_daemon-dbus-daemon.$(OBJEXT)
test_dbus_daemon_OBJECTS = $(am_test_dbus_daemon_OBJECTS)
-test_dbus_daemon_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_dbus_daemon_DEPENDENCIES = $(testutils_shared_if_possible_libs) \
+ $(am__DEPENDENCIES_1)
am_test_dbus_daemon_eavesdrop_OBJECTS = \
test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.$(OBJEXT)
test_dbus_daemon_eavesdrop_OBJECTS = \
$(am_test_dbus_daemon_eavesdrop_OBJECTS)
test_dbus_daemon_eavesdrop_DEPENDENCIES = \
- $(top_builddir)/dbus/libdbus-1.la $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-test_dbus_daemon_eavesdrop_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(test_dbus_daemon_eavesdrop_LDFLAGS) \
- $(LDFLAGS) -o $@
+ $(testutils_shared_if_possible_libs) $(am__DEPENDENCIES_1)
test_exit_SOURCES = test-exit.c
test_exit_OBJECTS = test-exit.$(OBJEXT)
test_exit_LDADD = $(LDADD)
-am_test_loopback_OBJECTS = loopback.$(OBJEXT)
+am_test_loopback_OBJECTS = test_loopback-loopback.$(OBJEXT)
test_loopback_OBJECTS = $(am_test_loopback_OBJECTS)
-test_loopback_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_loopback_DEPENDENCIES = $(testutils_shared_if_possible_libs) \
+ $(am__DEPENDENCIES_1)
am_test_marshal_OBJECTS = marshal.$(OBJEXT)
test_marshal_OBJECTS = $(am_test_marshal_OBJECTS)
test_marshal_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1)
test_names_SOURCES = test-names.c
test_names_OBJECTS = test_names-test-names.$(OBJEXT)
-test_names_DEPENDENCIES = libdbus-testutils.la
+test_names_DEPENDENCIES = libdbus-testutils-internal.la
+am_test_printf_OBJECTS = test_printf-printf.$(OBJEXT)
+test_printf_OBJECTS = $(am_test_printf_OBJECTS)
+test_printf_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
am_test_refs_OBJECTS = test_refs-refs.$(OBJEXT)
test_refs_OBJECTS = $(am_test_refs_OBJECTS)
-test_refs_DEPENDENCIES = libdbus-testutils.la $(am__DEPENDENCIES_1)
-am_test_relay_OBJECTS = relay.$(OBJEXT)
+test_refs_DEPENDENCIES = libdbus-testutils-internal.la \
+ $(am__DEPENDENCIES_1)
+am_test_relay_OBJECTS = test_relay-relay.$(OBJEXT)
test_relay_OBJECTS = $(am_test_relay_OBJECTS)
-test_relay_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_relay_DEPENDENCIES = $(testutils_shared_if_possible_libs) \
+ $(am__DEPENDENCIES_1)
test_segfault_SOURCES = test-segfault.c
test_segfault_OBJECTS = test-segfault.$(OBJEXT)
test_segfault_LDADD = $(LDADD)
test_service_SOURCES = test-service.c
test_service_OBJECTS = test_service-test-service.$(OBJEXT)
-test_service_DEPENDENCIES = libdbus-testutils.la
+test_service_DEPENDENCIES = libdbus-testutils-internal.la
+am_test_shell_OBJECTS = test_shell-shell-test.$(OBJEXT)
+test_shell_OBJECTS = $(am_test_shell_OBJECTS)
+test_shell_DEPENDENCIES = libdbus-testutils-internal.la
test_shell_service_SOURCES = test-shell-service.c
test_shell_service_OBJECTS = \
test_shell_service-test-shell-service.$(OBJEXT)
-test_shell_service_DEPENDENCIES = libdbus-testutils.la
+test_shell_service_DEPENDENCIES = libdbus-testutils-internal.la
test_sleep_forever_SOURCES = test-sleep-forever.c
test_sleep_forever_OBJECTS = test-sleep-forever.$(OBJEXT)
test_sleep_forever_LDADD = $(LDADD)
+am_test_spawn_OBJECTS = test_spawn-spawn-test.$(OBJEXT)
+test_spawn_OBJECTS = $(am_test_spawn_OBJECTS)
+test_spawn_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
am_test_syntax_OBJECTS = syntax.$(OBJEXT)
test_syntax_OBJECTS = $(am_test_syntax_OBJECTS)
test_syntax_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
$(am__DEPENDENCIES_1)
am_test_syslog_OBJECTS = test_syslog-syslog.$(OBJEXT)
test_syslog_OBJECTS = $(am_test_syslog_OBJECTS)
-test_syslog_DEPENDENCIES = libdbus-testutils.la $(am__DEPENDENCIES_1)
+test_syslog_DEPENDENCIES = libdbus-testutils-internal.la \
+ $(am__DEPENDENCIES_1)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -198,42 +270,45 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(libdbus_testutils_la_SOURCES) shell-test.c spawn-test.c \
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libdbus_testutils_internal_la_SOURCES) \
+ $(libdbus_testutils_la_SOURCES) $(manual_authz_SOURCES) \
$(test_corrupt_SOURCES) $(test_dbus_daemon_SOURCES) \
$(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \
$(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \
- $(test_refs_SOURCES) $(test_relay_SOURCES) test-segfault.c \
- test-service.c test-shell-service.c test-sleep-forever.c \
+ $(test_printf_SOURCES) $(test_refs_SOURCES) \
+ $(test_relay_SOURCES) test-segfault.c test-service.c \
+ $(test_shell_SOURCES) test-shell-service.c \
+ test-sleep-forever.c $(test_spawn_SOURCES) \
$(test_syntax_SOURCES) $(test_syslog_SOURCES)
-DIST_SOURCES = $(libdbus_testutils_la_SOURCES) shell-test.c \
- spawn-test.c $(test_corrupt_SOURCES) \
+DIST_SOURCES = $(libdbus_testutils_internal_la_SOURCES) \
+ $(am__libdbus_testutils_la_SOURCES_DIST) \
+ $(manual_authz_SOURCES) $(test_corrupt_SOURCES) \
$(test_dbus_daemon_SOURCES) \
$(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \
$(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \
- $(test_refs_SOURCES) $(test_relay_SOURCES) test-segfault.c \
- test-service.c test-shell-service.c test-sleep-forever.c \
+ $(test_printf_SOURCES) $(test_refs_SOURCES) \
+ $(test_relay_SOURCES) test-segfault.c test-service.c \
+ $(test_shell_SOURCES) test-shell-service.c \
+ test-sleep-forever.c $(test_spawn_SOURCES) \
$(test_syntax_SOURCES) $(test_syslog_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -242,14 +317,235 @@ am__can_run_installinfo = \
DATA = $(noinst_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
-@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_3)
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_8 = $(am__EXEEXT_3)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -304,7 +600,6 @@ DBUS_DAEMONDIR = @DBUS_DAEMONDIR@
DBUS_DATADIR = @DBUS_DATADIR@
DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
-DBUS_HAVE_INT64 = @DBUS_HAVE_INT64@
DBUS_INT16_TYPE = @DBUS_INT16_TYPE@
DBUS_INT32_TYPE = @DBUS_INT32_TYPE@
DBUS_INT64_CONSTANT = @DBUS_INT64_CONSTANT@
@@ -315,7 +610,8 @@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@
DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@
DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@
DBUS_PREFIX = @DBUS_PREFIX@
-DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@
+DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@
+DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@
DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@
DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
@@ -364,8 +660,6 @@ LIBDBUS_LIBS = @LIBDBUS_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
-LIBXML_CFLAGS = @LIBXML_CFLAGS@
-LIBXML_LIBS = @LIBXML_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
@@ -374,7 +668,6 @@ LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-MAN2HTML = @MAN2HTML@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NETWORK_libs = @NETWORK_libs@
@@ -408,7 +701,6 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
SYSTEMD_LIBS = @SYSTEMD_LIBS@
-TEST_BUS_BINARY = @TEST_BUS_BINARY@
TEST_LAUNCH_HELPER_BINARY = @TEST_LAUNCH_HELPER_BINARY@
TEST_LISTEN = @TEST_LISTEN@
TEST_SOCKET_DIR = @TEST_SOCKET_DIR@
@@ -503,106 +795,150 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
static_cppflags = \
$(AM_CPPFLAGS) \
-DDBUS_STATIC_BUILD \
+ -DDBUS_COMPILATION \
+ -DDBUS_TEST_USE_INTERNAL \
$(NULL)
-libdbus_testutils_la_CPPFLAGS = \
- $(static_cppflags)
+noinst_LTLIBRARIES = libdbus-testutils-internal.la $(am__append_1)
+@DBUS_WITH_DBUS_GLIB_TRUE@libdbus_testutils_la_SOURCES = \
+@DBUS_WITH_DBUS_GLIB_TRUE@ test-utils.c \
+@DBUS_WITH_DBUS_GLIB_TRUE@ test-utils.h \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(NULL)
+
+@DBUS_WITH_DBUS_GLIB_TRUE@libdbus_testutils_la_LIBADD = \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(top_builddir)/dbus/libdbus-1.la \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(GLIB_LIBS) \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(DBUS_GLIB_LIBS) \
+@DBUS_WITH_DBUS_GLIB_TRUE@ $(NULL)
+
+@DBUS_WITH_DBUS_GLIB_FALSE@testutils_shared_if_possible_cppflags = $(static_cppflags)
+@DBUS_WITH_DBUS_GLIB_TRUE@testutils_shared_if_possible_cppflags = $(AM_CPPFLAGS)
+@DBUS_WITH_DBUS_GLIB_FALSE@testutils_shared_if_possible_libs = libdbus-testutils-internal.la
+@DBUS_WITH_DBUS_GLIB_TRUE@testutils_shared_if_possible_libs = libdbus-testutils.la
+libdbus_testutils_internal_la_CPPFLAGS = \
+ $(static_cppflags) \
+ $(NULL)
-libdbus_testutils_la_SOURCES = \
+libdbus_testutils_internal_la_SOURCES = \
test-utils.c \
test-utils.h \
$(NULL)
-libdbus_testutils_la_LIBADD = \
+libdbus_testutils_internal_la_LIBADD = \
$(top_builddir)/dbus/libdbus-internal.la \
$(NULL)
-noinst_LTLIBRARIES = libdbus-testutils.la
-@DBUS_BUILD_TESTS_FALSE@TEST_BINARIES =
-@DBUS_BUILD_TESTS_TRUE@TEST_BINARIES = \
-@DBUS_BUILD_TESTS_TRUE@ spawn-test \
-@DBUS_BUILD_TESTS_TRUE@ test-exit \
-@DBUS_BUILD_TESTS_TRUE@ test-names \
-@DBUS_BUILD_TESTS_TRUE@ test-segfault \
-@DBUS_BUILD_TESTS_TRUE@ test-service \
-@DBUS_BUILD_TESTS_TRUE@ test-shell-service \
-@DBUS_BUILD_TESTS_TRUE@ test-sleep-forever \
-@DBUS_BUILD_TESTS_TRUE@ $(NULL)
+@DBUS_ENABLE_EMBEDDED_TESTS_FALSE@TEST_BINARIES =
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@TEST_BINARIES = \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-spawn \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-exit \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-names \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-segfault \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-service \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-shell-service \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-sleep-forever \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ $(NULL)
test_service_CPPFLAGS = $(static_cppflags)
-test_service_LDADD = libdbus-testutils.la
+test_service_LDADD = libdbus-testutils-internal.la
test_names_CPPFLAGS = $(static_cppflags)
-test_names_LDADD = libdbus-testutils.la
+test_names_LDADD = libdbus-testutils-internal.la
test_shell_service_CPPFLAGS = $(static_cppflags)
-test_shell_service_LDADD = libdbus-testutils.la
-shell_test_CPPFLAGS = $(static_cppflags)
-shell_test_LDADD = libdbus-testutils.la
-spawn_test_CPPFLAGS = $(static_cppflags)
-spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+test_shell_service_LDADD = libdbus-testutils-internal.la
+test_shell_SOURCES = shell-test.c
+test_shell_CPPFLAGS = $(static_cppflags)
+test_shell_LDADD = libdbus-testutils-internal.la
+test_spawn_SOURCES = spawn-test.c
+test_spawn_CPPFLAGS = $(static_cppflags)
+test_spawn_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+test_printf_SOURCES = internals/printf.c
+test_printf_CPPFLAGS = $(static_cppflags)
+test_printf_LDADD = $(top_builddir)/dbus/libdbus-internal.la
test_refs_SOURCES = internals/refs.c
test_refs_CPPFLAGS = $(static_cppflags)
-test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+test_refs_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS)
test_syslog_SOURCES = internals/syslog.c
test_syslog_CPPFLAGS = $(static_cppflags)
-test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+test_syslog_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS)
EXTRA_DIST = dbus-test-runner $(in_data) $(static_data)
testexecdir = $(libdir)/dbus-1.0/test
-installable_tests = shell-test $(NULL) $(am__append_2)
-installcheck_tests = $(am__append_4)
+installable_tests = test-shell test-printf $(NULL) $(am__append_3)
+installable_manual_tests = $(NULL) $(am__append_4)
+installcheck_tests = $(am__append_6)
installcheck_environment = \
+ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \
DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
TESTS_ENVIRONMENT = \
- DBUS_BLOCK_ON_ABORT=1 \
+ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
DBUS_FATAL_WARNINGS=1 \
DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
DBUS_TEST_DATA=@abs_top_builddir@/test/data \
DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
$(NULL)
+manual_authz_SOURCES = manual-authz.c
+manual_authz_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+manual_authz_LDADD = \
+ $(testutils_shared_if_possible_libs) \
+ $(GLIB_LIBS) \
+ $(NULL)
+
test_corrupt_SOURCES = corrupt.c
-test_corrupt_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_corrupt_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_corrupt_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_loopback_SOURCES = loopback.c
-test_loopback_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_loopback_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_loopback_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_relay_SOURCES = relay.c
-test_relay_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_relay_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_relay_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_dbus_daemon_SOURCES = dbus-daemon.c
-test_dbus_daemon_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_dbus_daemon_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_dbus_daemon_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_dbus_daemon_eavesdrop_SOURCES = dbus-daemon-eavesdrop.c
-test_dbus_daemon_eavesdrop_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
-test_dbus_daemon_eavesdrop_LDFLAGS = @R_DYNAMIC_LDFLAG@
-test_dbus_daemon_eavesdrop_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_dbus_daemon_eavesdrop_CPPFLAGS = $(testutils_shared_if_possible_cppflags)
+test_dbus_daemon_eavesdrop_LDADD = \
+ $(testutils_shared_if_possible_libs) \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_marshal_SOURCES = marshal.c
-test_marshal_LDADD = $(top_builddir)/dbus/libdbus-1.la \
+test_marshal_LDADD = \
+ $(top_builddir)/dbus/libdbus-1.la \
$(GLIB_LIBS) \
- $(DBUS_GLIB_LIBS)
+ $(NULL)
test_syntax_SOURCES = syntax.c
-test_syntax_LDADD = $(top_builddir)/dbus/libdbus-1.la \
- $(GLIB_LIBS)
+test_syntax_LDADD = \
+ $(top_builddir)/dbus/libdbus-1.la \
+ $(GLIB_LIBS) \
+ $(NULL)
in_data = \
data/valid-config-files-system/debug-allow-all-fail.conf.in \
data/valid-config-files-system/debug-allow-all-pass.conf.in \
data/valid-config-files/debug-allow-all-sha1.conf.in \
data/valid-config-files/debug-allow-all.conf.in \
+ data/valid-config-files/incoming-limit.conf.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \
data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \
@@ -672,7 +1008,6 @@ static_data = \
data/valid-config-files/basic.conf \
data/valid-config-files/basic.d/basic.conf \
data/valid-config-files/entities.conf \
- data/valid-config-files/incoming-limit.conf \
data/valid-config-files/many-rules.conf \
data/valid-config-files/system.d/test.conf \
data/valid-messages/array-of-array-of-uint32.message \
@@ -698,11 +1033,11 @@ imported_data = \
$(NULL)
noinst_DATA = $(imported_data)
-CLEANFILES = $(noinst_DATA)
+CLEANFILES = $(noinst_DATA) XDG_RUNTIME_DIR
all: all-recursive
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -736,14 +1071,20 @@ $(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libdbus-testutils-internal.la: $(libdbus_testutils_internal_la_OBJECTS) $(libdbus_testutils_internal_la_DEPENDENCIES) $(EXTRA_libdbus_testutils_internal_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(libdbus_testutils_internal_la_OBJECTS) $(libdbus_testutils_internal_la_LIBADD) $(LIBS)
+
libdbus-testutils.la: $(libdbus_testutils_la_OBJECTS) $(libdbus_testutils_la_DEPENDENCIES) $(EXTRA_libdbus_testutils_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libdbus_testutils_la_OBJECTS) $(libdbus_testutils_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(am_libdbus_testutils_la_rpath) $(libdbus_testutils_la_OBJECTS) $(libdbus_testutils_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -762,10 +1103,12 @@ install-testexecPROGRAMS: $(testexec_PROGRAMS)
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@@ -786,7 +1129,8 @@ uninstall-testexecPROGRAMS:
@list='$(testexec_PROGRAMS)'; test -n "$(testexecdir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(testexecdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(testexecdir)" && rm -f $$files
@@ -799,54 +1143,79 @@ clean-testexecPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-shell-test$(EXEEXT): $(shell_test_OBJECTS) $(shell_test_DEPENDENCIES) $(EXTRA_shell_test_DEPENDENCIES)
- @rm -f shell-test$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(shell_test_OBJECTS) $(shell_test_LDADD) $(LIBS)
-spawn-test$(EXEEXT): $(spawn_test_OBJECTS) $(spawn_test_DEPENDENCIES) $(EXTRA_spawn_test_DEPENDENCIES)
- @rm -f spawn-test$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(spawn_test_OBJECTS) $(spawn_test_LDADD) $(LIBS)
+
+manual-authz$(EXEEXT): $(manual_authz_OBJECTS) $(manual_authz_DEPENDENCIES) $(EXTRA_manual_authz_DEPENDENCIES)
+ @rm -f manual-authz$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(manual_authz_OBJECTS) $(manual_authz_LDADD) $(LIBS)
+
test-corrupt$(EXEEXT): $(test_corrupt_OBJECTS) $(test_corrupt_DEPENDENCIES) $(EXTRA_test_corrupt_DEPENDENCIES)
@rm -f test-corrupt$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_corrupt_OBJECTS) $(test_corrupt_LDADD) $(LIBS)
+
test-dbus-daemon$(EXEEXT): $(test_dbus_daemon_OBJECTS) $(test_dbus_daemon_DEPENDENCIES) $(EXTRA_test_dbus_daemon_DEPENDENCIES)
@rm -f test-dbus-daemon$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_dbus_daemon_OBJECTS) $(test_dbus_daemon_LDADD) $(LIBS)
+
test-dbus-daemon-eavesdrop$(EXEEXT): $(test_dbus_daemon_eavesdrop_OBJECTS) $(test_dbus_daemon_eavesdrop_DEPENDENCIES) $(EXTRA_test_dbus_daemon_eavesdrop_DEPENDENCIES)
@rm -f test-dbus-daemon-eavesdrop$(EXEEXT)
- $(AM_V_CCLD)$(test_dbus_daemon_eavesdrop_LINK) $(test_dbus_daemon_eavesdrop_OBJECTS) $(test_dbus_daemon_eavesdrop_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_dbus_daemon_eavesdrop_OBJECTS) $(test_dbus_daemon_eavesdrop_LDADD) $(LIBS)
+
test-exit$(EXEEXT): $(test_exit_OBJECTS) $(test_exit_DEPENDENCIES) $(EXTRA_test_exit_DEPENDENCIES)
@rm -f test-exit$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_exit_OBJECTS) $(test_exit_LDADD) $(LIBS)
+
test-loopback$(EXEEXT): $(test_loopback_OBJECTS) $(test_loopback_DEPENDENCIES) $(EXTRA_test_loopback_DEPENDENCIES)
@rm -f test-loopback$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_loopback_OBJECTS) $(test_loopback_LDADD) $(LIBS)
+
test-marshal$(EXEEXT): $(test_marshal_OBJECTS) $(test_marshal_DEPENDENCIES) $(EXTRA_test_marshal_DEPENDENCIES)
@rm -f test-marshal$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_marshal_OBJECTS) $(test_marshal_LDADD) $(LIBS)
+
test-names$(EXEEXT): $(test_names_OBJECTS) $(test_names_DEPENDENCIES) $(EXTRA_test_names_DEPENDENCIES)
@rm -f test-names$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_names_OBJECTS) $(test_names_LDADD) $(LIBS)
+
+test-printf$(EXEEXT): $(test_printf_OBJECTS) $(test_printf_DEPENDENCIES) $(EXTRA_test_printf_DEPENDENCIES)
+ @rm -f test-printf$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_printf_OBJECTS) $(test_printf_LDADD) $(LIBS)
+
test-refs$(EXEEXT): $(test_refs_OBJECTS) $(test_refs_DEPENDENCIES) $(EXTRA_test_refs_DEPENDENCIES)
@rm -f test-refs$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_refs_OBJECTS) $(test_refs_LDADD) $(LIBS)
+
test-relay$(EXEEXT): $(test_relay_OBJECTS) $(test_relay_DEPENDENCIES) $(EXTRA_test_relay_DEPENDENCIES)
@rm -f test-relay$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_relay_OBJECTS) $(test_relay_LDADD) $(LIBS)
+
test-segfault$(EXEEXT): $(test_segfault_OBJECTS) $(test_segfault_DEPENDENCIES) $(EXTRA_test_segfault_DEPENDENCIES)
@rm -f test-segfault$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_segfault_OBJECTS) $(test_segfault_LDADD) $(LIBS)
+
test-service$(EXEEXT): $(test_service_OBJECTS) $(test_service_DEPENDENCIES) $(EXTRA_test_service_DEPENDENCIES)
@rm -f test-service$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_service_OBJECTS) $(test_service_LDADD) $(LIBS)
+
+test-shell$(EXEEXT): $(test_shell_OBJECTS) $(test_shell_DEPENDENCIES) $(EXTRA_test_shell_DEPENDENCIES)
+ @rm -f test-shell$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_shell_OBJECTS) $(test_shell_LDADD) $(LIBS)
+
test-shell-service$(EXEEXT): $(test_shell_service_OBJECTS) $(test_shell_service_DEPENDENCIES) $(EXTRA_test_shell_service_DEPENDENCIES)
@rm -f test-shell-service$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_shell_service_OBJECTS) $(test_shell_service_LDADD) $(LIBS)
+
test-sleep-forever$(EXEEXT): $(test_sleep_forever_OBJECTS) $(test_sleep_forever_DEPENDENCIES) $(EXTRA_test_sleep_forever_DEPENDENCIES)
@rm -f test-sleep-forever$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sleep_forever_OBJECTS) $(test_sleep_forever_LDADD) $(LIBS)
+
+test-spawn$(EXEEXT): $(test_spawn_OBJECTS) $(test_spawn_DEPENDENCIES) $(EXTRA_test_spawn_DEPENDENCIES)
+ @rm -f test-spawn$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_spawn_OBJECTS) $(test_spawn_LDADD) $(LIBS)
+
test-syntax$(EXEEXT): $(test_syntax_OBJECTS) $(test_syntax_DEPENDENCIES) $(EXTRA_test_syntax_DEPENDENCIES)
@rm -f test-syntax$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_syntax_OBJECTS) $(test_syntax_LDADD) $(LIBS)
+
test-syslog$(EXEEXT): $(test_syslog_OBJECTS) $(test_syslog_DEPENDENCIES) $(EXTRA_test_syslog_DEPENDENCIES)
@rm -f test-syslog$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_syslog_OBJECTS) $(test_syslog_LDADD) $(LIBS)
@@ -857,23 +1226,26 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corrupt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-daemon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_testutils_la-test-utils.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loopback.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_testutils_internal_la-test-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manual_authz-manual-authz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marshal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relay.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell_test-shell-test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn_test-spawn-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syntax.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-exit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-segfault.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep-forever.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_corrupt-corrupt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dbus_daemon-dbus-daemon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_loopback-loopback.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_names-test-names.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_printf-printf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_refs-refs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_relay-relay.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_service-test-service.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shell-shell-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shell_service-test-shell-service.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spawn-spawn-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_syslog-syslog.Po@am__quote@
.c.o:
@@ -881,14 +1253,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -897,40 +1269,54 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-libdbus_testutils_la-test-utils.lo: test-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_testutils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_testutils_la-test-utils.lo -MD -MP -MF $(DEPDIR)/libdbus_testutils_la-test-utils.Tpo -c -o libdbus_testutils_la-test-utils.lo `test -f 'test-utils.c' || echo '$(srcdir)/'`test-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_testutils_la-test-utils.Tpo $(DEPDIR)/libdbus_testutils_la-test-utils.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-utils.c' object='libdbus_testutils_la-test-utils.lo' libtool=yes @AMDEPBACKSLASH@
+libdbus_testutils_internal_la-test-utils.lo: test-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_testutils_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_testutils_internal_la-test-utils.lo -MD -MP -MF $(DEPDIR)/libdbus_testutils_internal_la-test-utils.Tpo -c -o libdbus_testutils_internal_la-test-utils.lo `test -f 'test-utils.c' || echo '$(srcdir)/'`test-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_testutils_internal_la-test-utils.Tpo $(DEPDIR)/libdbus_testutils_internal_la-test-utils.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-utils.c' object='libdbus_testutils_internal_la-test-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_testutils_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_testutils_internal_la-test-utils.lo `test -f 'test-utils.c' || echo '$(srcdir)/'`test-utils.c
+
+manual_authz-manual-authz.o: manual-authz.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_authz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT manual_authz-manual-authz.o -MD -MP -MF $(DEPDIR)/manual_authz-manual-authz.Tpo -c -o manual_authz-manual-authz.o `test -f 'manual-authz.c' || echo '$(srcdir)/'`manual-authz.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/manual_authz-manual-authz.Tpo $(DEPDIR)/manual_authz-manual-authz.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='manual-authz.c' object='manual_authz-manual-authz.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_authz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_authz-manual-authz.o `test -f 'manual-authz.c' || echo '$(srcdir)/'`manual-authz.c
+
+manual_authz-manual-authz.obj: manual-authz.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_authz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT manual_authz-manual-authz.obj -MD -MP -MF $(DEPDIR)/manual_authz-manual-authz.Tpo -c -o manual_authz-manual-authz.obj `if test -f 'manual-authz.c'; then $(CYGPATH_W) 'manual-authz.c'; else $(CYGPATH_W) '$(srcdir)/manual-authz.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/manual_authz-manual-authz.Tpo $(DEPDIR)/manual_authz-manual-authz.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='manual-authz.c' object='manual_authz-manual-authz.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_testutils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_testutils_la-test-utils.lo `test -f 'test-utils.c' || echo '$(srcdir)/'`test-utils.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_authz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_authz-manual-authz.obj `if test -f 'manual-authz.c'; then $(CYGPATH_W) 'manual-authz.c'; else $(CYGPATH_W) '$(srcdir)/manual-authz.c'; fi`
-shell_test-shell-test.o: shell-test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shell_test-shell-test.o -MD -MP -MF $(DEPDIR)/shell_test-shell-test.Tpo -c -o shell_test-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shell_test-shell-test.Tpo $(DEPDIR)/shell_test-shell-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='shell_test-shell-test.o' libtool=no @AMDEPBACKSLASH@
+test_corrupt-corrupt.o: corrupt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_corrupt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_corrupt-corrupt.o -MD -MP -MF $(DEPDIR)/test_corrupt-corrupt.Tpo -c -o test_corrupt-corrupt.o `test -f 'corrupt.c' || echo '$(srcdir)/'`corrupt.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_corrupt-corrupt.Tpo $(DEPDIR)/test_corrupt-corrupt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='corrupt.c' object='test_corrupt-corrupt.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shell_test-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_corrupt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_corrupt-corrupt.o `test -f 'corrupt.c' || echo '$(srcdir)/'`corrupt.c
-shell_test-shell-test.obj: shell-test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shell_test-shell-test.obj -MD -MP -MF $(DEPDIR)/shell_test-shell-test.Tpo -c -o shell_test-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shell_test-shell-test.Tpo $(DEPDIR)/shell_test-shell-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='shell_test-shell-test.obj' libtool=no @AMDEPBACKSLASH@
+test_corrupt-corrupt.obj: corrupt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_corrupt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_corrupt-corrupt.obj -MD -MP -MF $(DEPDIR)/test_corrupt-corrupt.Tpo -c -o test_corrupt-corrupt.obj `if test -f 'corrupt.c'; then $(CYGPATH_W) 'corrupt.c'; else $(CYGPATH_W) '$(srcdir)/corrupt.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_corrupt-corrupt.Tpo $(DEPDIR)/test_corrupt-corrupt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='corrupt.c' object='test_corrupt-corrupt.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shell_test-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_corrupt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_corrupt-corrupt.obj `if test -f 'corrupt.c'; then $(CYGPATH_W) 'corrupt.c'; else $(CYGPATH_W) '$(srcdir)/corrupt.c'; fi`
-spawn_test-spawn-test.o: spawn-test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spawn_test-spawn-test.o -MD -MP -MF $(DEPDIR)/spawn_test-spawn-test.Tpo -c -o spawn_test-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spawn_test-spawn-test.Tpo $(DEPDIR)/spawn_test-spawn-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='spawn_test-spawn-test.o' libtool=no @AMDEPBACKSLASH@
+test_dbus_daemon-dbus-daemon.o: dbus-daemon.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_dbus_daemon-dbus-daemon.o -MD -MP -MF $(DEPDIR)/test_dbus_daemon-dbus-daemon.Tpo -c -o test_dbus_daemon-dbus-daemon.o `test -f 'dbus-daemon.c' || echo '$(srcdir)/'`dbus-daemon.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_dbus_daemon-dbus-daemon.Tpo $(DEPDIR)/test_dbus_daemon-dbus-daemon.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-daemon.c' object='test_dbus_daemon-dbus-daemon.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spawn_test-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_dbus_daemon-dbus-daemon.o `test -f 'dbus-daemon.c' || echo '$(srcdir)/'`dbus-daemon.c
-spawn_test-spawn-test.obj: spawn-test.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spawn_test-spawn-test.obj -MD -MP -MF $(DEPDIR)/spawn_test-spawn-test.Tpo -c -o spawn_test-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spawn_test-spawn-test.Tpo $(DEPDIR)/spawn_test-spawn-test.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='spawn_test-spawn-test.obj' libtool=no @AMDEPBACKSLASH@
+test_dbus_daemon-dbus-daemon.obj: dbus-daemon.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_dbus_daemon-dbus-daemon.obj -MD -MP -MF $(DEPDIR)/test_dbus_daemon-dbus-daemon.Tpo -c -o test_dbus_daemon-dbus-daemon.obj `if test -f 'dbus-daemon.c'; then $(CYGPATH_W) 'dbus-daemon.c'; else $(CYGPATH_W) '$(srcdir)/dbus-daemon.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_dbus_daemon-dbus-daemon.Tpo $(DEPDIR)/test_dbus_daemon-dbus-daemon.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-daemon.c' object='test_dbus_daemon-dbus-daemon.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spawn_test-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_dbus_daemon-dbus-daemon.obj `if test -f 'dbus-daemon.c'; then $(CYGPATH_W) 'dbus-daemon.c'; else $(CYGPATH_W) '$(srcdir)/dbus-daemon.c'; fi`
test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.o: dbus-daemon-eavesdrop.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbus_daemon_eavesdrop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.o -MD -MP -MF $(DEPDIR)/test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.Tpo -c -o test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.o `test -f 'dbus-daemon-eavesdrop.c' || echo '$(srcdir)/'`dbus-daemon-eavesdrop.c
@@ -946,6 +1332,20 @@ test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.obj: dbus-daemon-eavesdrop.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbus_daemon_eavesdrop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.obj `if test -f 'dbus-daemon-eavesdrop.c'; then $(CYGPATH_W) 'dbus-daemon-eavesdrop.c'; else $(CYGPATH_W) '$(srcdir)/dbus-daemon-eavesdrop.c'; fi`
+test_loopback-loopback.o: loopback.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_loopback_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_loopback-loopback.o -MD -MP -MF $(DEPDIR)/test_loopback-loopback.Tpo -c -o test_loopback-loopback.o `test -f 'loopback.c' || echo '$(srcdir)/'`loopback.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_loopback-loopback.Tpo $(DEPDIR)/test_loopback-loopback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loopback.c' object='test_loopback-loopback.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_loopback_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_loopback-loopback.o `test -f 'loopback.c' || echo '$(srcdir)/'`loopback.c
+
+test_loopback-loopback.obj: loopback.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_loopback_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_loopback-loopback.obj -MD -MP -MF $(DEPDIR)/test_loopback-loopback.Tpo -c -o test_loopback-loopback.obj `if test -f 'loopback.c'; then $(CYGPATH_W) 'loopback.c'; else $(CYGPATH_W) '$(srcdir)/loopback.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_loopback-loopback.Tpo $(DEPDIR)/test_loopback-loopback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loopback.c' object='test_loopback-loopback.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_loopback_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_loopback-loopback.obj `if test -f 'loopback.c'; then $(CYGPATH_W) 'loopback.c'; else $(CYGPATH_W) '$(srcdir)/loopback.c'; fi`
+
test_names-test-names.o: test-names.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_names_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_names-test-names.o -MD -MP -MF $(DEPDIR)/test_names-test-names.Tpo -c -o test_names-test-names.o `test -f 'test-names.c' || echo '$(srcdir)/'`test-names.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_names-test-names.Tpo $(DEPDIR)/test_names-test-names.Po
@@ -960,6 +1360,20 @@ test_names-test-names.obj: test-names.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_names_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_names-test-names.obj `if test -f 'test-names.c'; then $(CYGPATH_W) 'test-names.c'; else $(CYGPATH_W) '$(srcdir)/test-names.c'; fi`
+test_printf-printf.o: internals/printf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_printf_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_printf-printf.o -MD -MP -MF $(DEPDIR)/test_printf-printf.Tpo -c -o test_printf-printf.o `test -f 'internals/printf.c' || echo '$(srcdir)/'`internals/printf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_printf-printf.Tpo $(DEPDIR)/test_printf-printf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='internals/printf.c' object='test_printf-printf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_printf_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_printf-printf.o `test -f 'internals/printf.c' || echo '$(srcdir)/'`internals/printf.c
+
+test_printf-printf.obj: internals/printf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_printf_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_printf-printf.obj -MD -MP -MF $(DEPDIR)/test_printf-printf.Tpo -c -o test_printf-printf.obj `if test -f 'internals/printf.c'; then $(CYGPATH_W) 'internals/printf.c'; else $(CYGPATH_W) '$(srcdir)/internals/printf.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_printf-printf.Tpo $(DEPDIR)/test_printf-printf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='internals/printf.c' object='test_printf-printf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_printf_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_printf-printf.obj `if test -f 'internals/printf.c'; then $(CYGPATH_W) 'internals/printf.c'; else $(CYGPATH_W) '$(srcdir)/internals/printf.c'; fi`
+
test_refs-refs.o: internals/refs.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_refs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_refs-refs.o -MD -MP -MF $(DEPDIR)/test_refs-refs.Tpo -c -o test_refs-refs.o `test -f 'internals/refs.c' || echo '$(srcdir)/'`internals/refs.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refs-refs.Tpo $(DEPDIR)/test_refs-refs.Po
@@ -974,6 +1388,20 @@ test_refs-refs.obj: internals/refs.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_refs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_refs-refs.obj `if test -f 'internals/refs.c'; then $(CYGPATH_W) 'internals/refs.c'; else $(CYGPATH_W) '$(srcdir)/internals/refs.c'; fi`
+test_relay-relay.o: relay.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_relay_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_relay-relay.o -MD -MP -MF $(DEPDIR)/test_relay-relay.Tpo -c -o test_relay-relay.o `test -f 'relay.c' || echo '$(srcdir)/'`relay.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_relay-relay.Tpo $(DEPDIR)/test_relay-relay.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='relay.c' object='test_relay-relay.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_relay_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_relay-relay.o `test -f 'relay.c' || echo '$(srcdir)/'`relay.c
+
+test_relay-relay.obj: relay.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_relay_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_relay-relay.obj -MD -MP -MF $(DEPDIR)/test_relay-relay.Tpo -c -o test_relay-relay.obj `if test -f 'relay.c'; then $(CYGPATH_W) 'relay.c'; else $(CYGPATH_W) '$(srcdir)/relay.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_relay-relay.Tpo $(DEPDIR)/test_relay-relay.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='relay.c' object='test_relay-relay.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_relay_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_relay-relay.obj `if test -f 'relay.c'; then $(CYGPATH_W) 'relay.c'; else $(CYGPATH_W) '$(srcdir)/relay.c'; fi`
+
test_service-test-service.o: test-service.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_service-test-service.o -MD -MP -MF $(DEPDIR)/test_service-test-service.Tpo -c -o test_service-test-service.o `test -f 'test-service.c' || echo '$(srcdir)/'`test-service.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_service-test-service.Tpo $(DEPDIR)/test_service-test-service.Po
@@ -988,6 +1416,20 @@ test_service-test-service.obj: test-service.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_service-test-service.obj `if test -f 'test-service.c'; then $(CYGPATH_W) 'test-service.c'; else $(CYGPATH_W) '$(srcdir)/test-service.c'; fi`
+test_shell-shell-test.o: shell-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_shell-shell-test.o -MD -MP -MF $(DEPDIR)/test_shell-shell-test.Tpo -c -o test_shell-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_shell-shell-test.Tpo $(DEPDIR)/test_shell-shell-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='test_shell-shell-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_shell-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c
+
+test_shell-shell-test.obj: shell-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_shell-shell-test.obj -MD -MP -MF $(DEPDIR)/test_shell-shell-test.Tpo -c -o test_shell-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_shell-shell-test.Tpo $(DEPDIR)/test_shell-shell-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='test_shell-shell-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_shell-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi`
+
test_shell_service-test-shell-service.o: test-shell-service.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_shell_service-test-shell-service.o -MD -MP -MF $(DEPDIR)/test_shell_service-test-shell-service.Tpo -c -o test_shell_service-test-shell-service.o `test -f 'test-shell-service.c' || echo '$(srcdir)/'`test-shell-service.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_shell_service-test-shell-service.Tpo $(DEPDIR)/test_shell_service-test-shell-service.Po
@@ -1002,6 +1444,20 @@ test_shell_service-test-shell-service.obj: test-shell-service.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_shell_service-test-shell-service.obj `if test -f 'test-shell-service.c'; then $(CYGPATH_W) 'test-shell-service.c'; else $(CYGPATH_W) '$(srcdir)/test-shell-service.c'; fi`
+test_spawn-spawn-test.o: spawn-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_spawn-spawn-test.o -MD -MP -MF $(DEPDIR)/test_spawn-spawn-test.Tpo -c -o test_spawn-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_spawn-spawn-test.Tpo $(DEPDIR)/test_spawn-spawn-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='test_spawn-spawn-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_spawn-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c
+
+test_spawn-spawn-test.obj: spawn-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_spawn-spawn-test.obj -MD -MP -MF $(DEPDIR)/test_spawn-spawn-test.Tpo -c -o test_spawn-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_spawn-spawn-test.Tpo $(DEPDIR)/test_spawn-spawn-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='test_spawn-spawn-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_spawn-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi`
+
test_syslog-syslog.o: internals/syslog.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_syslog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_syslog-syslog.o -MD -MP -MF $(DEPDIR)/test_syslog-syslog.Tpo -c -o test_syslog-syslog.o `test -f 'internals/syslog.c' || echo '$(srcdir)/'`internals/syslog.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_syslog-syslog.Tpo $(DEPDIR)/test_syslog-syslog.Po
@@ -1023,22 +1479,25 @@ clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -1053,57 +1512,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -1119,12 +1533,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -1136,15 +1545,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -1153,102 +1558,285 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
else \
- skipped="($$skip tests were not run)"; \
+ color_start= color_end=; \
fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- fi; \
- echo "$${col}$$dashes$${std}"; \
- echo "$${col}$$banner$${std}"; \
- test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
- test -z "$$report" || echo "$${col}$$report$${std}"; \
- echo "$${col}$$dashes$${std}"; \
- test "$$failed" -eq 0; \
- else :; fi
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+test-shell.log: test-shell$(EXEEXT)
+ @p='test-shell$(EXEEXT)'; \
+ b='test-shell'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-printf.log: test-printf$(EXEEXT)
+ @p='test-printf$(EXEEXT)'; \
+ b='test-printf'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-corrupt.log: test-corrupt$(EXEEXT)
+ @p='test-corrupt$(EXEEXT)'; \
+ b='test-corrupt'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-dbus-daemon.log: test-dbus-daemon$(EXEEXT)
+ @p='test-dbus-daemon$(EXEEXT)'; \
+ b='test-dbus-daemon'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-dbus-daemon-eavesdrop.log: test-dbus-daemon-eavesdrop$(EXEEXT)
+ @p='test-dbus-daemon-eavesdrop$(EXEEXT)'; \
+ b='test-dbus-daemon-eavesdrop'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-loopback.log: test-loopback$(EXEEXT)
+ @p='test-loopback$(EXEEXT)'; \
+ b='test-loopback'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-marshal.log: test-marshal$(EXEEXT)
+ @p='test-marshal$(EXEEXT)'; \
+ b='test-marshal'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-refs.log: test-refs$(EXEEXT)
+ @p='test-refs$(EXEEXT)'; \
+ b='test-refs'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-relay.log: test-relay$(EXEEXT)
+ @p='test-relay$(EXEEXT)'; \
+ b='test-relay'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-syntax.log: test-syntax$(EXEEXT)
+ @p='test-syntax$(EXEEXT)'; \
+ b='test-syntax'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-syslog.log: test-syslog$(EXEEXT)
+ @p='test-syslog$(EXEEXT)'; \
+ b='test-syslog'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../bus/test-bus.log: ../bus/test-bus$(EXEEXT)
+ @p='../bus/test-bus$(EXEEXT)'; \
+ b='../bus/test-bus'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../bus/test-bus-system.log: ../bus/test-bus-system$(EXEEXT)
+ @p='../bus/test-bus-system$(EXEEXT)'; \
+ b='../bus/test-bus-system'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../dbus/test-dbus.log: ../dbus/test-dbus$(EXEEXT)
+ @p='../dbus/test-dbus$(EXEEXT)'; \
+ b='../dbus/test-dbus'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+../bus/test-bus-launch-helper.log: ../bus/test-bus-launch-helper$(EXEEXT)
+ @p='../bus/test-bus-launch-helper$(EXEEXT)'; \
+ b='../bus/test-bus-launch-helper'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1334,6 +1922,9 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1417,14 +2008,12 @@ ps-am:
uninstall-am: uninstall-testexecPROGRAMS
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
- ctags-recursive install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am all-local check check-TESTS check-am clean \
- clean-generic clean-libtool clean-local \
- clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
- clean-testexecPROGRAMS ctags ctags-recursive distclean \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+ check check-TESTS check-am clean clean-generic clean-libtool \
+ clean-local clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+ clean-testexecPROGRAMS cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
@@ -1435,8 +2024,8 @@ uninstall-am: uninstall-testexecPROGRAMS
installcheck-am installcheck-local installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-testexecPROGRAMS
+ pdf pdf-am ps ps-am recheck tags tags-am uninstall \
+ uninstall-am uninstall-testexecPROGRAMS
# If we're installing the tests into a DESTDIR we can't run them
@@ -1471,11 +2060,7 @@ clean-local:
rm -f $(static_data); \
fi
-data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
- $(AM_V_at)$(MKDIR_P) data/valid-config-files
- $(AM_V_GEN)cp $< $@
-
-data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
+$(imported_data): data/valid-config-files/%.conf: $(top_builddir)/bus/%.conf
$(AM_V_at)$(MKDIR_P) data/valid-config-files
$(AM_V_GEN)cp $< $@
diff --git a/test/corrupt.c b/test/corrupt.c
index 02495901..1a7d4460 100644
--- a/test/corrupt.c
+++ b/test/corrupt.c
@@ -30,10 +30,12 @@
#include <gio/gio.h>
#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
+
+#include "test-utils.h"
typedef struct {
DBusError e;
+ TestMainContext *ctx;
DBusServer *server;
DBusConnection *server_conn;
@@ -72,13 +74,14 @@ new_conn_cb (DBusServer *server,
g_assert (f->server_conn == NULL);
f->server_conn = dbus_connection_ref (server_conn);
- dbus_connection_setup_with_g_main (server_conn, NULL);
+ test_connection_setup (f->ctx, server_conn);
}
static void
setup (Fixture *f,
gconstpointer addr)
{
+ f->ctx = test_main_context_get ();
dbus_error_init (&f->e);
g_queue_init (&f->client_messages);
@@ -88,7 +91,7 @@ setup (Fixture *f,
dbus_server_set_new_connection_function (f->server,
new_conn_cb, f, NULL);
- dbus_server_setup_with_g_main (f->server, NULL);
+ test_server_setup (f->ctx, f->server);
}
static void
@@ -103,12 +106,12 @@ test_connect (Fixture *f,
dbus_server_get_address (f->server), &f->e);
assert_no_error (&f->e);
g_assert (f->client_conn != NULL);
- dbus_connection_setup_with_g_main (f->client_conn, NULL);
+ test_connection_setup (f->ctx, f->client_conn);
while (f->server_conn == NULL)
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
have_mem = dbus_connection_add_filter (f->client_conn,
@@ -137,7 +140,7 @@ test_message (Fixture *f,
while (g_queue_is_empty (&f->client_messages))
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
g_assert_cmpuint (g_queue_get_length (&f->client_messages), ==, 1);
@@ -229,7 +232,7 @@ test_corrupt (Fixture *f,
while (g_queue_is_empty (&f->client_messages))
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
incoming = g_queue_pop_head (&f->client_messages);
@@ -246,6 +249,16 @@ test_corrupt (Fixture *f,
"/org/freedesktop/DBus/Local");
dbus_message_unref (incoming);
+
+ /* Free the DBusConnection before the GSocket, because GSocket is
+ * going to close our fd. GSocket tolerates closing an already-closed
+ * fd, whereas DBusLoop + DBusSocketSetEpoll doesn't. On Unix
+ * we could use dup() but that isn't portable to Windows :-(
+ */
+ dbus_connection_close (f->server_conn);
+ dbus_connection_unref (f->server_conn);
+ f->server_conn = NULL;
+
g_object_unref (socket);
}
@@ -308,7 +321,7 @@ test_byte_order (Fixture *f,
while (g_queue_is_empty (&f->client_messages))
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
message = g_queue_pop_head (&f->client_messages);
@@ -325,6 +338,12 @@ test_byte_order (Fixture *f,
"/org/freedesktop/DBus/Local");
dbus_message_unref (message);
+
+ /* Free the DBusConnection before the GSocket, as above. */
+ dbus_connection_close (f->server_conn);
+ dbus_connection_unref (f->server_conn);
+ f->server_conn = NULL;
+
g_object_unref (socket);
}
@@ -352,6 +371,8 @@ teardown (Fixture *f,
dbus_server_unref (f->server);
f->server = NULL;
}
+
+ test_main_context_unref (f->ctx);
}
int
diff --git a/test/data/valid-config-files/incoming-limit.conf b/test/data/valid-config-files/incoming-limit.conf.in
index abfab3f7..40ff2244 100644
--- a/test/data/valid-config-files/incoming-limit.conf
+++ b/test/data/valid-config-files/incoming-limit.conf.in
@@ -3,7 +3,7 @@
<busconfig>
<!-- Our well-known bus type, don't change this -->
<type>session</type>
- <listen>unix:tmpdir=/tmp</listen>
+ <listen>@TEST_LISTEN@</listen>
<policy context="default">
<!-- Allow everything to be sent -->
diff --git a/test/dbus-daemon-eavesdrop.c b/test/dbus-daemon-eavesdrop.c
index 0bd923d2..a78d8888 100644
--- a/test/dbus-daemon-eavesdrop.c
+++ b/test/dbus-daemon-eavesdrop.c
@@ -30,7 +30,6 @@
#include <glib.h>
#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
#include <string.h>
@@ -42,6 +41,8 @@
# include <unistd.h>
#endif
+#include "test-utils.h"
+
#define SENDER_NAME "test.eavesdrop.sender"
#define SENDER_PATH "/test/eavesdrop/sender"
#define SENDER_IFACE SENDER_NAME
@@ -71,6 +72,7 @@ typedef enum {
} SignalDst;
typedef struct {
+ TestMainContext *ctx;
DBusError e;
GError *ge;
@@ -149,6 +151,8 @@ spawn_dbus_daemon (gchar *binary,
if (newline != NULL)
{
+ if ((newline > address->str) && ('\r' == newline[-1]))
+ newline -= 1;
g_string_truncate (address, newline - address->str);
break;
}
@@ -160,7 +164,8 @@ spawn_dbus_daemon (gchar *binary,
}
static DBusConnection *
-connect_to_bus (const gchar *address)
+connect_to_bus (Fixture *f,
+ const gchar *address)
{
DBusConnection *conn;
DBusError error = DBUS_ERROR_INIT;
@@ -175,7 +180,7 @@ connect_to_bus (const gchar *address)
g_assert (ok);
g_assert (dbus_bus_get_unique_name (conn) != NULL);
- dbus_connection_setup_with_g_main (conn, NULL);
+ test_connection_setup (f->ctx, conn);
return conn;
}
@@ -380,6 +385,8 @@ setup (Fixture *f,
gchar *config;
gchar *address;
+ f->ctx = test_main_context_get ();
+
f->ge = NULL;
dbus_error_init (&f->e);
@@ -404,17 +411,24 @@ setup (Fixture *f,
config = g_strdup ("--session");
}
- address = spawn_dbus_daemon (dbus_daemon, config, &f->daemon_pid);
+ if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL)
+ {
+ address = g_strdup (g_getenv ("DBUS_TEST_DAEMON_ADDRESS"));
+ }
+ else
+ {
+ address = spawn_dbus_daemon (dbus_daemon, config, &f->daemon_pid);
+ }
g_free (dbus_daemon);
g_free (config);
- f->sender = connect_to_bus (address);
+ f->sender = connect_to_bus (f, address);
dbus_bus_request_name (f->sender, SENDER_NAME, DBUS_NAME_FLAG_DO_NOT_QUEUE,
&(f->e));
- f->receiver = connect_to_bus (address);
- f->eavesdropper = connect_to_bus (address);
- f->politelistener = connect_to_bus (address);
+ f->receiver = connect_to_bus (f, address);
+ f->eavesdropper = connect_to_bus (f, address);
+ f->politelistener = connect_to_bus (f, address);
add_receiver_filter (f);
add_politelistener_filter (f);
add_eavesdropper_filter (f);
@@ -432,7 +446,7 @@ test_eavesdrop_broadcast (Fixture *f,
while (!f->receiver_got_stopper ||
!f->politelistener_got_stopper ||
!f->eavesdropper_got_stopper)
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
/* all the three connection can receive a broadcast */
g_assert_cmpint (f->receiver_dst, ==, BROADCAST);
@@ -452,7 +466,7 @@ test_eavesdrop_unicast_to_sender (Fixture *f,
while (!f->receiver_got_stopper ||
!f->politelistener_got_stopper ||
!f->eavesdropper_got_stopper)
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
/* not directed to it and not broadcasted, they cannot receive it */
g_assert_cmpint (f->receiver_dst, ==, NONE_YET);
@@ -472,7 +486,7 @@ test_eavesdrop_unicast_to_receiver (Fixture *f,
while (!f->receiver_got_stopper ||
!f->politelistener_got_stopper ||
!f->eavesdropper_got_stopper)
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
/* direct to him */
g_assert_cmpint (f->receiver_dst, ==, TO_ME);
@@ -534,6 +548,8 @@ teardown (Fixture *f,
#endif
g_spawn_close_pid (f->daemon_pid);
+
+ test_main_context_unref (f->ctx);
}
int
diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c
index cc871530..dc0f1317 100644
--- a/test/dbus-daemon.c
+++ b/test/dbus-daemon.c
@@ -29,7 +29,6 @@
#include <glib.h>
#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
#include <string.h>
@@ -39,11 +38,16 @@
#else
# include <signal.h>
# include <unistd.h>
+# include <sys/types.h>
#endif
+#include "test-utils.h"
+
typedef struct {
gboolean skip;
+ TestMainContext *ctx;
+
DBusError e;
GError *ge;
@@ -115,6 +119,8 @@ spawn_dbus_daemon (gchar *binary,
if (newline != NULL)
{
+ if ((newline > address->str) && ('\r' == newline[-1]))
+ newline -= 1;
g_string_truncate (address, newline - address->str);
break;
}
@@ -126,7 +132,8 @@ spawn_dbus_daemon (gchar *binary,
}
static DBusConnection *
-connect_to_bus (const gchar *address)
+connect_to_bus (Fixture *f,
+ const gchar *address)
{
DBusConnection *conn;
DBusError error = DBUS_ERROR_INIT;
@@ -141,7 +148,7 @@ connect_to_bus (const gchar *address)
g_assert (ok);
g_assert (dbus_bus_get_unique_name (conn) != NULL);
- dbus_connection_setup_with_g_main (conn, NULL);
+ test_connection_setup (f->ctx, conn);
return conn;
}
@@ -183,11 +190,20 @@ setup (Fixture *f,
gchar *arg;
gchar *address;
+ f->ctx = test_main_context_get ();
f->ge = NULL;
dbus_error_init (&f->e);
if (config != NULL && config->config_file != NULL)
{
+ if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL)
+ {
+ g_message ("SKIP: cannot use DBUS_TEST_DAEMON_ADDRESS for "
+ "unusally-configured dbus-daemon");
+ f->skip = TRUE;
+ return;
+ }
+
if (g_getenv ("DBUS_TEST_DATA") == NULL)
{
g_message ("SKIP: set DBUS_TEST_DATA to a directory containing %s",
@@ -221,13 +237,20 @@ setup (Fixture *f,
if (dbus_daemon == NULL)
dbus_daemon = g_strdup ("dbus-daemon");
- address = spawn_dbus_daemon (dbus_daemon, arg, &f->daemon_pid);
+ if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL)
+ {
+ address = g_strdup (g_getenv ("DBUS_TEST_DAEMON_ADDRESS"));
+ }
+ else
+ {
+ address = spawn_dbus_daemon (dbus_daemon, arg, &f->daemon_pid);
+ }
g_free (dbus_daemon);
g_free (arg);
- f->left_conn = connect_to_bus (address);
- f->right_conn = connect_to_bus (address);
+ f->left_conn = connect_to_bus (f, address);
+ f->right_conn = connect_to_bus (f, address);
g_free (address);
}
@@ -301,7 +324,7 @@ test_echo (Fixture *f,
}
while (received < count)
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
elapsed = g_test_timer_elapsed ();
@@ -310,6 +333,216 @@ test_echo (Fixture *f,
}
static void
+pending_call_store_reply (DBusPendingCall *pc,
+ void *data)
+{
+ DBusMessage **message_p = data;
+
+ *message_p = dbus_pending_call_steal_reply (pc);
+ g_assert (*message_p != NULL);
+}
+
+static void
+test_creds (Fixture *f,
+ gconstpointer context)
+{
+ const char *unique = dbus_bus_get_unique_name (f->left_conn);
+ DBusMessage *m = dbus_message_new_method_call (DBUS_SERVICE_DBUS,
+ DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "GetConnectionCredentials");
+ DBusPendingCall *pc;
+ DBusMessageIter args_iter;
+ DBusMessageIter arr_iter;
+ DBusMessageIter pair_iter;
+ DBusMessageIter var_iter;
+ enum {
+ SEEN_UNIX_USER = 1,
+ SEEN_PID = 2,
+ SEEN_WINDOWS_SID = 4
+ } seen = 0;
+
+ if (m == NULL)
+ g_error ("OOM");
+
+ if (!dbus_message_append_args (m,
+ DBUS_TYPE_STRING, &unique,
+ DBUS_TYPE_INVALID))
+ g_error ("OOM");
+
+ if (!dbus_connection_send_with_reply (f->left_conn, m, &pc,
+ DBUS_TIMEOUT_USE_DEFAULT) ||
+ pc == NULL)
+ g_error ("OOM");
+
+ dbus_message_unref (m);
+ m = NULL;
+
+ if (dbus_pending_call_get_completed (pc))
+ pending_call_store_reply (pc, &m);
+ else if (!dbus_pending_call_set_notify (pc, pending_call_store_reply,
+ &m, NULL))
+ g_error ("OOM");
+
+ while (m == NULL)
+ test_main_context_iterate (f->ctx, TRUE);
+
+ g_assert_cmpstr (dbus_message_get_signature (m), ==, "a{sv}");
+
+ dbus_message_iter_init (m, &args_iter);
+ g_assert_cmpuint (dbus_message_iter_get_arg_type (&args_iter), ==,
+ DBUS_TYPE_ARRAY);
+ g_assert_cmpuint (dbus_message_iter_get_element_type (&args_iter), ==,
+ DBUS_TYPE_DICT_ENTRY);
+ dbus_message_iter_recurse (&args_iter, &arr_iter);
+
+ while (dbus_message_iter_get_arg_type (&arr_iter) != DBUS_TYPE_INVALID)
+ {
+ const char *name;
+
+ dbus_message_iter_recurse (&arr_iter, &pair_iter);
+ g_assert_cmpuint (dbus_message_iter_get_arg_type (&pair_iter), ==,
+ DBUS_TYPE_STRING);
+ dbus_message_iter_get_basic (&pair_iter, &name);
+ dbus_message_iter_next (&pair_iter);
+ g_assert_cmpuint (dbus_message_iter_get_arg_type (&pair_iter), ==,
+ DBUS_TYPE_VARIANT);
+ dbus_message_iter_recurse (&pair_iter, &var_iter);
+
+ if (g_strcmp0 (name, "UnixUserID") == 0)
+ {
+#ifdef G_OS_UNIX
+ guint32 u32;
+
+ g_assert (!(seen & SEEN_UNIX_USER));
+ g_assert_cmpuint (dbus_message_iter_get_arg_type (&var_iter), ==,
+ DBUS_TYPE_UINT32);
+ dbus_message_iter_get_basic (&var_iter, &u32);
+ g_message ("%s of this process is %u", name, u32);
+ g_assert_cmpuint (u32, ==, geteuid ());
+ seen |= SEEN_UNIX_USER;
+#else
+ g_assert_not_reached ();
+#endif
+ }
+ else if (g_strcmp0 (name, "ProcessID") == 0)
+ {
+ guint32 u32;
+
+ g_assert (!(seen & SEEN_PID));
+ g_assert_cmpuint (dbus_message_iter_get_arg_type (&var_iter), ==,
+ DBUS_TYPE_UINT32);
+ dbus_message_iter_get_basic (&var_iter, &u32);
+ g_message ("%s of this process is %u", name, u32);
+#ifdef G_OS_UNIX
+ g_assert_cmpuint (u32, ==, getpid ());
+#elif defined(G_OS_WIN32)
+ g_assert_cmpuint (u32, ==, GetCurrentProcessId ());
+#else
+ g_assert_not_reached ();
+#endif
+ seen |= SEEN_PID;
+ }
+
+ dbus_message_iter_next (&arr_iter);
+ }
+
+#ifdef G_OS_UNIX
+ g_assert (seen & SEEN_UNIX_USER);
+ g_assert (seen & SEEN_PID);
+#endif
+
+#ifdef G_OS_WIN32
+ /* FIXME: when implemented:
+ g_assert (seen & SEEN_WINDOWS_SID);
+ */
+#endif
+}
+
+static void
+test_canonical_path_uae (Fixture *f,
+ gconstpointer context)
+{
+ DBusMessage *m = dbus_message_new_method_call (DBUS_SERVICE_DBUS,
+ DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "UpdateActivationEnvironment");
+ DBusPendingCall *pc;
+ DBusMessageIter args_iter;
+ DBusMessageIter arr_iter;
+
+ if (m == NULL)
+ g_error ("OOM");
+
+ dbus_message_iter_init_append (m, &args_iter);
+
+ /* Append an empty a{ss} (string => string dictionary). */
+ if (!dbus_message_iter_open_container (&args_iter, DBUS_TYPE_ARRAY,
+ "{ss}", &arr_iter) ||
+ !dbus_message_iter_close_container (&args_iter, &arr_iter))
+ g_error ("OOM");
+
+ if (!dbus_connection_send_with_reply (f->left_conn, m, &pc,
+ DBUS_TIMEOUT_USE_DEFAULT) ||
+ pc == NULL)
+ g_error ("OOM");
+
+ dbus_message_unref (m);
+ m = NULL;
+
+ if (dbus_pending_call_get_completed (pc))
+ pending_call_store_reply (pc, &m);
+ else if (!dbus_pending_call_set_notify (pc, pending_call_store_reply,
+ &m, NULL))
+ g_error ("OOM");
+
+ while (m == NULL)
+ test_main_context_iterate (f->ctx, TRUE);
+
+ /* it succeeds */
+ g_assert_cmpint (dbus_message_get_type (m), ==,
+ DBUS_MESSAGE_TYPE_METHOD_RETURN);
+
+ dbus_message_unref (m);
+
+ /* Now try with the wrong object path */
+ m = dbus_message_new_method_call (DBUS_SERVICE_DBUS,
+ "/com/example/Wrong", DBUS_INTERFACE_DBUS, "UpdateActivationEnvironment");
+
+ if (m == NULL)
+ g_error ("OOM");
+
+ dbus_message_iter_init_append (m, &args_iter);
+
+ /* Append an empty a{ss} (string => string dictionary). */
+ if (!dbus_message_iter_open_container (&args_iter, DBUS_TYPE_ARRAY,
+ "{ss}", &arr_iter) ||
+ !dbus_message_iter_close_container (&args_iter, &arr_iter))
+ g_error ("OOM");
+
+ if (!dbus_connection_send_with_reply (f->left_conn, m, &pc,
+ DBUS_TIMEOUT_USE_DEFAULT) ||
+ pc == NULL)
+ g_error ("OOM");
+
+ dbus_message_unref (m);
+ m = NULL;
+
+ if (dbus_pending_call_get_completed (pc))
+ pending_call_store_reply (pc, &m);
+ else if (!dbus_pending_call_set_notify (pc, pending_call_store_reply,
+ &m, NULL))
+ g_error ("OOM");
+
+ while (m == NULL)
+ test_main_context_iterate (f->ctx, TRUE);
+
+ /* it fails, yielding an error message with one string argument */
+ g_assert_cmpint (dbus_message_get_type (m), ==, DBUS_MESSAGE_TYPE_ERROR);
+ g_assert_cmpstr (dbus_message_get_error_name (m), ==,
+ DBUS_ERROR_ACCESS_DENIED);
+ g_assert_cmpstr (dbus_message_get_signature (m), ==, "s");
+
+ dbus_message_unref (m);
+}
+
+static void
teardown (Fixture *f,
gconstpointer context G_GNUC_UNUSED)
{
@@ -347,6 +580,8 @@ teardown (Fixture *f,
g_spawn_close_pid (f->daemon_pid);
f->daemon_pid = 0;
}
+
+ test_main_context_unref (f->ctx);
}
static Config limited_config = {
@@ -363,6 +598,9 @@ main (int argc,
g_test_add ("/echo/session", Fixture, NULL, setup, test_echo, teardown);
g_test_add ("/echo/limited", Fixture, &limited_config,
setup, test_echo, teardown);
+ g_test_add ("/creds", Fixture, NULL, setup, test_creds, teardown);
+ g_test_add ("/canonical-path/uae", Fixture, NULL,
+ setup, test_canonical_path_uae, teardown);
return g_test_run ();
}
diff --git a/test/internals/printf.c b/test/internals/printf.c
new file mode 100644
index 00000000..db151518
--- /dev/null
+++ b/test/internals/printf.c
@@ -0,0 +1,88 @@
+/* Regression test for _dbus_printf_string_upper_bound
+ *
+ * Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
+ * Copyright © 2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <config.h>
+
+#include <dbus/dbus.h>
+#include <dbus/dbus-internals.h>
+#include <dbus/dbus-string.h>
+#include "test-utils.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+static void
+do_test (int minimum,
+ const char *format,
+ ...)
+{
+ va_list ap;
+ int result;
+
+ va_start (ap, format);
+ result = _dbus_printf_string_upper_bound (format, ap);
+ va_end (ap);
+
+ if (result < minimum)
+ {
+ fprintf (stderr, "expected at least %d, got %d\n", minimum, result);
+ abort ();
+ }
+}
+
+#define X_TIMES_8 "XXXXXXXX"
+#define X_TIMES_16 X_TIMES_8 X_TIMES_8
+#define X_TIMES_32 X_TIMES_16 X_TIMES_16
+#define X_TIMES_64 X_TIMES_32 X_TIMES_32
+#define X_TIMES_128 X_TIMES_64 X_TIMES_64
+#define X_TIMES_256 X_TIMES_128 X_TIMES_128
+#define X_TIMES_512 X_TIMES_256 X_TIMES_256
+#define X_TIMES_1024 X_TIMES_512 X_TIMES_512
+
+int
+main (int argc,
+ char **argv)
+{
+ char buf[] = X_TIMES_1024 X_TIMES_1024 X_TIMES_1024 X_TIMES_1024;
+ int i;
+
+ do_test (1, "%d", 0);
+ do_test (7, "%d", 1234567);
+ do_test (3, "%f", 3.5);
+
+ do_test (0, "%s", "");
+ do_test (1024, "%s", X_TIMES_1024);
+ do_test (1025, "%s", X_TIMES_1024 "Y");
+
+ for (i = 4096; i > 0; i--)
+ {
+ buf[i] = '\0';
+ do_test (i, "%s", buf);
+ do_test (i + 3, "%s:%d", buf, 42);
+ }
+
+ return 0;
+}
diff --git a/test/internals/refs.c b/test/internals/refs.c
index db43a4da..202dc043 100644
--- a/test/internals/refs.c
+++ b/test/internals/refs.c
@@ -29,7 +29,6 @@
#include <glib.h>
#include <glib-object.h>
-#define DBUS_COMPILATION /* this test uses libdbus-internal */
#include <dbus/dbus.h>
#include <dbus/dbus-connection-internal.h>
#include <dbus/dbus-mainloop.h>
diff --git a/test/internals/syslog.c b/test/internals/syslog.c
index 4f6b7c22..7e0eae79 100644
--- a/test/internals/syslog.c
+++ b/test/internals/syslog.c
@@ -30,7 +30,6 @@
#include <glib.h>
-#define DBUS_COMPILATION /* this test uses libdbus-internal */
#include <dbus/dbus.h>
#include <dbus/dbus-sysdeps.h>
@@ -52,9 +51,10 @@ static void
test_syslog (Fixture *f,
gconstpointer data)
{
+#ifndef G_OS_WIN32
if (g_test_trap_fork (0, 0))
{
- _dbus_init_system_log ();
+ _dbus_init_system_log (FALSE);
_dbus_system_log (DBUS_SYSTEM_LOG_FATAL, MESSAGE "%d", 23);
/* should not be reached: exit 0 so the assertion in the main process
* will fail */
@@ -66,7 +66,7 @@ test_syslog (Fixture *f,
if (g_test_trap_fork (0, 0))
{
- _dbus_init_system_log ();
+ _dbus_init_system_log (FALSE);
_dbus_system_log (DBUS_SYSTEM_LOG_INFO, MESSAGE "%d", 42);
_dbus_system_log (DBUS_SYSTEM_LOG_SECURITY, MESSAGE "%d", 666);
exit (0);
@@ -74,9 +74,9 @@ test_syslog (Fixture *f,
g_test_trap_assert_passed ();
g_test_trap_assert_stderr ("*" MESSAGE "42\n*" MESSAGE "666\n*");
-
+#endif
/* manual test (this is the best we can do on Windows) */
- _dbus_init_system_log ();
+ _dbus_init_system_log (FALSE);
_dbus_system_log (DBUS_SYSTEM_LOG_INFO, MESSAGE "%d", 42);
_dbus_system_log (DBUS_SYSTEM_LOG_SECURITY, MESSAGE "%d", 666);
}
diff --git a/test/loopback.c b/test/loopback.c
index d0d69c82..7526d8d2 100644
--- a/test/loopback.c
+++ b/test/loopback.c
@@ -1,7 +1,7 @@
/* Simple sanity-check for loopback through TCP and Unix sockets.
*
* Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
- * Copyright © 2010-2011 Nokia Corporation
+ * Copyright © 2010-2012 Nokia Corporation
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files
@@ -29,9 +29,13 @@
#include <glib.h>
#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
+
+#include <string.h>
+
+#include "test-utils.h"
typedef struct {
+ TestMainContext *ctx;
DBusError e;
DBusServer *server;
@@ -72,7 +76,7 @@ new_conn_cb (DBusServer *server,
g_assert (f->server_conn == NULL);
f->server_conn = dbus_connection_ref (server_conn);
- dbus_connection_setup_with_g_main (server_conn, NULL);
+ test_connection_setup (f->ctx, server_conn);
have_mem = dbus_connection_add_filter (server_conn,
server_message_cb, f, NULL);
@@ -83,6 +87,7 @@ static void
setup (Fixture *f,
gconstpointer addr)
{
+ f->ctx = test_main_context_get ();
dbus_error_init (&f->e);
g_queue_init (&f->server_messages);
@@ -92,7 +97,7 @@ setup (Fixture *f,
dbus_server_set_new_connection_function (f->server,
new_conn_cb, f, NULL);
- dbus_server_setup_with_g_main (f->server, NULL);
+ test_server_setup (f->ctx, f->server);
}
static void
@@ -105,13 +110,73 @@ test_connect (Fixture *f,
dbus_server_get_address (f->server), &f->e);
assert_no_error (&f->e);
g_assert (f->client_conn != NULL);
- dbus_connection_setup_with_g_main (f->client_conn, NULL);
+ test_connection_setup (f->ctx, f->client_conn);
while (f->server_conn == NULL)
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
+ }
+}
+
+static void
+test_bad_guid (Fixture *f,
+ gconstpointer addr G_GNUC_UNUSED)
+{
+ DBusMessage *incoming;
+ gchar *address = g_strdup (dbus_server_get_address (f->server));
+ gchar *guid;
+
+ g_test_bug ("39720");
+
+ g_assert (f->server_conn == NULL);
+
+ g_assert (strstr (address, "guid=") != NULL);
+ guid = strstr (address, "guid=");
+ g_assert_cmpuint (strlen (guid), >=, 5 + 32);
+
+ /* Change the first char of the guid to something different */
+ if (guid[5] == '0')
+ guid[5] = 'f';
+ else
+ guid[5] = '0';
+
+ f->client_conn = dbus_connection_open_private (address, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->client_conn != NULL);
+ test_connection_setup (f->ctx, f->client_conn);
+
+ while (f->server_conn == NULL)
+ {
+ g_print (".");
+ test_main_context_iterate (f->ctx, TRUE);
+ }
+
+ /* We get disconnected */
+
+ while (g_queue_is_empty (&f->server_messages))
+ {
+ g_print (".");
+ test_main_context_iterate (f->ctx, TRUE);
}
+
+ g_assert_cmpuint (g_queue_get_length (&f->server_messages), ==, 1);
+
+ incoming = g_queue_pop_head (&f->server_messages);
+
+ g_assert (!dbus_message_contains_unix_fds (incoming));
+ g_assert_cmpstr (dbus_message_get_destination (incoming), ==, NULL);
+ g_assert_cmpstr (dbus_message_get_error_name (incoming), ==, NULL);
+ g_assert_cmpstr (dbus_message_get_interface (incoming), ==,
+ DBUS_INTERFACE_LOCAL);
+ g_assert_cmpstr (dbus_message_get_member (incoming), ==, "Disconnected");
+ g_assert_cmpstr (dbus_message_get_sender (incoming), ==, NULL);
+ g_assert_cmpstr (dbus_message_get_signature (incoming), ==, "");
+ g_assert_cmpstr (dbus_message_get_path (incoming), ==, DBUS_PATH_LOCAL);
+
+ dbus_message_unref (incoming);
+
+ g_free (address);
}
static void
@@ -135,7 +200,7 @@ test_message (Fixture *f,
while (g_queue_is_empty (&f->server_messages))
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
g_assert_cmpuint (g_queue_get_length (&f->server_messages), ==, 1);
@@ -182,6 +247,8 @@ teardown (Fixture *f,
dbus_server_unref (f->server);
f->server = NULL;
}
+
+ test_main_context_unref (f->ctx);
}
int
@@ -189,6 +256,7 @@ main (int argc,
char **argv)
{
g_test_init (&argc, &argv, NULL);
+ g_test_bug_base ("https://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/connect/tcp", Fixture, "tcp:host=127.0.0.1", setup,
test_connect, teardown);
@@ -207,5 +275,8 @@ main (int argc,
test_message, teardown);
#endif
+ g_test_add ("/message/bad-guid", Fixture, "tcp:host=127.0.0.1", setup,
+ test_bad_guid, teardown);
+
return g_test_run ();
}
diff --git a/test/manual-authz.c b/test/manual-authz.c
new file mode 100644
index 00000000..f9e3688e
--- /dev/null
+++ b/test/manual-authz.c
@@ -0,0 +1,409 @@
+/* Simple sanity-check for authentication and authorization.
+ *
+ * Copyright © 2010-2011 Nokia Corporation
+ * Copyright © 2012 Collabora Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <config.h>
+
+#include <glib.h>
+
+#include <dbus/dbus.h>
+
+#ifdef G_OS_UNIX
+#include <unistd.h>
+#include <sys/types.h>
+#endif
+
+#include "test-utils.h"
+
+typedef struct {
+ DBusError e;
+ TestMainContext *ctx;
+
+ DBusServer *normal_server;
+ DBusServer *anon_allowed_server;
+ DBusServer *anon_only_server;
+ DBusServer *anon_mech_only_server;
+ DBusServer *anon_disallowed_server;
+ DBusServer *permissive_server;
+ DBusServer *unhappy_server;
+ DBusServer *same_uid_server;
+ DBusServer *same_uid_or_anon_server;
+} Fixture;
+
+static void oom (void) G_GNUC_NORETURN;
+static void
+oom (void)
+{
+ g_error ("out of memory");
+}
+
+static void
+assert_no_error (const DBusError *e)
+{
+ if (G_UNLIKELY (dbus_error_is_set (e)))
+ g_error ("expected success but got error: %s: %s", e->name, e->message);
+}
+
+static DBusHandlerResult
+server_message_cb (DBusConnection *conn,
+ DBusMessage *message,
+ void *data)
+{
+ if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected"))
+ {
+ dbus_connection_unref (conn);
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ }
+
+ if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ {
+ DBusMessage *reply = dbus_message_new_method_return (message);
+ const char *hello = "Hello, world!";
+ unsigned long uid;
+ char *sid;
+
+ if (dbus_connection_get_unix_user (conn, &uid))
+ {
+ g_message ("message from uid %lu", uid);
+ }
+ else if (dbus_connection_get_windows_user (conn, &sid))
+ {
+ if (sid == NULL)
+ oom ();
+
+ g_message ("message from sid \"%s\"", sid);
+ dbus_free (sid);
+ }
+ else if (dbus_connection_get_is_anonymous (conn))
+ {
+ g_message ("message from Anonymous");
+ }
+ else
+ {
+ g_message ("message from ... someone?");
+ }
+
+ if (reply == NULL)
+ oom ();
+
+ if (!dbus_message_append_args (reply,
+ DBUS_TYPE_STRING, &hello,
+ DBUS_TYPE_INVALID))
+ oom ();
+
+ if (!dbus_connection_send (conn, reply, NULL))
+ oom ();
+
+ dbus_message_unref (reply);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static dbus_bool_t
+permissive_unix_func (DBusConnection *conn,
+ unsigned long uid,
+ void *data)
+{
+ g_message ("accepting Unix user %lu", uid);
+ return TRUE;
+}
+
+static dbus_bool_t
+permissive_win_func (DBusConnection *conn,
+ const char *sid,
+ void *data)
+{
+ g_message ("accepting Windows user \"%s\"", sid);
+ return TRUE;
+}
+
+static dbus_bool_t
+broken_unix_func (DBusConnection *conn,
+ unsigned long uid,
+ void *data)
+{
+ g_error ("libdbus called the Unix user function for an ANONYMOUS-only "
+ "connection");
+ return FALSE;
+}
+
+static dbus_bool_t
+broken_win_func (DBusConnection *conn,
+ const char *sid,
+ void *data)
+{
+ g_error ("libdbus called the Windows user function for an ANONYMOUS-only "
+ "connection");
+ return FALSE;
+}
+
+static dbus_bool_t
+unhappy_unix_func (DBusConnection *conn,
+ unsigned long uid,
+ void *data)
+{
+ g_message ("rejecting Unix user %lu", uid);
+ return FALSE;
+}
+
+static dbus_bool_t
+unhappy_win_func (DBusConnection *conn,
+ const char *sid,
+ void *data)
+{
+ g_message ("rejecting Windows user \"%s\"", sid);
+ return FALSE;
+}
+
+static dbus_bool_t
+same_uid_unix_func (DBusConnection *conn,
+ unsigned long uid,
+ void *data)
+{
+ g_message ("checking whether Unix user %lu owns this process", uid);
+ /* I'd use _dbus_unix_user_is_process_owner(), but it's private... */
+#ifdef G_OS_UNIX
+ return (geteuid () == uid);
+#else
+ return FALSE;
+#endif
+}
+
+static dbus_bool_t
+same_uid_win_func (DBusConnection *conn,
+ const char *sid,
+ void *data)
+{
+ g_message ("checking whether Windows user \"%s\" owns this process", sid);
+ g_message ("Stub implementation consistent with dbus-sysdeps-util-win: "
+ "assume they do");
+ return TRUE;
+}
+
+static void
+new_conn_cb (DBusServer *server,
+ DBusConnection *conn,
+ void *data)
+{
+ Fixture *f = data;
+
+ dbus_connection_ref (conn);
+ test_connection_setup (f->ctx, conn);
+
+ if (!dbus_connection_add_filter (conn, server_message_cb, f, NULL))
+ oom ();
+
+ if (server == f->normal_server)
+ {
+ }
+ else if (server == f->anon_allowed_server)
+ {
+ dbus_connection_set_allow_anonymous (conn, TRUE);
+ }
+ else if (server == f->anon_only_server)
+ {
+ dbus_connection_set_allow_anonymous (conn, TRUE);
+
+ dbus_connection_set_unix_user_function (conn, unhappy_unix_func,
+ f, NULL);
+ dbus_connection_set_windows_user_function (conn, unhappy_win_func,
+ f, NULL);
+ }
+ else if (server == f->anon_mech_only_server)
+ {
+ dbus_connection_set_allow_anonymous (conn, TRUE);
+
+ /* should never get called */
+ dbus_connection_set_unix_user_function (conn, broken_unix_func,
+ f, NULL);
+ dbus_connection_set_windows_user_function (conn, broken_win_func,
+ f, NULL);
+ }
+ else if (server == f->anon_disallowed_server)
+ {
+ dbus_connection_set_allow_anonymous (conn, FALSE);
+
+ /* should never get called */
+ dbus_connection_set_unix_user_function (conn, broken_unix_func,
+ f, NULL);
+ dbus_connection_set_windows_user_function (conn, broken_win_func,
+ f, NULL);
+ }
+ else if (server == f->permissive_server)
+ {
+ dbus_connection_set_unix_user_function (conn, permissive_unix_func,
+ f, NULL);
+ dbus_connection_set_windows_user_function (conn, permissive_win_func,
+ f, NULL);
+ }
+ else if (server == f->unhappy_server)
+ {
+ dbus_connection_set_unix_user_function (conn, unhappy_unix_func,
+ f, NULL);
+ dbus_connection_set_windows_user_function (conn, unhappy_win_func,
+ f, NULL);
+ }
+ else if (server == f->same_uid_server)
+ {
+ dbus_connection_set_unix_user_function (conn, same_uid_unix_func,
+ f, NULL);
+ dbus_connection_set_windows_user_function (conn, same_uid_win_func,
+ f, NULL);
+ }
+ else if (server == f->same_uid_or_anon_server)
+ {
+ dbus_connection_set_allow_anonymous (conn, TRUE);
+
+ dbus_connection_set_unix_user_function (conn, same_uid_unix_func,
+ f, NULL);
+ dbus_connection_set_windows_user_function (conn, same_uid_win_func,
+ f, NULL);
+ }
+ else
+ {
+ g_assert_not_reached ();
+ }
+}
+
+static void
+setup (Fixture *f,
+ const gchar *listen_addr)
+{
+ const char *only_anon[] = { "ANONYMOUS", NULL };
+ char *connect_addr;
+
+ f->normal_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->normal_server != NULL);
+ dbus_server_set_new_connection_function (f->normal_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->normal_server);
+ connect_addr = dbus_server_get_address (f->normal_server);
+ g_message ("Normal server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->anon_allowed_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->anon_allowed_server != NULL);
+ dbus_server_set_new_connection_function (f->anon_allowed_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->anon_allowed_server);
+ connect_addr = dbus_server_get_address (f->anon_allowed_server);
+ g_message ("Anonymous-allowed server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->anon_only_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->anon_only_server != NULL);
+ dbus_server_set_new_connection_function (f->anon_only_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->anon_only_server);
+ connect_addr = dbus_server_get_address (f->anon_only_server);
+ g_message ("Anonymous-only server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->anon_mech_only_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->anon_mech_only_server != NULL);
+ dbus_server_set_auth_mechanisms (f->anon_mech_only_server, only_anon);
+ dbus_server_set_new_connection_function (f->anon_mech_only_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->anon_mech_only_server);
+ connect_addr = dbus_server_get_address (f->anon_mech_only_server);
+ g_message ("Anon mech only server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->anon_disallowed_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->anon_disallowed_server != NULL);
+ dbus_server_set_auth_mechanisms (f->anon_disallowed_server, only_anon);
+ dbus_server_set_new_connection_function (f->anon_disallowed_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->anon_disallowed_server);
+ connect_addr = dbus_server_get_address (f->anon_disallowed_server);
+ g_message ("Anonymous-disallowed server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->permissive_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->permissive_server != NULL);
+ dbus_server_set_new_connection_function (f->permissive_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->permissive_server);
+ connect_addr = dbus_server_get_address (f->permissive_server);
+ g_message ("Permissive server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->unhappy_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->unhappy_server != NULL);
+ dbus_server_set_new_connection_function (f->unhappy_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->unhappy_server);
+ connect_addr = dbus_server_get_address (f->unhappy_server);
+ g_message ("Unhappy server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->same_uid_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->same_uid_server != NULL);
+ dbus_server_set_new_connection_function (f->same_uid_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->same_uid_server);
+ connect_addr = dbus_server_get_address (f->same_uid_server);
+ g_message ("Same-UID server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+
+ f->same_uid_or_anon_server = dbus_server_listen (listen_addr, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->same_uid_or_anon_server != NULL);
+ dbus_server_set_new_connection_function (f->same_uid_or_anon_server,
+ new_conn_cb, f, NULL);
+ test_server_setup (f->ctx, f->same_uid_or_anon_server);
+ connect_addr = dbus_server_get_address (f->same_uid_or_anon_server);
+ g_message ("Same-UID-or-anon server:\n%s", connect_addr);
+ dbus_free (connect_addr);
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ Fixture f = { DBUS_ERROR_INIT, test_main_context_get () };
+
+ if (argc >= 2)
+ setup (&f, argv[1]);
+ else
+ setup (&f, "tcp:host=127.0.0.1");
+
+ for (;;)
+ test_main_context_iterate (f.ctx, TRUE);
+
+ /* never returns */
+}
diff --git a/test/marshal.c b/test/marshal.c
index e9ac7e30..d74e7671 100644
--- a/test/marshal.c
+++ b/test/marshal.c
@@ -27,9 +27,9 @@
#include <config.h>
#include <glib.h>
+#include <string.h>
#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
typedef struct {
DBusError e;
@@ -244,14 +244,30 @@ int
main (int argc,
char **argv)
{
+ int ret;
+ char *aligned_le_blob;
+ char *aligned_be_blob;
+
g_test_init (&argc, &argv, NULL);
- g_test_add ("/demarshal/le", Fixture, le_blob, setup, test_endian, teardown);
- g_test_add ("/demarshal/be", Fixture, be_blob, setup, test_endian, teardown);
- g_test_add ("/demarshal/needed/le", Fixture, le_blob, setup, test_needed,
+ /* We have to pass in a buffer that's at least "default aligned",
+ * i.e. on GNU systems to 8 or 16. The linker may have only given
+ * us byte-alignment for the char[] static variables.
+ */
+ aligned_le_blob = g_malloc (sizeof (le_blob));
+ memcpy (aligned_le_blob, le_blob, sizeof (le_blob));
+ aligned_be_blob = g_malloc (sizeof (be_blob));
+ memcpy (aligned_be_blob, be_blob, sizeof (be_blob));
+
+ g_test_add ("/demarshal/le", Fixture, aligned_le_blob, setup, test_endian, teardown);
+ g_test_add ("/demarshal/be", Fixture, aligned_be_blob, setup, test_endian, teardown);
+ g_test_add ("/demarshal/needed/le", Fixture, aligned_le_blob, setup, test_needed,
teardown);
- g_test_add ("/demarshal/needed/be", Fixture, be_blob, setup, test_needed,
+ g_test_add ("/demarshal/needed/be", Fixture, aligned_be_blob, setup, test_needed,
teardown);
- return g_test_run ();
+ ret = g_test_run ();
+ g_free (aligned_le_blob);
+ g_free (aligned_be_blob);
+ return ret;
}
diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am
index 6aaf1783..8ed1e160 100644
--- a/test/name-test/Makefile.am
+++ b/test/name-test/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-DDBUS_COMPILATION \
-DDBUS_STATIC_BUILD \
+ -DDBUS_TEST_USE_INTERNAL \
$(NULL)
# if assertions are enabled, improve backtraces
@@ -11,8 +12,16 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
## note that TESTS has special meaning (stuff to use in make check)
## so if adding tests not to be run in make check, don't add them to
## TESTS
-if DBUS_BUILD_TESTS
-TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@ PYTHON=@PYTHON@
+if DBUS_ENABLE_EMBEDDED_TESTS
+TESTS_ENVIRONMENT = \
+ DBUS_TOP_BUILDDIR=@abs_top_builddir@ \
+ DBUS_TOP_SRCDIR=@abs_top_srcdir@ \
+ PYTHON=@PYTHON@ \
+ DBUS_TEST_DATA=@abs_top_builddir@/test/data \
+ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
+ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
+ $(NULL)
+
TESTS=run-test.sh run-test-systemserver.sh
else
TESTS=
@@ -20,7 +29,7 @@ endif
EXTRA_DIST=run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py
-if DBUS_BUILD_TESTS
+if DBUS_ENABLE_EMBEDDED_TESTS
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
## build even when not doing "make check"
@@ -31,9 +40,9 @@ test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-internal.la
test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-internal.la
test_ids_LDADD=$(top_builddir)/dbus/libdbus-internal.la
-test_shutdown_LDADD=../libdbus-testutils.la
-test_privserver_LDADD=../libdbus-testutils.la
-test_privserver_client_LDADD=../libdbus-testutils.la
-test_autolaunch_LDADD=../libdbus-testutils.la
+test_shutdown_LDADD=../libdbus-testutils-internal.la
+test_privserver_LDADD=../libdbus-testutils-internal.la
+test_privserver_client_LDADD=../libdbus-testutils-internal.la
+test_autolaunch_LDADD=../libdbus-testutils-internal.la
endif
diff --git a/test/name-test/Makefile.in b/test/name-test/Makefile.in
index 6ea051eb..466bd54d 100644
--- a/test/name-test/Makefile.in
+++ b/test/name-test/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,23 +15,51 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -51,18 +78,19 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@DBUS_BUILD_TESTS_TRUE@TESTS = run-test.sh run-test-systemserver.sh
-@DBUS_BUILD_TESTS_TRUE@noinst_PROGRAMS = \
-@DBUS_BUILD_TESTS_TRUE@ test-pending-call-dispatch$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-pending-call-timeout$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-threads-init$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-ids$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-shutdown$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-privserver$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-privserver-client$(EXEEXT) \
-@DBUS_BUILD_TESTS_TRUE@ test-autolaunch$(EXEEXT)
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@TESTS = run-test.sh \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ run-test-systemserver.sh
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@noinst_PROGRAMS = test-pending-call-dispatch$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-pending-call-timeout$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-threads-init$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-ids$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-shutdown$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-privserver$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-privserver-client$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-autolaunch$(EXEEXT)
subdir = test/name-test
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/depcomp $(top_srcdir)/test-driver
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -80,37 +108,46 @@ CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
test_autolaunch_SOURCES = test-autolaunch.c
test_autolaunch_OBJECTS = test-autolaunch.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_autolaunch_DEPENDENCIES = \
-@DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_autolaunch_DEPENDENCIES = ../libdbus-testutils-internal.la
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
test_ids_SOURCES = test-ids.c
test_ids_OBJECTS = test-ids.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_ids_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_ids_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
test_pending_call_dispatch_SOURCES = test-pending-call-dispatch.c
test_pending_call_dispatch_OBJECTS = \
test-pending-call-dispatch.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_pending_call_dispatch_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
test_pending_call_timeout_SOURCES = test-pending-call-timeout.c
test_pending_call_timeout_OBJECTS = \
test-pending-call-timeout.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_pending_call_timeout_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
test_privserver_SOURCES = test-privserver.c
test_privserver_OBJECTS = test-privserver.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_privserver_DEPENDENCIES = \
-@DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_privserver_DEPENDENCIES = ../libdbus-testutils-internal.la
test_privserver_client_SOURCES = test-privserver-client.c
test_privserver_client_OBJECTS = test-privserver-client.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_privserver_client_DEPENDENCIES = \
-@DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_privserver_client_DEPENDENCIES = ../libdbus-testutils-internal.la
test_shutdown_SOURCES = test-shutdown.c
test_shutdown_OBJECTS = test-shutdown.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_shutdown_DEPENDENCIES = \
-@DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_shutdown_DEPENDENCIES = ../libdbus-testutils-internal.la
test_threads_init_SOURCES = test-threads-init.c
test_threads_init_OBJECTS = test-threads-init.$(OBJEXT)
-@DBUS_BUILD_TESTS_TRUE@test_threads_init_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_threads_init_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -123,20 +160,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = test-autolaunch.c test-ids.c test-pending-call-dispatch.c \
test-pending-call-timeout.c test-privserver.c \
test-privserver-client.c test-shutdown.c test-threads-init.c
@@ -149,10 +182,229 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADT_LIBS = @ADT_LIBS@
@@ -182,7 +434,6 @@ DBUS_DAEMONDIR = @DBUS_DAEMONDIR@
DBUS_DATADIR = @DBUS_DATADIR@
DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
-DBUS_HAVE_INT64 = @DBUS_HAVE_INT64@
DBUS_INT16_TYPE = @DBUS_INT16_TYPE@
DBUS_INT32_TYPE = @DBUS_INT32_TYPE@
DBUS_INT64_CONSTANT = @DBUS_INT64_CONSTANT@
@@ -193,7 +444,8 @@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@
DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@
DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@
DBUS_PREFIX = @DBUS_PREFIX@
-DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@
+DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@
+DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@
DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@
DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
@@ -242,8 +494,6 @@ LIBDBUS_LIBS = @LIBDBUS_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
-LIBXML_CFLAGS = @LIBXML_CFLAGS@
-LIBXML_LIBS = @LIBXML_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
@@ -252,7 +502,6 @@ LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-MAN2HTML = @MAN2HTML@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NETWORK_libs = @NETWORK_libs@
@@ -286,7 +535,6 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
SYSTEMD_LIBS = @SYSTEMD_LIBS@
-TEST_BUS_BINARY = @TEST_BUS_BINARY@
TEST_LAUNCH_HELPER_BINARY = @TEST_LAUNCH_HELPER_BINARY@
TEST_LISTEN = @TEST_LISTEN@
TEST_SOCKET_DIR = @TEST_SOCKET_DIR@
@@ -368,25 +616,34 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-DDBUS_COMPILATION \
-DDBUS_STATIC_BUILD \
+ -DDBUS_TEST_USE_INTERNAL \
$(NULL)
# if assertions are enabled, improve backtraces
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
-@DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@ PYTHON=@PYTHON@
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@TESTS_ENVIRONMENT = \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ DBUS_TOP_BUILDDIR=@abs_top_builddir@ \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ DBUS_TOP_SRCDIR=@abs_top_srcdir@ \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ PYTHON=@PYTHON@ \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ DBUS_TEST_DATA=@abs_top_builddir@/test/data \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ $(NULL)
+
EXTRA_DIST = run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py
-@DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_LDADD = $(top_builddir)/dbus/libdbus-internal.la
-@DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_LDADD = $(top_builddir)/dbus/libdbus-internal.la
-@DBUS_BUILD_TESTS_TRUE@test_threads_init_LDADD = $(top_builddir)/dbus/libdbus-internal.la
-@DBUS_BUILD_TESTS_TRUE@test_ids_LDADD = $(top_builddir)/dbus/libdbus-internal.la
-@DBUS_BUILD_TESTS_TRUE@test_shutdown_LDADD = ../libdbus-testutils.la
-@DBUS_BUILD_TESTS_TRUE@test_privserver_LDADD = ../libdbus-testutils.la
-@DBUS_BUILD_TESTS_TRUE@test_privserver_client_LDADD = ../libdbus-testutils.la
-@DBUS_BUILD_TESTS_TRUE@test_autolaunch_LDADD = ../libdbus-testutils.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_pending_call_dispatch_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_pending_call_timeout_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_threads_init_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_ids_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_shutdown_LDADD = ../libdbus-testutils-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_privserver_LDADD = ../libdbus-testutils-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_privserver_client_LDADD = ../libdbus-testutils-internal.la
+@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_autolaunch_LDADD = ../libdbus-testutils-internal.la
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -426,27 +683,35 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+
test-autolaunch$(EXEEXT): $(test_autolaunch_OBJECTS) $(test_autolaunch_DEPENDENCIES) $(EXTRA_test_autolaunch_DEPENDENCIES)
@rm -f test-autolaunch$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_autolaunch_OBJECTS) $(test_autolaunch_LDADD) $(LIBS)
+
test-ids$(EXEEXT): $(test_ids_OBJECTS) $(test_ids_DEPENDENCIES) $(EXTRA_test_ids_DEPENDENCIES)
@rm -f test-ids$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ids_OBJECTS) $(test_ids_LDADD) $(LIBS)
+
test-pending-call-dispatch$(EXEEXT): $(test_pending_call_dispatch_OBJECTS) $(test_pending_call_dispatch_DEPENDENCIES) $(EXTRA_test_pending_call_dispatch_DEPENDENCIES)
@rm -f test-pending-call-dispatch$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_pending_call_dispatch_OBJECTS) $(test_pending_call_dispatch_LDADD) $(LIBS)
+
test-pending-call-timeout$(EXEEXT): $(test_pending_call_timeout_OBJECTS) $(test_pending_call_timeout_DEPENDENCIES) $(EXTRA_test_pending_call_timeout_DEPENDENCIES)
@rm -f test-pending-call-timeout$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_pending_call_timeout_OBJECTS) $(test_pending_call_timeout_LDADD) $(LIBS)
+
test-privserver$(EXEEXT): $(test_privserver_OBJECTS) $(test_privserver_DEPENDENCIES) $(EXTRA_test_privserver_DEPENDENCIES)
@rm -f test-privserver$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_privserver_OBJECTS) $(test_privserver_LDADD) $(LIBS)
+
test-privserver-client$(EXEEXT): $(test_privserver_client_OBJECTS) $(test_privserver_client_DEPENDENCIES) $(EXTRA_test_privserver_client_DEPENDENCIES)
@rm -f test-privserver-client$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_privserver_client_OBJECTS) $(test_privserver_client_LDADD) $(LIBS)
+
test-shutdown$(EXEEXT): $(test_shutdown_OBJECTS) $(test_shutdown_DEPENDENCIES) $(EXTRA_test_shutdown_DEPENDENCIES)
@rm -f test-shutdown$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_shutdown_OBJECTS) $(test_shutdown_LDADD) $(LIBS)
+
test-threads-init$(EXEEXT): $(test_threads_init_OBJECTS) $(test_threads_init_DEPENDENCIES) $(EXTRA_test_threads_init_DEPENDENCIES)
@rm -f test-threads-init$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_threads_init_OBJECTS) $(test_threads_init_LDADD) $(LIBS)
@@ -471,14 +736,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -493,26 +758,15 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -524,15 +778,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -541,102 +791,194 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
else \
- skipped="($$skip tests were not run)"; \
+ color_start= color_end=; \
fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- fi; \
- echo "$${col}$$dashes$${std}"; \
- echo "$${col}$$banner$${std}"; \
- test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
- test -z "$$report" || echo "$${col}$$report$${std}"; \
- echo "$${col}$$dashes$${std}"; \
- test "$$failed" -eq 0; \
- else :; fi
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+run-test.sh.log: run-test.sh
+ @p='run-test.sh'; \
+ b='run-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-test-systemserver.sh.log: run-test-systemserver.sh
+ @p='run-test-systemserver.sh'; \
+ b='run-test-systemserver.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -693,6 +1035,9 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
@@ -776,9 +1121,9 @@ uninstall-am:
.MAKE: check-am install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-generic clean-libtool clean-noinstPROGRAMS ctags \
- distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+ clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@@ -788,7 +1133,7 @@ uninstall-am:
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am
+ recheck tags tags-am uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/test/name-test/run-test-systemserver.sh b/test/name-test/run-test-systemserver.sh
index afd1f045..90c03723 100755
--- a/test/name-test/run-test-systemserver.sh
+++ b/test/name-test/run-test-systemserver.sh
@@ -30,6 +30,11 @@ if test -n "$DBUS_TEST_MONITOR"; then
dbus-monitor --session &
fi
+XDG_RUNTIME_DIR="$DBUS_TOP_BUILDDIR"/test/XDG_RUNTIME_DIR
+test -d "$XDG_RUNTIME_DIR" || mkdir "$XDG_RUNTIME_DIR"
+chmod 0700 "$XDG_RUNTIME_DIR"
+export XDG_RUNTIME_DIR
+
echo "running test-expected-echo-fail"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/tools/dbus-send --print-reply --dest=org.freedesktop.DBus.TestSuiteEchoService /org/freedesktop/TestSuite org.freedesktop.TestSuite.Echo string:hi >echo-error-output.tmp 2>&1
if ! grep -q 'DBus.Error' echo-error-output.tmp; then
diff --git a/test/name-test/run-test.sh b/test/name-test/run-test.sh
index cad5937e..84379c4a 100755
--- a/test/name-test/run-test.sh
+++ b/test/name-test/run-test.sh
@@ -30,6 +30,11 @@ if test -n "$DBUS_TEST_MONITOR"; then
dbus-monitor --session &
fi
+XDG_RUNTIME_DIR="$DBUS_TOP_BUILDDIR"/test/XDG_RUNTIME_DIR
+test -d "$XDG_RUNTIME_DIR" || mkdir "$XDG_RUNTIME_DIR"
+chmod 0700 "$XDG_RUNTIME_DIR"
+export XDG_RUNTIME_DIR
+
echo "running test-ids"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-ids || die "test-ids failed"
diff --git a/test/name-test/test-autolaunch.c b/test/name-test/test-autolaunch.c
index 5e519895..8b5206a6 100644
--- a/test/name-test/test-autolaunch.c
+++ b/test/name-test/test-autolaunch.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -14,21 +16,23 @@ main (int argc, char *argv[])
DBusConnection *conn = NULL;
DBusError error;
- _dbus_setenv ("DBUS_SESSION_BUS_ADDRESS", NULL);
+ dbus_setenv ("DBUS_SESSION_BUS_ADDRESS", NULL);
dbus_error_init (&error);
conn = dbus_bus_get (DBUS_BUS_SESSION, &error);
#ifdef DBUS_ENABLE_X11_AUTOLAUNCH
- if (dbus_error_is_set (&error))
+ /* If X11 autolaunch was enabled, we expect dbus-launch to have worked. */
+ if (_dbus_getenv ("DISPLAY") != NULL && dbus_error_is_set (&error))
{
fprintf (stderr, "*** Failed to autolaunch session bus: %s\n",
error.message);
dbus_error_free (&error);
return 1;
}
-#else
+#endif
+
/* We don't necessarily expect it to *work* without X (although it might -
* for instance on Mac OS it might have used launchd). Just check that the
* results are consistent. */
@@ -38,7 +42,6 @@ main (int argc, char *argv[])
fprintf (stderr, "*** Autolaunched session bus, but an error was set!\n");
return 1;
}
-#endif
if (!dbus_error_is_set (&error) && conn == NULL)
{
diff --git a/test/name-test/test-threads-init.c b/test/name-test/test-threads-init.c
index 5e22852a..580ffe14 100644
--- a/test/name-test/test-threads-init.c
+++ b/test/name-test/test-threads-init.c
@@ -149,11 +149,15 @@ main (int argc, char *argv[])
&dispatch_cond1,
&io_path_cond1);
- check_mutex_lock (mutex1, mutex2, FALSE);
- check_mutex_lock (dispatch_mutex1, dispatch_mutex2, FALSE);
- check_mutex_lock (io_path_mutex1, io_path_mutex2, FALSE);
- check_condvar_lock (dispatch_cond1, dispatch_cond2, FALSE);
- check_condvar_lock (io_path_cond1, io_path_cond2, FALSE);
+ /* Since 1.7 it is no longer the case that mutex1 != mutex2, because
+ * initializing global locks automatically initializes locks
+ * in general. However, it is true that the mutex is not the dummy
+ * implementation, which is what we really wanted to check here. */
+ _dbus_assert (mutex1 != (DBusMutex *) 0xABCDEF);
+ _dbus_assert (dispatch_mutex1 != (DBusMutex *) 0xABCDEF);
+ _dbus_assert (dispatch_cond1 != (DBusCondVar *) 0xABCDEF2);
+ _dbus_assert (io_path_mutex1 != (DBusMutex *) 0xABCDEF);
+ _dbus_assert (io_path_cond1 != (DBusCondVar *) 0xABCDEF2);
_run_iteration (conn);
_dbus_connection_test_get_locks (conn, &mutex2,
diff --git a/test/relay.c b/test/relay.c
index f4129d0a..ecfe4c82 100644
--- a/test/relay.c
+++ b/test/relay.c
@@ -29,7 +29,8 @@
#include <glib.h>
#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
+
+#include "test-utils.h"
/* This is basically a miniature dbus-daemon. We relay messages from the client
* on the left to the client on the right.
@@ -43,6 +44,7 @@
*/
typedef struct {
+ TestMainContext *ctx;
DBusError e;
DBusServer *server;
@@ -113,13 +115,14 @@ new_conn_cb (DBusServer *server,
f->right_server_conn = dbus_connection_ref (server_conn);
}
- dbus_connection_setup_with_g_main (server_conn, NULL);
+ test_connection_setup (f->ctx, server_conn);
}
static void
setup (Fixture *f,
gconstpointer data G_GNUC_UNUSED)
{
+ f->ctx = test_main_context_get ();
dbus_error_init (&f->e);
g_queue_init (&f->messages);
@@ -129,7 +132,7 @@ setup (Fixture *f,
dbus_server_set_new_connection_function (f->server,
new_conn_cb, f, NULL);
- dbus_server_setup_with_g_main (f->server, NULL);
+ test_server_setup (f->ctx, f->server);
}
static void
@@ -148,25 +151,25 @@ test_connect (Fixture *f,
f->left_client_conn = dbus_connection_open_private (address, &f->e);
assert_no_error (&f->e);
g_assert (f->left_client_conn != NULL);
- dbus_connection_setup_with_g_main (f->left_client_conn, NULL);
+ test_connection_setup (f->ctx, f->left_client_conn);
while (f->left_server_conn == NULL)
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
f->right_client_conn = dbus_connection_open_private (address, &f->e);
assert_no_error (&f->e);
g_assert (f->right_client_conn != NULL);
- dbus_connection_setup_with_g_main (f->right_client_conn, NULL);
+ test_connection_setup (f->ctx, f->right_client_conn);
dbus_free (address);
while (f->right_server_conn == NULL)
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
have_mem = dbus_connection_add_filter (f->right_client_conn,
@@ -208,7 +211,7 @@ test_relay (Fixture *f,
while (g_queue_get_length (&f->messages) < 2)
{
g_print (".");
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
g_assert_cmpuint (g_queue_get_length (&f->messages), ==, 2);
@@ -237,7 +240,7 @@ test_limit (Fixture *f,
/* This was an attempt to reproduce fd.o #34393. It didn't work. */
g_test_bug ("34393");
dbus_connection_set_max_received_size (f->left_server_conn, 1);
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
for (i = 0; i < MANY; i++)
{
@@ -253,7 +256,7 @@ test_limit (Fixture *f,
{
while (g_queue_is_empty (&f->messages))
{
- g_main_context_iteration (NULL, TRUE);
+ test_main_context_iterate (f->ctx, TRUE);
}
while ((incoming = g_queue_pop_head (&f->messages)) != NULL)
@@ -302,6 +305,8 @@ teardown (Fixture *f,
dbus_server_unref (f->server);
f->server = NULL;
}
+
+ test_main_context_unref (f->ctx);
}
int
diff --git a/test/shell-test.c b/test/shell-test.c
index b479a9c6..d1dc5b5b 100644
--- a/test/shell-test.c
+++ b/test/shell-test.c
@@ -1,7 +1,7 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
-#define DBUS_COMPILATION
+
#include <dbus/dbus-internals.h>
#include <dbus/dbus-list.h>
#include <dbus/dbus-memory.h>
diff --git a/test/spawn-test.c b/test/spawn-test.c
index f1a55051..723a4889 100644
--- a/test/spawn-test.c
+++ b/test/spawn-test.c
@@ -1,10 +1,8 @@
#include <config.h>
#include <dbus/dbus.h>
-#define DBUS_COMPILATION /* cheat and use dbus-sysdeps */
#include <dbus/dbus-sysdeps.h>
#include <dbus/dbus-spawn.h>
-#undef DBUS_COMPILATION
#include <stdio.h>
static void
@@ -32,7 +30,7 @@ main (int argc, char **argv)
argv_copy [i] = argv[i + 1];
argv_copy[argc - 1] = NULL;
- if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy, NULL, setup_func, NULL, &error))
+ if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy[0], argv_copy, NULL, setup_func, NULL, &error))
{
fprintf (stderr, "Could not launch application: \"%s\"\n",
error.message);
diff --git a/test/test-exit.c b/test/test-exit.c
index f3358185..b4f967ae 100644
--- a/test/test-exit.c
+++ b/test/test-exit.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
/* This is a process that just exits with a failure code */
int
main (int argc, char **argv)
diff --git a/test/test-segfault.c b/test/test-segfault.c
index 329a21fd..c062ce1c 100644
--- a/test/test-segfault.c
+++ b/test/test-segfault.c
@@ -9,18 +9,34 @@
#include <sys/resource.h>
#endif
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
int
main (int argc, char **argv)
{
char *p;
#if HAVE_SETRLIMIT
+ /* No core dumps please, we know we crashed. */
struct rlimit r = { 0, };
getrlimit (RLIMIT_CORE, &r);
r.rlim_cur = 0;
setrlimit (RLIMIT_CORE, &r);
-
+#endif
+
+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
+ /* Really, no core dumps please. On Linux, if core_pattern is
+ * set to a pipe (for abrt/apport/corekeeper/etc.), RLIMIT_CORE of 0
+ * is ignored (deliberately, so people can debug init(8) and other
+ * early stuff); but Linux has PR_SET_DUMPABLE, so we can avoid core
+ * dumps anyway. */
+ prctl (PR_SET_DUMPABLE, 0, 0, 0, 0);
+#endif
+
+#ifdef HAVE_RAISE
raise (SIGSEGV);
#endif
p = NULL;
diff --git a/test/test-utils.c b/test/test-utils.c
index c3c3ed34..9a4f3584 100644
--- a/test/test-utils.c
+++ b/test/test-utils.c
@@ -1,6 +1,13 @@
#include <config.h>
#include "test-utils.h"
+#ifndef DBUS_TEST_USE_INTERNAL
+# include <dbus/dbus.h>
+# include <dbus/dbus-glib-lowlevel.h>
+#endif
+
+#ifdef DBUS_TEST_USE_INTERNAL
+
typedef struct
{
DBusLoop *loop;
@@ -97,10 +104,14 @@ cdata_new (DBusLoop *loop,
return cd;
}
+#endif /* DBUS_TEST_USE_INTERNAL */
+
dbus_bool_t
-test_connection_setup (DBusLoop *loop,
+test_connection_setup (TestMainContext *ctx,
DBusConnection *connection)
{
+#ifdef DBUS_TEST_USE_INTERNAL
+ DBusLoop *loop = ctx;
CData *cd;
cd = NULL;
@@ -148,10 +159,23 @@ test_connection_setup (DBusLoop *loop,
dbus_connection_set_timeout_functions (connection, NULL, NULL, NULL, NULL, NULL);
return FALSE;
+#else /* !DBUS_TEST_USE_INTERNAL */
+
+ dbus_connection_setup_with_g_main (connection, ctx);
+ return TRUE;
+
+#endif /* !DBUS_TEST_USE_INTERNAL */
+}
+
+static void
+die (const char *message)
+{
+ fprintf (stderr, "*** %s", message);
+ exit (1);
}
void
-test_connection_shutdown (DBusLoop *loop,
+test_connection_shutdown (TestMainContext *ctx,
DBusConnection *connection)
{
if (!dbus_connection_set_watch_functions (connection,
@@ -159,18 +183,20 @@ test_connection_shutdown (DBusLoop *loop,
NULL,
NULL,
NULL, NULL))
- _dbus_assert_not_reached ("setting watch functions to NULL failed");
+ die ("setting watch functions to NULL failed");
if (!dbus_connection_set_timeout_functions (connection,
NULL,
NULL,
NULL,
NULL, NULL))
- _dbus_assert_not_reached ("setting timeout functions to NULL failed");
+ die ("setting timeout functions to NULL failed");
dbus_connection_set_dispatch_status_function (connection, NULL, NULL, NULL);
}
+#ifdef DBUS_TEST_USE_INTERNAL
+
typedef struct
{
DBusLoop *loop;
@@ -252,10 +278,14 @@ remove_server_timeout (DBusTimeout *timeout,
_dbus_loop_remove_timeout (context->loop, timeout);
}
+#endif /* DBUS_TEST_USE_INTERNAL */
+
dbus_bool_t
-test_server_setup (DBusLoop *loop,
+test_server_setup (TestMainContext *ctx,
DBusServer *server)
{
+#ifdef DBUS_TEST_USE_INTERNAL
+ DBusLoop *loop = ctx;
ServerData *sd;
sd = serverdata_new (loop, server);
@@ -293,10 +323,17 @@ test_server_setup (DBusLoop *loop,
test_server_shutdown (loop, server);
return FALSE;
+
+#else /* !DBUS_TEST_USE_INTERNAL */
+
+ dbus_server_setup_with_g_main (server, ctx);
+ return TRUE;
+
+#endif /* !DBUS_TEST_USE_INTERNAL */
}
void
-test_server_shutdown (DBusLoop *loop,
+test_server_shutdown (TestMainContext *ctx,
DBusServer *server)
{
dbus_server_disconnect (server);
@@ -305,11 +342,51 @@ test_server_shutdown (DBusLoop *loop,
NULL, NULL, NULL,
NULL,
NULL))
- _dbus_assert_not_reached ("setting watch functions to NULL failed");
+ die ("setting watch functions to NULL failed");
if (!dbus_server_set_timeout_functions (server,
NULL, NULL, NULL,
NULL,
NULL))
- _dbus_assert_not_reached ("setting timeout functions to NULL failed");
+ die ("setting timeout functions to NULL failed");
+}
+
+TestMainContext *
+test_main_context_get (void)
+{
+#ifdef DBUS_TEST_USE_INTERNAL
+ return _dbus_loop_new ();
+#else
+ /* I suspect dbus-glib relies the default main context in some places */
+ return g_main_context_ref (g_main_context_default ());
+#endif
+}
+
+TestMainContext *
+test_main_context_ref (TestMainContext *ctx)
+{
+#ifdef DBUS_TEST_USE_INTERNAL
+ return _dbus_loop_ref (ctx);
+#else
+ return g_main_context_ref (ctx);
+#endif
+}
+
+void test_main_context_unref (TestMainContext *ctx)
+{
+#ifdef DBUS_TEST_USE_INTERNAL
+ _dbus_loop_unref (ctx);
+#else
+ g_main_context_unref (ctx);
+#endif
+}
+
+void test_main_context_iterate (TestMainContext *ctx,
+ dbus_bool_t may_block)
+{
+#ifdef DBUS_TEST_USE_INTERNAL
+ _dbus_loop_iterate (ctx, may_block);
+#else
+ g_main_context_iteration (ctx, may_block);
+#endif
}
diff --git a/test/test-utils.h b/test/test-utils.h
index 3e1e55e6..0d3f3690 100644
--- a/test/test-utils.h
+++ b/test/test-utils.h
@@ -1,25 +1,38 @@
#ifndef TEST_UTILS_H
#define TEST_UTILS_H
-#ifndef DBUS_COMPILATION
-#define DBUS_COMPILATION /* Cheat and use private stuff */
-#endif
-#include <dbus/dbus.h>
+
#include <stdio.h>
#include <stdlib.h>
-#include <dbus/dbus-mainloop.h>
-#include <dbus/dbus-internals.h>
-#undef DBUS_COMPILATION
-dbus_bool_t test_connection_setup (DBusLoop *loop,
+#include <dbus/dbus.h>
+
+#ifdef DBUS_TEST_USE_INTERNAL
+
+# include <dbus/dbus-mainloop.h>
+# include <dbus/dbus-internals.h>
+ typedef DBusLoop TestMainContext;
+
+#else /* !DBUS_TEST_USE_INTERNAL */
+
+# include <glib.h>
+ typedef GMainContext TestMainContext;
+
+#endif /* !DBUS_TEST_USE_INTERNAL */
+
+TestMainContext *test_main_context_get (void);
+TestMainContext *test_main_context_ref (TestMainContext *ctx);
+void test_main_context_unref (TestMainContext *ctx);
+void test_main_context_iterate (TestMainContext *ctx,
+ dbus_bool_t may_block);
+
+dbus_bool_t test_connection_setup (TestMainContext *ctx,
DBusConnection *connection);
-void test_connection_shutdown (DBusLoop *loop,
+void test_connection_shutdown (TestMainContext *ctx,
DBusConnection *connection);
-void test_connection_dispatch_all_messages (DBusConnection *connection);
-dbus_bool_t test_connection_dispatch_one_message (DBusConnection *connection);
-dbus_bool_t test_server_setup (DBusLoop *loop,
+dbus_bool_t test_server_setup (TestMainContext *ctx,
DBusServer *server);
-void test_server_shutdown (DBusLoop *loop,
+void test_server_shutdown (TestMainContext *ctx,
DBusServer *server);
#endif