libstdc++: Improve tests for try_lock_until members of mutex types
authorMike Crowe <mac@mcrowe.com>
Mon, 2 Dec 2019 16:22:53 +0000 (16:22 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 2 Dec 2019 16:22:53 +0000 (16:22 +0000)
commit49638674a46e58ff8bfb41c5346386dca9569375
tree364e2e5c6ab134ac925cebc4c6d9f20dbd606e0f
parent74fee04253a5007213634150b4505cd6fcab9910
libstdc++: Improve tests for try_lock_until members of mutex types

2019-12-02  Mike Crowe  <mac@mcrowe.com>

* testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
New test. Ensure that timed_mutex::try_lock_until actually times out
after the specified time when using both system_clock and
steady_clock.
* testsuite/30_threads/timed_mutex/try_lock_until/3.cc: New test.
Likewise but for recursive_timed_mutex.
* testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Template
test functions and use them to test both steady_clock and system_clock.
* testsuite/30_threads/unique_lock/locking/4.cc: Likewise. Wrap call
to timed_mutex::try_lock_until in VERIFY macro to check its return
value.

From-SVN: r278900
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc
libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc