Index: compiler-rt/trunk/lib/tsan/rtl/tsan_flags.inc =================================================================== --- compiler-rt/trunk/lib/tsan/rtl/tsan_flags.inc +++ compiler-rt/trunk/lib/tsan/rtl/tsan_flags.inc @@ -79,7 +79,7 @@ TSAN_FLAG(const char *, suppressions, "", "Suppressions file name.") TSAN_FLAG(bool, ignore_interceptors_accesses, false, "Ignore reads and writes from all interceptors.") -TSAN_FLAG(bool, ignore_noninstrumented_modules, false, +TSAN_FLAG(bool, ignore_noninstrumented_modules, SANITIZER_MAC ? true : false, "Interceptors should only detect races when called from instrumented " "modules.") TSAN_FLAG(bool, shared_ptr_interceptor, true, Index: compiler-rt/trunk/test/tsan/Darwin/dispatch_main.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/dispatch_main.mm +++ compiler-rt/trunk/test/tsan/Darwin/dispatch_main.mm @@ -2,7 +2,7 @@ // quits the main thread. // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/dispatch_once_deadlock.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/dispatch_once_deadlock.mm +++ compiler-rt/trunk/test/tsan/Darwin/dispatch_once_deadlock.mm @@ -1,7 +1,7 @@ // Check that calling dispatch_once from a report callback works. // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 not %run %t 2>&1 | FileCheck %s +// RUN: not %run %t 2>&1 | FileCheck %s #import #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-apply-race.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-apply-race.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-apply-race.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s +// RUN: %deflake %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-apply.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-apply.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-apply.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s +// RUN: %deflake %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-barrier-race.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-barrier-race.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-barrier-race.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s +// RUN: %deflake %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-barrier.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-barrier.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-barrier.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-blocks.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-blocks.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-blocks.mm @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-data.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-data.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-data.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-fd.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-fd.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-fd.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-groups-destructor.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-groups-destructor.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-groups-destructor.mm @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-groups-leave.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-groups-leave.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-groups-leave.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-io-barrier-race.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-io-barrier-race.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-io-barrier-race.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s +// RUN: %deflake %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-io-barrier.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-io-barrier.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-io-barrier.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-io-cleanup.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-io-cleanup.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-io-cleanup.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-io-race.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-io-race.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-io-race.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s +// RUN: %deflake %run %t 2>&1 | FileCheck %s // REQUIRES: disabled Index: compiler-rt/trunk/test/tsan/Darwin/gcd-io.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-io.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-io.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-source-cancel.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-source-cancel.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-source-cancel.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-source-cancel2.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-source-cancel2.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-source-cancel2.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-source-event.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-source-event.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-source-event.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-source-event2.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-source-event2.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-source-event2.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-source-registration.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-source-registration.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-source-registration.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-source-registration2.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-source-registration2.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-source-registration2.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-source-serial.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-source-serial.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-source-serial.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-suspend.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-suspend.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-suspend.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s +// RUN: %deflake %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/gcd-target-queue-norace.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/gcd-target-queue-norace.mm +++ compiler-rt/trunk/test/tsan/Darwin/gcd-target-queue-norace.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/ignore-noninstrumented.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/ignore-noninstrumented.mm +++ compiler-rt/trunk/test/tsan/Darwin/ignore-noninstrumented.mm @@ -3,7 +3,7 @@ // RUN: %clang_tsan %s -o %t -framework Foundation // Check that without the flag, there are false positives. -// RUN: %deflake %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-RACE +// RUN: %env_tsan_opts=ignore_noninstrumented_modules=0 %deflake %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-RACE // With ignore_noninstrumented_modules=1, no races are reported. // RUN: %env_tsan_opts=ignore_noninstrumented_modules=1 %run %t 2>&1 | FileCheck %s Index: compiler-rt/trunk/test/tsan/Darwin/ignored-interceptors.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/ignored-interceptors.mm +++ compiler-rt/trunk/test/tsan/Darwin/ignored-interceptors.mm @@ -6,13 +6,13 @@ // RUN: %clang_tsan %s -o %t -framework Foundation // Check that without the flag, there are false positives. -// RUN: %deflake %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-RACE +// RUN: %env_tsan_opts=ignore_noninstrumented_modules=0 %deflake %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-RACE // With ignore_interceptors_accesses=1, no races are reported. -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %env_tsan_opts=ignore_noninstrumented_modules=0:ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s // With ignore_interceptors_accesses=1, races in user's code are still reported. -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t race 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RACE +// RUN: %env_tsan_opts=ignore_noninstrumented_modules=0:ignore_interceptors_accesses=1 %deflake %run %t race 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RACE #import Index: compiler-rt/trunk/test/tsan/Darwin/libcxx-call-once.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/libcxx-call-once.mm +++ compiler-rt/trunk/test/tsan/Darwin/libcxx-call-once.mm @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -framework Foundation -std=c++11 -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/libcxx-future.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/libcxx-future.mm +++ compiler-rt/trunk/test/tsan/Darwin/libcxx-future.mm @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include #include Index: compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr-recursive.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr-recursive.mm +++ compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr-recursive.mm @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr-stress.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr-stress.mm +++ compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr-stress.mm @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr.mm +++ compiler-rt/trunk/test/tsan/Darwin/libcxx-shared-ptr.mm @@ -1,5 +1,5 @@ // RUN: %clangxx_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg +++ compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg @@ -7,3 +7,5 @@ if root.host_os not in ['Darwin']: config.unsupported = True + +config.environment['TSAN_OPTIONS'] += ':ignore_noninstrumented_modules=1' Index: compiler-rt/trunk/test/tsan/Darwin/norace-objcxx-run-time.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/norace-objcxx-run-time.mm +++ compiler-rt/trunk/test/tsan/Darwin/norace-objcxx-run-time.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -lc++ -fobjc-arc -lobjc -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s // Check that we do not report races between: // - Object retain and initialize Index: compiler-rt/trunk/test/tsan/Darwin/objc-double-property.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/objc-double-property.mm +++ compiler-rt/trunk/test/tsan/Darwin/objc-double-property.mm @@ -1,7 +1,7 @@ -// RUN: %clangxx_tsan -O0 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_tsan -O1 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_tsan -O2 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_tsan -O3 %s -o %t -framework Foundation && %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O0 %s -o %t -framework Foundation && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t -framework Foundation && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O2 %s -o %t -framework Foundation && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_tsan -O3 %s -o %t -framework Foundation && %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm +++ compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm @@ -1,7 +1,7 @@ // Test that a simple Obj-C program runs and exits without any warnings. // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import Index: compiler-rt/trunk/test/tsan/Darwin/xpc-race.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/xpc-race.mm +++ compiler-rt/trunk/test/tsan/Darwin/xpc-race.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s +// RUN: %deflake %run %t 2>&1 | FileCheck %s #import #import Index: compiler-rt/trunk/test/tsan/Darwin/xpc.mm =================================================================== --- compiler-rt/trunk/test/tsan/Darwin/xpc.mm +++ compiler-rt/trunk/test/tsan/Darwin/xpc.mm @@ -1,5 +1,5 @@ // RUN: %clang_tsan %s -o %t -framework Foundation -// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #import #import Index: compiler-rt/trunk/test/tsan/Unit/lit.site.cfg.in =================================================================== --- compiler-rt/trunk/test/tsan/Unit/lit.site.cfg.in +++ compiler-rt/trunk/test/tsan/Unit/lit.site.cfg.in @@ -14,3 +14,10 @@ if config.host_os == 'Darwin': config.parallelism_group = config.darwin_sanitizer_parallelism_group_func + + # On Darwin, we default to ignore_noninstrumented_modules=1, which also + # suppresses some races the tests are supposed to find. See tsan/lit.cfg. + if 'TSAN_OPTIONS' in config.environment: + config.environment['TSAN_OPTIONS'] += ':ignore_noninstrumented_modules=0' + else: + config.environment['TSAN_OPTIONS'] = 'ignore_noninstrumented_modules=0' Index: compiler-rt/trunk/test/tsan/lit.cfg =================================================================== --- compiler-rt/trunk/test/tsan/lit.cfg +++ compiler-rt/trunk/test/tsan/lit.cfg @@ -24,6 +24,10 @@ # On Darwin, we default to `abort_on_error=1`, which would make tests run # much slower. Let's override this and run lit tests with 'abort_on_error=0'. default_tsan_opts += ':abort_on_error=0' + # On Darwin, we default to ignore_noninstrumented_modules=1, which also + # suppresses some races the tests are supposed to find. Let's run without this + # setting, but turn it back on for Darwin tests (see Darwin/lit.local.cfg). + default_tsan_opts += ':ignore_noninstrumented_modules=0' # Platform-specific default TSAN_OPTIONS for lit tests. if default_tsan_opts: