Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libcxx testing] Make three locking tests more reliable
The challenge with measuring time in tests is that slow and/or busy machines can cause tests to fail in unexpected ways. After this change, three tests should be much more robust. The only remaining and tiny race that I can think of is preemption after `--countDown`. That being said, the race isn't fixable because the standard library doesn't provide a way to count threads that are waiting to acquire a lock. Reviewers: ldionne, EricWF, howard.hinnant, mclow.lists, #libc Reviewed By: ldionne, #libc Subscribers: dexonsmith, jfb, broadwaylamb, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D79406
- Loading branch information
1 parent
0b97833
commit 4f4ce13
Showing
3 changed files
with
106 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters