From af02b15a9ddfbfc88f9927e38436bc93d7f888aa Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Wed, 10 May 2017 08:54:52 +0000 Subject: [PATCH] test-sigbus: skip the test under valgrind --- src/test/test-sigbus.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/test-sigbus.c b/src/test/test-sigbus.c index 2c8fc1c..7a4a8a6 100644 --- a/src/test/test-sigbus.c +++ b/src/test/test-sigbus.c @@ -22,6 +22,9 @@ #include "fd-util.h" #include "sigbus.h" #include "util.h" +#ifdef HAVE_VALGRIND_VALGRIND_H +#include +#endif int main(int argc, char *argv[]) { _cleanup_close_ int fd = -1; @@ -29,6 +32,11 @@ int main(int argc, char *argv[]) { void *addr = NULL; uint8_t *p; +#ifdef HAVE_VALGRIND_VALGRIND_H + if (RUNNING_ON_VALGRIND) + return EXIT_TEST_SKIP; +#endif + #ifdef __SANITIZE_ADDRESS__ return EXIT_TEST_SKIP; #endif -- 2.7.4