From: Evgeny Vereshchagin Date: Wed, 10 May 2017 08:54:52 +0000 (+0000) Subject: test-sigbus: skip the test under valgrind X-Git-Tag: v234~210^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af02b15a9ddfbfc88f9927e38436bc93d7f888aa;p=platform%2Fupstream%2Fsystemd.git test-sigbus: skip the test under valgrind --- 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