diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-09 13:49:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 13:49:46 +0100 |
commit | a36eb374409dc7b1b0d75936907d5a77d9a6a3eb (patch) | |
tree | f16e41686c62cde9ff5d32579e6a041964f7810a /vespalib | |
parent | 5059b6c79c118509779b883d34ef65169c3f29cd (diff) | |
parent | d17dc98e643149d9b393033387b24042150a6c6b (diff) |
Merge pull request #21614 from vespa-engine/havardpe/avoid-mmap-fail-with-tsan
tsan does not seem too happy about mmap failures
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/exception_classes/silenceuncaught_test.cpp | 10 |
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(); } |