[PATCH] D27715: libcxx std::condition_variable::wait_for() fix for when tick occurs during wait_for()
Brian Cain via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 08:18:56 PST 2017
bcain added a comment.
In https://reviews.llvm.org/D27715#631540, @EricWF wrote:
> Also I would love to see an attempt at writing a test for this.
This was encountered on Hexagon. thread.condition.condvar/wait_for detects the failure, so to some extent a test already exists. I suspect that linux x86_64 would see the failure on that test if CONFIG_HZ were specified to be extremely high (> 40000).
An isolated, reliably failing test seems difficult/impossible since it would require the test case to simulate a system that knows quite a bit about the implementation ("system clock was just sampled in the wait_for context, so let's trigger a tick interrupt now"). A test case like this could be constructed but it would be a real challenge to integrate into the existing lit test suite.
Repository:
rL LLVM
https://reviews.llvm.org/D27715
More information about the llvm-commits
mailing list