aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2022-05-04 23:41:38 -0300
committerAlexandre Oliva <oliva@gnu.org>2023-03-03 17:00:53 -0300
commit16554ba1fe66a09f99adde1220a2cd4f7e5e2d64 (patch)
treeb181d3eef1625dd23c387565483b20559fc0c31d /gcc
parent1f83aee5864129c4147a95c1a4e35d37c7eb7e59 (diff)
downloadgcc-16554ba1fe66a09f99adde1220a2cd4f7e5e2d64.zip
gcc-16554ba1fe66a09f99adde1220a2cd4f7e5e2d64.tar.gz
gcc-16554ba1fe66a09f99adde1220a2cd4f7e5e2d64.tar.bz2
libstdc++: testsuite: async.cc early timeout
The async call and future variable initialization may take a while to complete on uniprocessors, especially if the async call and other unrelated processes run before context switches back to the main thread. Taking steady_begin only then sometimes causes the 11*100ms in the slow clock, counted from before the async call, to not be enough for the measured wait to last 1s in the steady clock. I've seen it fall short of 1s by as little as a third of a tenth of a second in some cases, but in one surprisingly extreme case the elapsed wait time got only up to 216.7ms. Initializing both timestamps next to each other, before the async call, appears to avoid the problem entirely. I've renamed the variable moved out of the block so as to avoid name hiding in the subsequent block, that has another steady_begin variable. The second wait fails a lot less frequently, but the 2s limit has been exceeded, so I'm bumping up the max sleep to ~4s, and the tolerance to 3s. for libstdc++-v3/ChangeLog * testsuite/30_threads/async/async.cc (test04): Initialize steady_start, renamed from steady_begin, next to slow_start. Increase tolerance for final wait.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions