[tsan] Call pthread interceptors directly in TSan RTL unit tests
authorKuba Brecka <kuba.brecka@gmail.com>
Tue, 15 Nov 2016 21:00:55 +0000 (21:00 +0000)
committerKuba Brecka <kuba.brecka@gmail.com>
Tue, 15 Nov 2016 21:00:55 +0000 (21:00 +0000)
commit5b2e4e3c66b9ea1a8604d3899aba68a52b2e1f72
tree3fbcd67612378f450012ac33b2af9681638f60b3
parentba002163c9b8d604ee69194c8ffca2c349b39b84
[tsan] Call pthread interceptors directly in TSan RTL unit tests

On Darwin, we're running the TSan unit tests without interceptors. To make sure TSan observes all the pthread events (thread creating, thread join, condvar signal, etc.) in tsan_posix.cc, we should call the pthread interceptors directly, as we already do in tsan_test_util_posix.cc. This fixes some flaky failures on Darwin bots.

Differential Revision: https://reviews.llvm.org/D26639

llvm-svn: 287026
compiler-rt/lib/tsan/tests/rtl/tsan_posix.cc
compiler-rt/lib/tsan/tests/rtl/tsan_posix_util.h [new file with mode: 0644]
compiler-rt/lib/tsan/tests/rtl/tsan_test_util_posix.cc