This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Deflake TestTsanBasic.py
ClosedPublic

Authored by dvyukov on Nov 23 2021, 8:02 AM.

Details

Summary

The test flaked on bots:
http://green.lab.llvm.org/green/job/lldb-cmake/38666/
The test expects that tsan will detect a single race
with concurrent memory accesses. TSan doesn't do this reliably.
Run 100 iterations of the racing threads, which should
make the race much more likely to be detected.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Nov 23 2021, 8:02 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2021, 8:02 AM
melver accepted this revision.Nov 23 2021, 8:13 AM

Would using __tsan_testonly_barrier be appropriate here? If it's not meant to use any tricks to achieve the race then I guess retrying a bunch of times is fine.

This revision is now accepted and ready to land.Nov 23 2021, 8:13 AM

Would using __tsan_testonly_barrier be appropriate here? If it's not meant to use any tricks to achieve the race then I guess retrying a bunch of times is fine.

I did not want to leak this internal interface from tsan tests.

This revision was automatically updated to reflect the committed changes.