From cf6f97c96ed0cca1aae6e1be5bb82cde0dd85219 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 12 Jul 2018 13:06:32 +0100 Subject: [PATCH 15/18] 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 --- test/name-test/Makefile.am | 1 + test/name-test/test-ids.c | 7 +++++++ test/name-test/test-pending-call-disconnected.c | 7 +++++++ test/name-test/test-pending-call-dispatch.c | 7 +++++++ test/name-test/test-pending-call-timeout.c | 7 +++++++ test/name-test/test-privserver-client.c | 7 +++++++ test/name-test/test-privserver.c | 7 +++++++ test/name-test/test-shutdown.c | 7 +++++++ test/name-test/test-threads-init.c | 7 +++++++ 9 files changed, 57 insertions(+) diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index 40096350..dd7f82a8 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 73b71f15..be449abd 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 6ff4243a..6ef04b6b 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 af80868a..e30d1f74 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 a204db01..c47ba3f2 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 7a293f4e..d522a9c4 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 04f9cfa0..1d579ba0 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 dbbe5254..b195bbb7 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 a19b9627..fa90ca72 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); -- 2.18.0