Index: test/tsan/fork_atexit.cc =================================================================== --- test/tsan/fork_atexit.cc +++ test/tsan/fork_atexit.cc @@ -1,4 +1,7 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s +// OS X temporary deadlock fix (symbolizer forks and that deadlocks when within the fork interceptor) +// RUN: export TSAN_OPTIONS="$TSAN_OPTIONS:symbolize=0" + +// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS:atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s #include #include #include @@ -32,6 +35,8 @@ } } +// CHECK-NOT: CHECK failed + // CHECK: CHILD DONE // CHECK: CHILD ATEXIT // CHECK: PARENT DONE Index: test/tsan/fork_deadlock.cc =================================================================== --- test/tsan/fork_deadlock.cc +++ test/tsan/fork_deadlock.cc @@ -1,4 +1,7 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s +// OS X temporary deadlock fix (symbolizer forks and that deadlocks when within the fork interceptor) +// RUN: export TSAN_OPTIONS="$TSAN_OPTIONS:symbolize=0" + +// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS:atexit_sleep_ms=50" %run %t 2>&1 | FileCheck %s #include "test.h" #include #include @@ -42,5 +45,6 @@ fprintf(stderr, "OK\n"); } +// CHECK-NOT: CHECK failed // CHECK: OK Index: test/tsan/fork_multithreaded.cc =================================================================== --- test/tsan/fork_multithreaded.cc +++ test/tsan/fork_multithreaded.cc @@ -1,5 +1,8 @@ +// OS X temporary deadlock fix (symbolizer forks and that deadlocks when within the fork interceptor) +// RUN: export TSAN_OPTIONS="$TSAN_OPTIONS:symbolize=0" + // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-DIE -// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="die_after_fork=0" %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-NODIE +// RUN: %clangxx_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS:die_after_fork=0" %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-NODIE #include "test.h" #include #include @@ -36,6 +39,8 @@ fprintf(stderr, "OK\n"); } +// CHECK-NOT: CHECK failed + // CHECK-DIE: ThreadSanitizer: starting new threads after multi-threaded fork is not supported // CHECK-DIE: OK Index: test/tsan/fork_multithreaded3.cc =================================================================== --- test/tsan/fork_multithreaded3.cc +++ test/tsan/fork_multithreaded3.cc @@ -1,3 +1,6 @@ +// OS X temporary deadlock fix (symbolizer forks and that deadlocks when within the fork interceptor) +// RUN: export TSAN_OPTIONS="$TSAN_OPTIONS:symbolize=0" + // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include @@ -35,6 +38,7 @@ fprintf(stderr, "OK\n"); } +// CHECK-NOT: CHECK failed // CHECK: ThreadSanitizer: data race // CHECK: OK Index: test/tsan/signal_reset.cc =================================================================== --- test/tsan/signal_reset.cc +++ test/tsan/signal_reset.cc @@ -41,6 +41,11 @@ } int main() { +#if defined(__APPLE__) + fprintf(stderr, "This test is not supported on OS X.\n"); + exit(1); +#endif + struct sigaction act = {}; act.sa_handler = SIG_IGN; if (sigaction(SIGPROF, &act, 0)) { Index: test/tsan/signal_sync.cc =================================================================== --- test/tsan/signal_sync.cc +++ test/tsan/signal_sync.cc @@ -20,6 +20,12 @@ } int main() { +#if defined(__APPLE__) + fprintf(stderr, "This test is not supported on OS X.\n"); + exit(1); +#endif + + const int kThreads = 10; pthread_t th[kThreads]; for (int i = 0; i < kThreads; i++) Index: test/tsan/signal_thread.cc =================================================================== --- test/tsan/signal_thread.cc +++ test/tsan/signal_thread.cc @@ -21,6 +21,10 @@ } int main() { +#if defined(__APPLE__) + fprintf(stderr, "This test is not supported on OS X.\n"); + exit(1); +#endif struct sigaction act = {}; act.sa_handler = &handler; if (sigaction(SIGPROF, &act, 0)) { Index: test/tsan/vfork.cc =================================================================== --- test/tsan/vfork.cc +++ test/tsan/vfork.cc @@ -1,3 +1,6 @@ +// OS X temporary deadlock fix (symbolizer forks and that deadlocks when within the fork interceptor) +// RUN: export TSAN_OPTIONS="$TSAN_OPTIONS:symbolize=0" + // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s #include #include @@ -46,6 +49,7 @@ printf("DONE\n"); } +// CHECK-NOT: CHECK failed // CHECK-NOT: WARNING: ThreadSanitizer: data race // CHECK-NOT: FAIL to vfork // CHECK: DONE