From f02efa63a56946b7cc2ea90e723b813367c2b564 Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Wed, 17 Jul 2019 16:26:02 -0700 Subject: [PATCH 1/2] [TSan] Fix CI test failures I think this fix didn't get propagated in the transition from llvm:stable to llvm-project:swift/master because the filename changed from `lit.cfg` to `lit.cfg.py` at the same time. rdar://56545824 Original commit: [TSan] Follow-up for my previous commit I enabled ignore_interceptors_accesses, but forgot to disable it for tests to avoid false negatives. apple-llvm-split-commit: 77a1e0d62108f1363fbe868b09eb53d42b923aae apple-llvm-split-dir: compiler-rt/ (cherry picked from commit 67bb9b1bef011490b28f05fbef91f2235baf69cd) --- compiler-rt/test/tsan/lit.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler-rt/test/tsan/lit.cfg b/compiler-rt/test/tsan/lit.cfg index 50c8a5eea02db..bd96fd04036f5 100644 --- a/compiler-rt/test/tsan/lit.cfg +++ b/compiler-rt/test/tsan/lit.cfg @@ -28,6 +28,7 @@ if config.host_os == 'Darwin': # 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' + default_tsan_opts += ':ignore_interceptors_accesses=0' # Platform-specific default TSAN_OPTIONS for lit tests. if default_tsan_opts: From 52b2ed3b5f2d684be12ec3231f7bdb7c3a41c8ec Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Thu, 18 Jul 2019 14:06:11 -0700 Subject: [PATCH 2/2] Fixup for "[TSan] Turn on ignore_interceptors_accesses" We also need to set the flag back to 0 for the unit tests. Original commit: Fixup for previous commit: 0f52cc47d62a27311bf4b92d9d25584d7936be11 apple-llvm-split-commit: 365c2d6dc9b80f0817f6cc4d46ffc9240fa5bf8c apple-llvm-split-dir: compiler-rt/ (cherry picked from commit b3555cef3533bd9ebe9543336097bdf2b584514b) --- compiler-rt/test/sanitizer_common/lit.common.cfg | 1 + compiler-rt/test/tsan/Unit/lit.site.cfg.in | 1 + 2 files changed, 2 insertions(+) diff --git a/compiler-rt/test/sanitizer_common/lit.common.cfg b/compiler-rt/test/sanitizer_common/lit.common.cfg index 693b348b05e60..85764ebaf29c6 100644 --- a/compiler-rt/test/sanitizer_common/lit.common.cfg +++ b/compiler-rt/test/sanitizer_common/lit.common.cfg @@ -35,6 +35,7 @@ if config.host_os == 'Darwin': # 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_tool_options += ['abort_on_error=0'] + default_tool_options += ['ignore_interceptors_accesses=0'] elif config.android: # The same as on Darwin, we default to "abort_on_error=1" which slows down # testing. Also, all existing tests are using "not" instead of "not --crash" diff --git a/compiler-rt/test/tsan/Unit/lit.site.cfg.in b/compiler-rt/test/tsan/Unit/lit.site.cfg.in index 40cf096478f5c..2297489453974 100644 --- a/compiler-rt/test/tsan/Unit/lit.site.cfg.in +++ b/compiler-rt/test/tsan/Unit/lit.site.cfg.in @@ -21,3 +21,4 @@ if config.host_os == 'Darwin': config.environment['TSAN_OPTIONS'] += ':ignore_noninstrumented_modules=0' else: config.environment['TSAN_OPTIONS'] = 'ignore_noninstrumented_modules=0' + config.environment['TSAN_OPTIONS'] += ':ignore_interceptors_accesses=0'