summaryrefslogtreecommitdiff
path: root/test/tsan/load_shared_lib.cc
AgeCommit message (Collapse)Author
2015-12-08tsan: fix test invisible barrierDmitry Vyukov
Another attempt at fixing tsan_invisible_barrier. Current implementation causes: https://llvm.org/bugs/show_bug.cgi?id=25643 There were several unsuccessful iterations for this functionality: Initially it was implemented in user code using REAL(pthread_barrier_wait). But pthread_barrier_wait is not supported on MacOS. Futexes are linux-specific for this matter. Then we switched to atomics+usleep(10). But usleep produced parasitic "as-if synchronized via sleep" messages in reports which failed some output tests. Then we switched to atomics+sched_yield. But this produced tons of tsan- visible events, which lead to "failed to restore stack trace" failures. Move implementation into runtime and use internal_sched_yield in the wait loop. This way tsan should see no events from the barrier, so not trace overflows and no "as-if synchronized via sleep" messages. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255030 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21tsan: remove sleeps from testsDmitry Vyukov
Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226659 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06[TSan] Make lit-tests more self-containedAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210370 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-30tsan: make positive tests more robustDmitry Vyukov
Add a script that is used to deflake inherently flaky tsan tests. It is invoked from lit tests as: %deflake %run %t The script runs the target program up to 10 times, until it produces a tsan warning. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209898 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-30Add %run to all lit testsGreg Fitzgerald
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207709 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: fix flaky testDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204119 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move TSan lit-tests under test/tsanAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201414 91177308-0d34-0410-b5e6-96231b3b80d8