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.

Tested with gcc-14 targeting ppc-vx7r2 and ppc64-vx7r2.  Also tested
with trunk on ppc64le-linux-gnu, and with gcc-14 targeting powerpc-elf.
Ok to install?


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.
---
 .../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 e069acde2fefa..1ffc2a8cd848b 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]
                 {


-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to