From: Simon McVittie Date: Thu, 12 Jul 2018 12:06:32 +0000 (+0100) Subject: Skip name-test/ when running under valgrind for now X-Git-Tag: dbus-1.13.6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb73c756f171cded1f2cfa6e9002144bc72ce05e;p=thirdparty%2Fdbus.git Skip name-test/ when running under valgrind for now These tests are very reliant on their custom LOG_COMPILER, which AX_VALGRIND_CHECK replaces. Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194 --- diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index 40096350d..dd7f82a88 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ $(DBUS_STATIC_BUILD_CPPFLAGS) \ + $(VALGRIND_CFLAGS) \ -DDBUS_COMPILATION \ $(NULL) diff --git a/test/name-test/test-ids.c b/test/name-test/test-ids.c index 73b71f154..be449abd5 100644 --- a/test/name-test/test-ids.c +++ b/test/name-test/test-ids.c @@ -4,6 +4,7 @@ #include #include #include +#include #ifdef HAVE_UNISTD_H #include #endif @@ -29,6 +30,12 @@ main (int argc, char *id; char *server_id; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + dbus_error_init (&error); connection = dbus_bus_get (DBUS_BUS_SESSION, &error); if (connection == NULL) diff --git a/test/name-test/test-pending-call-disconnected.c b/test/name-test/test-pending-call-disconnected.c index 6ff4243a9..6ef04b6b1 100644 --- a/test/name-test/test-pending-call-disconnected.c +++ b/test/name-test/test-pending-call-disconnected.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -55,6 +56,12 @@ main (int argc, char *argv[]) DBusPendingCall *pending; DBusMessage *reply; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + printf ("# Testing pending call error\n"); dbus_connection_allocate_data_slot (&slot_connection); diff --git a/test/name-test/test-pending-call-dispatch.c b/test/name-test/test-pending-call-dispatch.c index af80868a0..e30d1f740 100644 --- a/test/name-test/test-pending-call-dispatch.c +++ b/test/name-test/test-pending-call-dispatch.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -111,6 +112,12 @@ main (int argc, char *argv[]) DBusConnection *conn; DBusError error; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + /* Time each iteration and make sure it doesn't take more than 5 seconds to complete. Outside influences may cause connections to take longer but if it does and we are stuck in a poll call then we know the diff --git a/test/name-test/test-pending-call-timeout.c b/test/name-test/test-pending-call-timeout.c index a204db011..c47ba3f2c 100644 --- a/test/name-test/test-pending-call-timeout.c +++ b/test/name-test/test-pending-call-timeout.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -77,6 +78,12 @@ main (int argc, char *argv[]) DBusConnection *conn; DBusError error; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + printf ("# Testing pending call timeouts\n"); dbus_error_init (&error); diff --git a/test/name-test/test-privserver-client.c b/test/name-test/test-privserver-client.c index 7a293f4ea..d522a9c49 100644 --- a/test/name-test/test-privserver-client.c +++ b/test/name-test/test-privserver-client.c @@ -1,4 +1,5 @@ #include +#include #include "../test-utils.h" static void die (const char *message, @@ -158,6 +159,12 @@ main (int argc, char *argv[]) { int test_num = 0; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + open_shutdown_private_connection (TRUE); dbus_shutdown (); diff --git a/test/name-test/test-privserver.c b/test/name-test/test-privserver.c index 04f9cfa08..1d579ba0d 100644 --- a/test/name-test/test-privserver.c +++ b/test/name-test/test-privserver.c @@ -1,4 +1,5 @@ #include +#include #include "../test-utils.h" static void die (const char *message, @@ -81,6 +82,12 @@ main (int argc, char *argv[]) DBusConnection *session; TestServiceData *testdata; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + dbus_error_init (&error); loop = _dbus_loop_new (); diff --git a/test/name-test/test-shutdown.c b/test/name-test/test-shutdown.c index dbbe52546..b195bbb71 100644 --- a/test/name-test/test-shutdown.c +++ b/test/name-test/test-shutdown.c @@ -1,5 +1,6 @@ #include +#include #include "../test-utils.h" static DBusLoop *loop; @@ -54,6 +55,12 @@ main (int argc, { int test_num = 0; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + open_destroy_shared_session_bus_connection (); dbus_shutdown (); diff --git a/test/name-test/test-threads-init.c b/test/name-test/test-threads-init.c index a19b9627b..fa90ca72e 100644 --- a/test/name-test/test-threads-init.c +++ b/test/name-test/test-threads-init.c @@ -10,6 +10,7 @@ #include #include +#include static void _run_iteration (DBusConnection *conn) @@ -123,6 +124,12 @@ main (int argc, char *argv[]) DBusCondVar *dispatch_cond2, *io_path_cond2; int test_num = 0; + if (RUNNING_ON_VALGRIND) + { + printf ("1..0 # SKIP Not ready to run under valgrind yet\n"); + return 0; + } + printf ("# Testing late thread init\n"); dbus_error_init (&error);