Commit 6b71e92f authored by Simon McVittie's avatar Simon McVittie

Merge branch 'test-main-boilerplate' into 'master'

Consolidate boilerplate from embedded tests' main()

See merge request !73

Reviewed-by: Ralf Habacker
parents 910ac293 295e5a19
Pipeline #13094 canceled with stage
......@@ -2733,12 +2733,15 @@ do_service_reload_test (const DBusString *test_data_dir,
}
dbus_bool_t
bus_activation_service_reload_test (const DBusString *test_data_dir)
bus_activation_service_reload_test (const char *test_data_dir_cstr)
{
DBusString test_data_dir;
DBusString directory;
const char *tmp;
dbus_bool_t ret = FALSE;
_dbus_string_init_const (&test_data_dir, test_data_dir_cstr);
if (!_dbus_string_init (&directory))
return FALSE;
......@@ -2758,7 +2761,7 @@ bus_activation_service_reload_test (const DBusString *test_data_dir)
if (!init_service_reload_test (&directory))
_dbus_test_fatal ("could not initiate service reload test");
if (!do_service_reload_test (test_data_dir, &directory, FALSE))
if (!do_service_reload_test (&test_data_dir, &directory, FALSE))
{
/* Do nothing? */
}
......@@ -2770,7 +2773,7 @@ bus_activation_service_reload_test (const DBusString *test_data_dir)
if (!init_service_reload_test (&directory))
_dbus_test_fatal ("could not initiate service reload test");
if (!do_service_reload_test (test_data_dir, &directory, TRUE))
if (!do_service_reload_test (&test_data_dir, &directory, TRUE))
{
/* Do nothing? */
}
......
......@@ -687,36 +687,41 @@ check_file_valid (DBusString *full_path,
}
dbus_bool_t
bus_config_parser_trivial_test (const DBusString *test_data_dir)
bus_config_parser_trivial_test (const char *test_data_dir_cstr)
{
DBusString test_data_dir;
DBusString full_path;
dbus_bool_t retval;
retval = FALSE;
if (test_data_dir == NULL ||
_dbus_string_get_length (test_data_dir) == 0)
if (test_data_dir_cstr == NULL || test_data_dir_cstr[0] == '\0')
{
_dbus_test_diag ("No test data");
return TRUE;
}
_dbus_string_init_const (&test_data_dir, test_data_dir_cstr);
/* We already test default_session_servicedirs and default_system_servicedirs
* in bus_config_parser_test() */
if (!process_test_valid_subdir (test_data_dir, "valid-config-files", VALID))
if (!process_test_valid_subdir (&test_data_dir, "valid-config-files",
VALID))
goto finish;
#ifndef DBUS_WIN
/* We already test default_session_servicedirs and default_system_servicedirs
* in bus_config_parser_test() */
if (!process_test_valid_subdir (test_data_dir, "valid-config-files-system", VALID))
if (!process_test_valid_subdir (&test_data_dir,
"valid-config-files-system", VALID))
goto finish;
#endif
/* we don't process all the invalid files, as the trivial parser can't hope
* to validate them all for all different syntaxes. We just check one broken
* file to see if junk is received */
if (!make_full_path (test_data_dir, "invalid-config-files", "not-well-formed.conf", &full_path))
if (!make_full_path (&test_data_dir, "invalid-config-files",
"not-well-formed.conf", &full_path))
goto finish;
if (!check_file_valid (&full_path, INVALID))
goto finish;
......@@ -724,7 +729,8 @@ bus_config_parser_trivial_test (const DBusString *test_data_dir)
#ifndef DBUS_WIN
/* just test if the check_file_valid works okay and we got sane values */
if (!make_full_path (test_data_dir, "valid-config-files-system", "system.conf", &full_path))
if (!make_full_path (&test_data_dir, "valid-config-files-system",
"system.conf", &full_path))
goto finish;
if (!check_file_valid (&full_path, VALID))
goto finish;
......
......@@ -3990,16 +3990,19 @@ test_default_system_servicedirs (void)
#endif
dbus_bool_t
bus_config_parser_test (const DBusString *test_data_dir)
bus_config_parser_test (const char *test_data_dir_cstr)
{
if (test_data_dir == NULL ||
_dbus_string_get_length (test_data_dir) == 0)
DBusString test_data_dir;
if (test_data_dir_cstr == NULL || test_data_dir_cstr[0] == '\0')
{
_dbus_test_diag ("No test data");
return TRUE;
}
if (!test_default_session_servicedirs (test_data_dir))
_dbus_string_init_const (&test_data_dir, test_data_dir_cstr);
if (!test_default_session_servicedirs (&test_data_dir))
return FALSE;
#ifdef DBUS_WIN
......@@ -4009,18 +4012,21 @@ bus_config_parser_test (const DBusString *test_data_dir)
return FALSE;
#endif
if (!process_test_valid_subdir (test_data_dir, "valid-config-files", VALID))
if (!process_test_valid_subdir (&test_data_dir, "valid-config-files",
VALID))
return FALSE;
#ifndef DBUS_WIN
if (!process_test_valid_subdir (test_data_dir, "valid-config-files-system", VALID))
if (!process_test_valid_subdir (&test_data_dir,
"valid-config-files-system", VALID))
return FALSE;
#endif
if (!process_test_valid_subdir (test_data_dir, "invalid-config-files", INVALID))
if (!process_test_valid_subdir (&test_data_dir, "invalid-config-files",
INVALID))
return FALSE;
if (!process_test_equiv_subdir (test_data_dir, "equiv-config-files"))
if (!process_test_equiv_subdir (&test_data_dir, "equiv-config-files"))
return FALSE;
return TRUE;
......
......@@ -5023,23 +5023,27 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir,
#endif
dbus_bool_t
bus_dispatch_test (const DBusString *test_data_dir)
bus_dispatch_test (const char *test_data_dir_cstr)
{
DBusString test_data_dir;
_dbus_string_init_const (&test_data_dir, test_data_dir_cstr);
/* run normal activation tests */
_dbus_verbose ("Normal activation tests\n");
if (!bus_dispatch_test_conf (test_data_dir,
if (!bus_dispatch_test_conf (&test_data_dir,
"valid-config-files/debug-allow-all.conf", FALSE))
return FALSE;
#ifndef DBUS_WIN
/* run launch-helper activation tests */
_dbus_verbose ("Launch helper activation tests\n");
if (!bus_dispatch_test_conf (test_data_dir,
if (!bus_dispatch_test_conf (&test_data_dir,
"valid-config-files-system/debug-allow-all-pass.conf", TRUE))
return FALSE;
/* run select launch-helper activation tests on broken service files */
if (!bus_dispatch_test_conf_fail (test_data_dir,
if (!bus_dispatch_test_conf_fail (&test_data_dir,
"valid-config-files-system/debug-allow-all-fail.conf"))
return FALSE;
#endif
......@@ -5048,18 +5052,20 @@ bus_dispatch_test (const DBusString *test_data_dir)
}
dbus_bool_t
bus_dispatch_sha1_test (const DBusString *test_data_dir)
bus_dispatch_sha1_test (const char *test_data_dir_cstr)
{
DBusString test_data_dir;
BusContext *context;
DBusConnection *foo;
DBusError error;
_dbus_string_init_const (&test_data_dir, test_data_dir_cstr);
dbus_error_init (&error);
/* Test SHA1 authentication */
_dbus_verbose ("Testing SHA1 context\n");
context = bus_context_new_test (test_data_dir,
context = bus_context_new_test (&test_data_dir,
"valid-config-files/debug-allow-all-sha1.conf");
if (context == NULL)
return FALSE;
......@@ -5092,11 +5098,11 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir)
return TRUE;
}
#ifdef HAVE_UNIX_FD_PASSING
dbus_bool_t
bus_unix_fds_passing_test(const DBusString *test_data_dir)
bus_unix_fds_passing_test (const char *test_data_dir_cstr)
{
#ifdef HAVE_UNIX_FD_PASSING
DBusString test_data_dir;
BusContext *context;
DBusConnection *foo, *bar;
DBusError error;
......@@ -5105,9 +5111,11 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
int x, y, z;
char r;
_dbus_string_init_const (&test_data_dir, test_data_dir_cstr);
dbus_error_init (&error);
context = bus_context_new_test (test_data_dir, "valid-config-files/debug-allow-all.conf");
context = bus_context_new_test (&test_data_dir,
"valid-config-files/debug-allow-all.conf");
if (context == NULL)
_dbus_test_fatal ("could not alloc context");
......@@ -5239,8 +5247,10 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
bus_context_unref (context);
#else
_dbus_test_skip ("fd-passing not supported on this platform");
#endif
return TRUE;
}
#endif
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -317,7 +317,7 @@ time_add_milliseconds (long *tv_sec,
}
dbus_bool_t
bus_expire_list_test (const DBusString *test_data_dir)
bus_expire_list_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
DBusLoop *loop;
BusExpireList *list;
......
......@@ -2963,7 +2963,7 @@ test_matching_path_namespace (void)
}
dbus_bool_t
bus_signals_test (const DBusString *test_data_dir)
bus_signals_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
BusMatchmaker *matchmaker;
......
......@@ -25,11 +25,9 @@
#include "test.h"
#include "activation-helper.h"
#include <stdio.h>
#include <stdlib.h>
#include <dbus/dbus-internals.h>
#include <dbus/dbus-misc.h>
#include <dbus/dbus-test-tap.h>
#include <dbus/dbus-test-wrappers.h>
#if !defined(DBUS_ENABLE_EMBEDDED_TESTS) || !defined(DBUS_UNIX)
#error This file is only relevant for the embedded tests on Unix
......@@ -72,24 +70,13 @@ bus_activation_helper_oom_test (void *data,
#endif
int
main (int argc, char **argv)
static dbus_bool_t
bus_activation_helper_test (const char *test_data_dir)
{
const char *dir;
DBusString config_file;
if (argc > 1 && strcmp (argv[1], "--tap") != 0)
dir = argv[1];
else
dir = _dbus_getenv ("DBUS_TEST_DATA");
if (dir == NULL)
_dbus_test_fatal ("Must specify test data directory as argv[1] or in DBUS_TEST_DATA env variable");
_dbus_test_diag ("%s: Running launch helper OOM checks", argv[0]);
if (!_dbus_string_init (&config_file) ||
!_dbus_string_append (&config_file, dir) ||
!_dbus_string_append (&config_file, test_data_dir) ||
!_dbus_string_append (&config_file, "/valid-config-files-system/debug-allow-all-pass.conf"))
_dbus_test_fatal ("OOM during initialization");
......@@ -105,9 +92,20 @@ main (int argc, char **argv)
_dbus_test_fatal ("OOM test failed");
/* ... otherwise it must have passed */
_dbus_test_ok ("%s", argv[0]);
return TRUE;
}
_dbus_test_check_memleaks (argv[0]);
static DBusTestCase test =
{
"activation-helper",
bus_activation_helper_test,
};
return _dbus_test_done_testing ();
int
main (int argc, char **argv)
{
return _dbus_test_main (argc, argv, 1, &test,
(DBUS_TEST_FLAGS_REQUIRE_DATA |
DBUS_TEST_FLAGS_CHECK_MEMORY_LEAKS),
NULL, NULL);
}
......@@ -22,104 +22,48 @@
*/
#include <config.h>
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
#include <dbus/dbus-string.h>
#include <dbus/dbus-sysdeps.h>
#include <dbus/dbus-internals.h>
#include <dbus/dbus-message-internal.h>
#include <dbus/dbus-test-tap.h>
#include <dbus/dbus-test-wrappers.h>
#include "selinux.h"
#ifndef DBUS_ENABLE_EMBEDDED_TESTS
#error This file is only relevant for the embedded tests
#endif
#ifdef DBUS_UNIX
# include <dbus/dbus-sysdeps-unix.h>
#endif
static const char *only;
static DBusInitialFDs *initial_fds = NULL;
static DBusString test_data_dir;
static void
test_pre_hook (void)
{
initial_fds = _dbus_check_fdleaks_enter ();
}
static void
test_post_hook (const char *name)
test_post_hook (void)
{
if (_dbus_getenv ("DBUS_TEST_SELINUX"))
bus_selinux_shutdown ();
_dbus_test_check_memleaks (name);
_dbus_check_fdleaks_leave (initial_fds);
initial_fds = NULL;
}
static void
test_one (const char *name,
dbus_bool_t (*func) (const DBusString *))
static DBusTestCase tests[] =
{
if (only != NULL && strcmp (only, name) != 0)
{
_dbus_test_skip ("%s - Only intending to run %s", name, only);
return;
}
_dbus_test_diag ("Running test: %s", name);
test_pre_hook ();
if (func (&test_data_dir))
_dbus_test_ok ("%s", name);
else
_dbus_test_not_ok ("%s", name);
test_post_hook (name);
}
{ "expire-list", bus_expire_list_test },
{ "config-parser", bus_config_parser_test },
{ "signals", bus_signals_test },
{ "dispatch-sha1", bus_dispatch_sha1_test },
{ "dispatch", bus_dispatch_test },
{ "activation-service-reload", bus_activation_service_reload_test },
{ "unix-fds-passing", bus_unix_fds_passing_test },
{ NULL }
};
int
main (int argc, char **argv)
{
const char *dir;
if (argc > 1 && strcmp (argv[1], "--tap") != 0)
dir = argv[1];
else
dir = _dbus_getenv ("DBUS_TEST_DATA");
if (argc > 2)
only = argv[2];
else
only = _dbus_getenv ("DBUS_TEST_ONLY");
if (dir == NULL)
_dbus_test_fatal ("Must specify test data directory as argv[1] or in DBUS_TEST_DATA env variable");
_dbus_string_init_const (&test_data_dir, dir);
#ifdef DBUS_UNIX
/* close any inherited fds so dbus-spawn's check for close-on-exec works */
_dbus_close_all ();
#endif
test_one ("expire-list", bus_expire_list_test);
test_one ("config-parser", bus_config_parser_test);
test_one ("signals", bus_signals_test);
test_one ("dispatch-sha1", bus_dispatch_sha1_test);
test_one ("dispatch", bus_dispatch_test);
test_one ("activation-service-reload", bus_activation_service_reload_test);
#ifdef HAVE_UNIX_FD_PASSING
test_one ("unix-fds-passing", bus_unix_fds_passing_test);
#else
_dbus_test_skip ("fd-passing not supported on this platform");
#endif
return _dbus_test_done_testing ();
return _dbus_test_main (argc, argv, _DBUS_N_ELEMENTS (tests), tests,
(DBUS_TEST_FLAGS_CHECK_MEMORY_LEAKS |
DBUS_TEST_FLAGS_CHECK_FD_LEAKS |
DBUS_TEST_FLAGS_REQUIRE_DATA),
test_pre_hook, test_post_hook);
}
......@@ -22,56 +22,27 @@
*/
#include <config.h>
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
#include <dbus/dbus-string.h>
#include <dbus/dbus-sysdeps.h>
#include <dbus/dbus-internals.h>
#include <dbus/dbus-test-tap.h>
#include <dbus/dbus-test-wrappers.h>
#if !defined(DBUS_ENABLE_EMBEDDED_TESTS) || !defined(DBUS_UNIX)
#error This file is only relevant for the embedded tests on Unix
#endif
static void
test_pre_hook (void)
static DBusTestCase test =
{
}
static const char *progname = "";
static void
test_post_hook (void)
{
_dbus_test_check_memleaks (progname);
}
"config-parser-trivial",
bus_config_parser_trivial_test
};
int
main (int argc, char **argv)
{
const char *dir;
DBusString test_data_dir;
progname = argv[0];
if (argc > 1 && strcmp (argv[1], "--tap") != 0)
dir = argv[1];
else
dir = _dbus_getenv ("DBUS_TEST_DATA");
if (dir == NULL)
_dbus_test_fatal ("Must specify test data directory as argv[1] or in DBUS_TEST_DATA env variable");
_dbus_string_init_const (&test_data_dir, dir);
test_pre_hook ();
_dbus_test_diag ("%s: Running config file parser (trivial) test", argv[0]);
if (!bus_config_parser_trivial_test (&test_data_dir))
_dbus_test_fatal ("OOM creating parser");
/* All failure modes for this test are currently fatal */
_dbus_test_ok ("%s", argv[0]);
test_post_hook ();
return _dbus_test_done_testing ();
return _dbus_test_main (argc, argv, 1, &test,
(DBUS_TEST_FLAGS_CHECK_MEMORY_LEAKS |
DBUS_TEST_FLAGS_REQUIRE_DATA),
NULL, NULL);
}
......@@ -33,13 +33,13 @@
typedef dbus_bool_t (* BusConnectionForeachFunction) (DBusConnection *connection,
void *data);
dbus_bool_t bus_dispatch_test (const DBusString *test_data_dir);
dbus_bool_t bus_dispatch_sha1_test (const DBusString *test_data_dir);
dbus_bool_t bus_config_parser_test (const DBusString *test_data_dir);
dbus_bool_t bus_config_parser_trivial_test (const DBusString *test_data_dir);
dbus_bool_t bus_signals_test (const DBusString *test_data_dir);
dbus_bool_t bus_expire_list_test (const DBusString *test_data_dir);
dbus_bool_t bus_activation_service_reload_test (const DBusString *test_data_dir);
dbus_bool_t bus_dispatch_test (const char *test_data_dir_cstr);
dbus_bool_t bus_dispatch_sha1_test (const char *test_data_dir_cstr);
dbus_bool_t bus_config_parser_test (const char *test_data_dir_cstr);
dbus_bool_t bus_config_parser_trivial_test (const char *test_data_dir_cstr);
dbus_bool_t bus_signals_test (const char *test_data_dir);
dbus_bool_t bus_expire_list_test (const char *test_data_dir);
dbus_bool_t bus_activation_service_reload_test (const char *test_data_dir_cstr);
dbus_bool_t bus_setup_debug_client (DBusConnection *connection);
void bus_test_clients_foreach (BusConnectionForeachFunction function,
void *data);
......@@ -50,10 +50,7 @@ void bus_test_run_clients_loop (dbus_bool_t block);
void bus_test_run_everything (BusContext *context);
BusContext* bus_context_new_test (const DBusString *test_data_dir,
const char *filename);
#ifdef HAVE_UNIX_FD_PASSING
dbus_bool_t bus_unix_fds_passing_test (const DBusString *test_data_dir);
#endif
dbus_bool_t bus_unix_fds_passing_test (const char *test_data_dir_cstr);
#endif
......
......@@ -171,8 +171,8 @@ set (DBUS_UTIL_SOURCES
if (DBUS_ENABLE_EMBEDDED_TESTS)
set (DBUS_UTIL_SOURCES
${DBUS_UTIL_SOURCES}
${DBUS_DIR}/dbus-test.c
${DBUS_DIR}/dbus-spawn-test.c
${DBUS_DIR}/dbus-test-wrappers.c
)
endif (DBUS_ENABLE_EMBEDDED_TESTS)
......@@ -185,6 +185,7 @@ set (DBUS_UTIL_HEADERS
${DBUS_DIR}/dbus-socket-set.h
${DBUS_DIR}/dbus-spawn.h
${DBUS_DIR}/dbus-test.h
${DBUS_DIR}/dbus-test-wrappers.h
)
### platform specific settings
......
......@@ -266,11 +266,14 @@ DBUS_UTIL_SOURCES= \
dbus-spawn.h \
dbus-string-util.c \
dbus-sysdeps-util.c \
dbus-test.c \
dbus-test.h
if DBUS_ENABLE_EMBEDDED_TESTS
DBUS_UTIL_SOURCES += dbus-spawn-test.c
DBUS_UTIL_SOURCES += \
dbus-spawn-test.c \
dbus-test-wrappers.c \
dbus-test-wrappers.h \
$(NULL)
endif
libdbus_1_la_SOURCES= \
......
......@@ -698,7 +698,7 @@ static const char* invalid_escaped_values[] = {
};
dbus_bool_t
_dbus_address_test (void)
_dbus_address_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
DBusAddressEntry **entries;
int len;
......
......@@ -368,7 +368,7 @@ test_free_slot_data_func (void *data)
* Test function for data slots
*/
dbus_bool_t
_dbus_data_slot_test (void)
_dbus_data_slot_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
DBusDataSlotAllocator allocator;
DBusDataSlotList list;
......
......@@ -1631,7 +1631,7 @@ steal (void *ptr)
* @returns #TRUE on success.
*/
dbus_bool_t
_dbus_hash_test (void)
_dbus_hash_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
int i;
DBusHashTable *table1;
......
......@@ -1023,7 +1023,7 @@ _dbus_keyring_get_hex_key (DBusKeyring *keyring,
#include <stdio.h>
dbus_bool_t
_dbus_keyring_test (void)
_dbus_keyring_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
DBusString context;
DBusKeyring *ring1;
......
......@@ -972,7 +972,7 @@ lists_equal (DBusList **list1,
* @returns #TRUE on success.
*/
dbus_bool_t
_dbus_list_test (void)
_dbus_list_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
DBusList *list1;
DBusList *list2;
......
......@@ -1663,7 +1663,7 @@ swap_test_array (void *array,
} while (0)
dbus_bool_t
_dbus_marshal_test (void)
_dbus_marshal_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
int alignment;
DBusString str;
......
......@@ -92,7 +92,7 @@ do_byteswap_test (int byte_order)
}
dbus_bool_t
_dbus_marshal_byteswap_test (void)
_dbus_marshal_byteswap_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
do_byteswap_test (DBUS_LITTLE_ENDIAN);
do_byteswap_test (DBUS_BIG_ENDIAN);
......
......@@ -2041,7 +2041,7 @@ out:
}
dbus_bool_t
_dbus_marshal_recursive_test (void)
_dbus_marshal_recursive_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
make_and_run_test_nodes ();
......
......@@ -106,7 +106,7 @@ static const ValidityTest signature_tests[] = {
};
dbus_bool_t
_dbus_marshal_validate_test (void)
_dbus_marshal_validate_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
DBusString str;
int i;
......
......@@ -24,6 +24,8 @@
#ifndef DBUS_MARSHAL_VALIDATE_H
#define DBUS_MARSHAL_VALIDATE_H
#include <dbus/dbus-string.h>
/**
* @addtogroup DBusMarshal
*
......
......@@ -930,7 +930,7 @@ dbus_shutdown (void)
* @returns #TRUE on success.
*/
dbus_bool_t
_dbus_memory_test (void)
_dbus_memory_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
dbus_bool_t old_guards;
void *p;
......
......@@ -629,7 +629,7 @@ time_for_size (int size)
* @returns #TRUE on success.
*/
dbus_bool_t
_dbus_mem_pool_test (void)
_dbus_mem_pool_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
int i;
int element_sizes[] = { 4, 8, 16, 50, 124 };
......
......@@ -1187,7 +1187,7 @@ verify_test_message_memleak (DBusMessage *message)
* @returns #TRUE on success.
*/
dbus_bool_t
_dbus_message_test (const char *test_data_dir)
_dbus_message_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
DBusMessage *message, *message_without_unix_fds;
DBusMessageLoader *loader;
......
......@@ -232,7 +232,7 @@ dbus_get_version (int *major_version_p,
dbus_bool_t
_dbus_misc_test (void)
_dbus_misc_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
int major, minor, micro;
DBusString str;
......
......@@ -2319,7 +2319,7 @@ object_tree_test_iteration (void *data,
* @returns #TRUE on success.
*/
dbus_bool_t
_dbus_object_tree_test (void)
_dbus_object_tree_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
return _dbus_test_oom_handling ("object tree",
object_tree_test_iteration,
......
......@@ -1199,7 +1199,7 @@ dbus_server_get_data (DBusServer *server,
#include <string.h>
dbus_bool_t
_dbus_server_test (void)
_dbus_server_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
{
const char *valid_addresses[] = {
"tcp:port=1234",