tsan: deflake dlopen_static_tls.cpp
authorDmitry Vyukov <dvyukov@google.com>
Mon, 13 Dec 2021 08:28:42 +0000 (09:28 +0100)
committerDmitry Vyukov <dvyukov@google.com>
Mon, 13 Dec 2021 11:01:40 +0000 (12:01 +0100)
commitb08883337531feb2b72aee89164c80480aa9d7dc
tree387e2a891778513a6eae07e1c0dc36d59ce785fe
parent7de546e9e8b6c07ef1247f518b2995ec4efbb7d2
tsan: deflake dlopen_static_tls.cpp

Currently the test calls dlclose in the thread
concurrently with the main thread calling a function
from the dynamic library. This is not good.
Wait for the main thread to call the function
before calling dlclose.

Depends on D115612.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D115613
compiler-rt/test/tsan/Linux/dlopen_static_tls.cpp