Commit e95dc1d5 authored by Simon McVittie's avatar Simon McVittie

tests: Call dbus_shutdown()

Not all of these tests will be fully valgrind-clean yet (or perhaps
ever), but it's easier to add this to all of them than to think
about it.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
parent 769c367f
......@@ -1770,5 +1770,6 @@ main (int argc,
g_free (runtime_services_dir);
g_free (runtime_dbus_dir);
g_free (runtime_dir);
dbus_shutdown ();
return ret;
}
......@@ -403,6 +403,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/corrupt/tcp", Fixture, "tcp:host=127.0.0.1", setup,
......@@ -421,5 +423,7 @@ main (int argc,
test_byte_order, teardown);
#endif
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -421,6 +421,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/eavedrop/match_keyword/broadcast", Fixture, NULL,
......@@ -431,5 +433,7 @@ main (int argc,
g_test_add ("/eavedrop/match_keyword/unicast_to_sender", Fixture, NULL,
setup, test_eavesdrop_unicast_to_sender, teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -2054,6 +2054,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/echo/session", Fixture, NULL, setup, test_echo, teardown);
......@@ -2131,5 +2133,7 @@ main (int argc,
setup, test_fd_limit, teardown);
#endif
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -877,6 +877,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
#ifdef HAVE_GETRLIMIT
......@@ -940,5 +942,7 @@ main (int argc,
g_test_add ("/odd-limit/plus2", Fixture, GINT_TO_POINTER (+2), setup,
test_odd_limit, teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -826,5 +826,6 @@ main (int argc,
ret = g_test_run ();
g_queue_free_full (test_cases_to_free, g_free);
dbus_shutdown ();
return ret;
}
......@@ -105,5 +105,6 @@ main (int argc,
* This is how it can distinguish between an unexpected exit and
* successful completion. */
printf ("1..%d\n", test_num);
dbus_shutdown ();
return 0;
}
......@@ -622,6 +622,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/refs/connection", Fixture, NULL, setup_connection,
......@@ -633,5 +635,7 @@ main (int argc,
g_test_add ("/refs/server", Fixture, NULL, setup,
test_server, teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -137,5 +137,6 @@ main (int argc,
ret = g_test_run ();
g_queue_free_full (test_cases_to_free, g_free);
dbus_shutdown ();
return ret;
}
......@@ -102,10 +102,14 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/syslog/normal", Fixture, NULL, setup, test_syslog_normal,
teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -564,10 +564,14 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add_func ("/variant/simple", test_simple);
g_test_add_func ("/variant/oom", test_oom_handling);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -479,6 +479,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/connect/tcp", Fixture, "tcp:host=127.0.0.1", setup,
......@@ -515,5 +517,7 @@ main (int argc,
test_bad_guid, teardown);
#endif
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -271,5 +271,6 @@ main (int argc,
ret = g_test_run ();
g_free (aligned_le_blob);
g_free (aligned_be_blob);
dbus_shutdown ();
return ret;
}
......@@ -310,5 +310,6 @@ main (int argc,
ret = g_test_run ();
g_queue_free_full (test_cases_to_free, g_free);
dbus_shutdown ();
return ret;
}
......@@ -1955,6 +1955,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/monitor/invalid", Fixture, NULL,
......@@ -1998,5 +2000,7 @@ main (int argc,
setup, test_activation, teardown);
#endif
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -337,6 +337,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/connect/tcp", Fixture, "tcp:host=127.0.0.1", setup,
......@@ -355,5 +357,7 @@ main (int argc,
test_limit, teardown);
#endif
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -1056,6 +1056,7 @@ main (int argc,
char **argv)
{
gsize i;
int ret;
test_init (&argc, &argv);
......@@ -1089,5 +1090,7 @@ main (int argc,
g_test_add ("/sd-activation/transient-services/in-advance", Fixture,
&transient_service_in_advance, setup, test_transient_services, teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -184,5 +184,6 @@ main (int argc, char **argv)
* successful completion. */
printf ("1..%d\n", test_num);
dbus_shutdown ();
return (num_failed != 0);
}
......@@ -39,6 +39,6 @@ main (int argc, char **argv)
}
dbus_free(argv_copy);
dbus_shutdown ();
return 0;
}
......@@ -271,6 +271,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/syntax/path", Fixture, &paths, setup, test_syntax, teardown);
......@@ -289,5 +291,7 @@ main (int argc,
g_test_add ("/syntax/utf8", Fixture, &strings,
setup, test_syntax, teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -74,6 +74,6 @@ main (int argc,
#endif
_dbus_verbose ("*** Test service name exiting\n");
dbus_shutdown ();
return 0;
}
......@@ -290,10 +290,14 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
g_test_add ("/thread-blocking", Fixture, NULL, setup, test_threads,
teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
......@@ -238,6 +238,8 @@ int
main (int argc,
char **argv)
{
int ret;
test_init (&argc, &argv);
/* UpdateActivationEnvironment used to be allowed by dbus-daemon for root
......@@ -257,5 +259,7 @@ main (int argc,
g_test_add ("/uid-permissions/monitor/other", Fixture, &other_fail_config,
setup, test_monitor, teardown);
return g_test_run ();
ret = g_test_run ();
dbus_shutdown ();
return ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment