HomePhabricator

[libcxx testing] Make three locking tests more reliable

Authored by davezarzycki on May 9 2020, 8:10 AM.

Description

[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

Details

Committed
davezarzyckiMay 9 2020, 8:11 AM
Reviewer
Restricted Project
Differential Revision
D79406: [libcxx testing] Make three locking tests more reliable
Parents
rG0b9783350b3a: LTO.h - reduce includes to forward declarations. NFC.
Branches
Unknown
Tags
Unknown