tsan: for unittests, change to use test fixtures to clear racy stacks
authorYuanfang Chen <yuanfang.chen@sony.com>
Tue, 3 May 2022 17:13:15 +0000 (10:13 -0700)
committerYuanfang Chen <yuanfang.chen@sony.com>
Tue, 3 May 2022 17:18:00 +0000 (10:18 -0700)
commita61c8e1ebdff2111a394feac168426e0d962a134
tree1dea2cd186ec3f42216c609b2d101752be13c16f
parent1deea714b3b4023b2d50f73503ee2782c3b59fe7
tsan: for unittests, change to use test fixtures to clear racy stacks

After cd0a5889d71, unittest would run in shard mode where many tests
share a single process. Need to clear some global state to make the test
results stable.

Reviewed By: thetruestblue, rsundahl

Differential Revision: https://reviews.llvm.org/D124591
compiler-rt/lib/tsan/tests/rtl/tsan_mop.cpp
compiler-rt/lib/tsan/tests/rtl/tsan_mutex.cpp
compiler-rt/lib/tsan/tests/rtl/tsan_string.cpp
compiler-rt/lib/tsan/tests/rtl/tsan_test.cpp
compiler-rt/lib/tsan/tests/rtl/tsan_test_util.h
compiler-rt/lib/tsan/tests/rtl/tsan_test_util_posix.cpp
compiler-rt/lib/tsan/tests/rtl/tsan_thread.cpp