[gcc r16-8280] libstdc++-v3: testsuite: lengthen stop_request wait_until timeout

Alexandre Oliva aoliva@gcc.gnu.org
Wed Mar 25 09:54:46 GMT 2026


https://gcc.gnu.org/g:1826e695957449cf597afe30706a8319747a4903

commit r16-8280-g1826e695957449cf597afe30706a8319747a4903
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Wed Mar 25 06:45:19 2026 -0300

    libstdc++-v3: testsuite: lengthen stop_request wait_until timeout
    
    30_threads/condition_variable_any/stop_token/wait_on.cc's
    test_wait_until occasionally fails on vxworks under very high load, in
    a way that suggests wait_until times out before the main thread
    requests it to stop.  Extend the timeouts to make more room for the
    stop request.
    
    
    for  libstdc++-v3/ChangeLog
    
            * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
            (test_wait_until): Extend the timeout for a stop request.

Diff:
---
 .../testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
index 66c1bde6619b..05763789e21d 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
@@ -61,7 +61,7 @@ void test_wait_until(bool ck = true)
 
   std::stop_source src;
 
-  auto abst = std::chrono::steady_clock::now() + 1.0s;
+  auto abst = std::chrono::steady_clock::now() + (ck ? 5.0s : 1.0s);
   auto tok = src.get_token();
   std::thread t([ck, &ready, &mtx, &cv, abst, tok]
                 {


More information about the Libstdc++-cvs mailing list