From d17dc98e643149d9b393033387b24042150a6c6b Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Wed, 9 Mar 2022 12:21:23 +0000 Subject: tsan does not seem too happy about mmap failures --- vespalib/src/tests/exception_classes/silenceuncaught_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vespalib') 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(); } -- cgit v1.2.3