summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2022-03-09 12:21:23 +0000
committerHåvard Pettersen <havardpe@oath.com>2022-03-09 12:21:23 +0000
commitd17dc98e643149d9b393033387b24042150a6c6b (patch)
tree23ec4004108b6645846b622f396714ac9decf1bb /vespalib
parent44607b151b97c0483354ff83630db6829df0a5ba (diff)
tsan does not seem too happy about mmap failures
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/exception_classes/silenceuncaught_test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
index a15e9327d16..9f6917d5d65 100644
--- a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
+++ b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
@@ -13,6 +13,14 @@ using namespace vespalib;
#endif
#endif
+#ifndef __SANITIZE_THREAD__
+#if defined(__has_feature)
+#if __has_feature(thread_sanitizer)
+#define __SANITIZE_THREAD__
+#endif
+#endif
+#endif
+
TEST("that uncaught exception causes negative exitcode.") {
Process proc("ulimit -c 0 && exec ./vespalib_caught_uncaught_app uncaught");
EXPECT_LESS(proc.join(), 0);
@@ -34,6 +42,7 @@ TEST("that caught silenced exception causes exitcode 0") {
}
#ifndef __SANITIZE_ADDRESS__
+#ifndef __SANITIZE_THREAD__
#ifdef __APPLE__
// setrlimit with RLIMIT_AS is broken on Darwin
#else
@@ -53,5 +62,6 @@ TEST("that mmap beyond limits with set VESPA_SILENCE_CORE_ON_OOM cause exitcode
}
#endif
#endif
+#endif
TEST_MAIN() { TEST_RUN_ALL(); }