Several testcases need pthread barriers (e.g. all bench_*.cc which use test/tsan/bench.h) which are not available on OS X. Let's mark them with "UNSUPPORTED: darwin".
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/tsan/barrier.cc | ||
---|---|---|
5 ↗ | (On Diff #40112) | What's the point of testing our own implementation of barrier that nobody else uses (and so it's correctness is actually irrelevant)? We are not trying to re-implement on linux all darwin synchronization primitives like GCD, right. Can we just use the UNSUPPORTED directive, of if that does not work ifdef it out? |
test/tsan/test.h | ||
119 ↗ | (On Diff #40112) | I don't see a need for macros here. Please wrap it into functions with iface along the lines of: typedef ... benchtime_t; |
Updating patch to instead use "UNSUPPORTED: darwin" in tests that require pthread barriers.
LGTM
My comment was related only to barrier tests.
As for benchmarks, they are still useful on mac. Eventually we need to change bench.h to not rely on pthread_barrier and grow clocks using some other synchronization primitive that is supported on all platforms.