Index: lib/tsan/rtl/tsan_flags.inc =================================================================== --- lib/tsan/rtl/tsan_flags.inc +++ 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: test/tsan/Darwin/dispatch_main.mm =================================================================== --- test/tsan/Darwin/dispatch_main.mm +++ 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: test/tsan/Darwin/dispatch_once_deadlock.mm =================================================================== --- test/tsan/Darwin/dispatch_once_deadlock.mm +++ 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: test/tsan/Darwin/gcd-after.mm =================================================================== --- test/tsan/Darwin/gcd-after.mm +++ 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: test/tsan/Darwin/gcd-apply-race.mm =================================================================== --- test/tsan/Darwin/gcd-apply-race.mm +++ 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: test/tsan/Darwin/gcd-apply.mm =================================================================== --- test/tsan/Darwin/gcd-apply.mm +++ 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: test/tsan/Darwin/gcd-async-norace.mm =================================================================== --- test/tsan/Darwin/gcd-async-norace.mm +++ 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: test/tsan/Darwin/gcd-async-race.mm =================================================================== --- test/tsan/Darwin/gcd-async-race.mm +++ 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: test/tsan/Darwin/gcd-barrier-race.mm =================================================================== --- test/tsan/Darwin/gcd-barrier-race.mm +++ 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: test/tsan/Darwin/gcd-barrier.mm =================================================================== --- test/tsan/Darwin/gcd-barrier.mm +++ 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: test/tsan/Darwin/gcd-blocks.mm =================================================================== --- test/tsan/Darwin/gcd-blocks.mm +++ 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: test/tsan/Darwin/gcd-data.mm =================================================================== --- test/tsan/Darwin/gcd-data.mm +++ 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: test/tsan/Darwin/gcd-fd.mm =================================================================== --- test/tsan/Darwin/gcd-fd.mm +++ 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: test/tsan/Darwin/gcd-groups-destructor.mm =================================================================== --- test/tsan/Darwin/gcd-groups-destructor.mm +++ 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: test/tsan/Darwin/gcd-groups-leave.mm =================================================================== --- test/tsan/Darwin/gcd-groups-leave.mm +++ 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: test/tsan/Darwin/gcd-groups-norace.mm =================================================================== --- test/tsan/Darwin/gcd-groups-norace.mm +++ 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: test/tsan/Darwin/gcd-groups-stress.mm =================================================================== --- test/tsan/Darwin/gcd-groups-stress.mm +++ 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: test/tsan/Darwin/gcd-io-barrier-race.mm =================================================================== --- test/tsan/Darwin/gcd-io-barrier-race.mm +++ 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: test/tsan/Darwin/gcd-io-barrier.mm =================================================================== --- test/tsan/Darwin/gcd-io-barrier.mm +++ 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: test/tsan/Darwin/gcd-io-cleanup.mm =================================================================== --- test/tsan/Darwin/gcd-io-cleanup.mm +++ 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: test/tsan/Darwin/gcd-io-race.mm =================================================================== --- test/tsan/Darwin/gcd-io-race.mm +++ 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: test/tsan/Darwin/gcd-io.mm =================================================================== --- test/tsan/Darwin/gcd-io.mm +++ 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: test/tsan/Darwin/gcd-once.mm =================================================================== --- test/tsan/Darwin/gcd-once.mm +++ 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: test/tsan/Darwin/gcd-semaphore-norace.mm =================================================================== --- test/tsan/Darwin/gcd-semaphore-norace.mm +++ 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: test/tsan/Darwin/gcd-serial-queue-norace.mm =================================================================== --- test/tsan/Darwin/gcd-serial-queue-norace.mm +++ 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: test/tsan/Darwin/gcd-source-cancel.mm =================================================================== --- test/tsan/Darwin/gcd-source-cancel.mm +++ 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: test/tsan/Darwin/gcd-source-cancel2.mm =================================================================== --- test/tsan/Darwin/gcd-source-cancel2.mm +++ 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: test/tsan/Darwin/gcd-source-event.mm =================================================================== --- test/tsan/Darwin/gcd-source-event.mm +++ 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: test/tsan/Darwin/gcd-source-event2.mm =================================================================== --- test/tsan/Darwin/gcd-source-event2.mm +++ 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: test/tsan/Darwin/gcd-source-registration.mm =================================================================== --- test/tsan/Darwin/gcd-source-registration.mm +++ 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: test/tsan/Darwin/gcd-source-registration2.mm =================================================================== --- test/tsan/Darwin/gcd-source-registration2.mm +++ 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: test/tsan/Darwin/gcd-source-serial.mm =================================================================== --- test/tsan/Darwin/gcd-source-serial.mm +++ 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: test/tsan/Darwin/gcd-suspend.mm =================================================================== --- test/tsan/Darwin/gcd-suspend.mm +++ 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: test/tsan/Darwin/gcd-sync-norace.mm =================================================================== --- test/tsan/Darwin/gcd-sync-norace.mm +++ 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: test/tsan/Darwin/gcd-sync-race.mm =================================================================== --- test/tsan/Darwin/gcd-sync-race.mm +++ 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: test/tsan/Darwin/gcd-target-queue-norace.mm =================================================================== --- test/tsan/Darwin/gcd-target-queue-norace.mm +++ 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: test/tsan/Darwin/ignore-noninstrumented.mm =================================================================== --- test/tsan/Darwin/ignore-noninstrumented.mm +++ 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: test/tsan/Darwin/ignored-interceptors.mm =================================================================== --- test/tsan/Darwin/ignored-interceptors.mm +++ 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: test/tsan/Darwin/libcxx-call-once.mm =================================================================== --- test/tsan/Darwin/libcxx-call-once.mm +++ 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: test/tsan/Darwin/libcxx-future.mm =================================================================== --- test/tsan/Darwin/libcxx-future.mm +++ 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: test/tsan/Darwin/libcxx-shared-ptr-recursive.mm =================================================================== --- test/tsan/Darwin/libcxx-shared-ptr-recursive.mm +++ 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: test/tsan/Darwin/libcxx-shared-ptr-stress.mm =================================================================== --- test/tsan/Darwin/libcxx-shared-ptr-stress.mm +++ 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: test/tsan/Darwin/libcxx-shared-ptr.mm =================================================================== --- test/tsan/Darwin/libcxx-shared-ptr.mm +++ 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: test/tsan/Darwin/lit.local.cfg =================================================================== --- test/tsan/Darwin/lit.local.cfg +++ 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: test/tsan/Darwin/norace-objcxx-run-time.mm =================================================================== --- test/tsan/Darwin/norace-objcxx-run-time.mm +++ 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: test/tsan/Darwin/objc-double-property.mm =================================================================== --- test/tsan/Darwin/objc-double-property.mm +++ 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: test/tsan/Darwin/objc-simple.mm =================================================================== --- test/tsan/Darwin/objc-simple.mm +++ 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: test/tsan/Darwin/xpc-race.mm =================================================================== --- test/tsan/Darwin/xpc-race.mm +++ 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: test/tsan/Darwin/xpc.mm =================================================================== --- test/tsan/Darwin/xpc.mm +++ 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: test/tsan/lit.cfg =================================================================== --- test/tsan/lit.cfg +++ 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: