This is an archive of the discontinued LLVM Phabricator instance.

tsan: for unittests, change to use test fixtures to clear racy stacks
ClosedPublic

Authored by ychen on Apr 27 2022, 8:24 PM.

Details

Summary

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.

Diff Detail

Event Timeline

ychen created this revision.Apr 27 2022, 8:24 PM
Herald added a project: Restricted Project. · View Herald Transcript
ychen requested review of this revision.Apr 27 2022, 8:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 8:24 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
rsundahl accepted this revision.May 3 2022, 9:38 AM

Thanks for this update @ychen , it fixes our downstream tsan>RaceWithDeadThread failure since the original commit and gets to the root cause nicely..

This revision is now accepted and ready to land.May 3 2022, 9:38 AM
thetruestblue accepted this revision.May 3 2022, 10:11 AM

LGTM. I also confirmed this fixed the RaceWithDeadThread unit test failure since integrating sharding. Nice fix.

This revision was landed with ongoing or failed builds.May 3 2022, 10:18 AM
This revision was automatically updated to reflect the committed changes.