]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-sigbus: skip the test under valgrind 5946/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Wed, 10 May 2017 08:54:52 +0000 (08:54 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Wed, 10 May 2017 11:05:57 +0000 (11:05 +0000)
src/test/test-sigbus.c

index 2c8fc1c589bc8c3d435bb097c466fc38aaa5850b..7a4a8a6636cd3fd84614a1c3123e119856ca62e2 100644 (file)
@@ -22,6 +22,9 @@
 #include "fd-util.h"
 #include "sigbus.h"
 #include "util.h"
+#ifdef HAVE_VALGRIND_VALGRIND_H
+#include <valgrind/valgrind.h>
+#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