Skip to content
Commit 832a980e authored by Tom de Vries's avatar Tom de Vries
Browse files

[gdb/testsuite] Fix race in gdb.threads/detach-step-over.exp

Once in a while I run into:
...
FAIL: gdb.threads/detach-step-over.exp: \
  breakpoint-condition-evaluation=host: target-non-stop=off: non-stop=off: \
  displaced=off: iter 1: all threads running
...

In can easily reproduce this by doing:
...
     # Wait a bit, to give time for the threads to hit the
     # breakpoint.
-    sleep 1

     return true
...

Fix this by counting the running threads in a loop, effectively allowing 10
seconds (instead of 1) for the threads to start running, but only sleeping if
needed.

Reduces total execution time from 1m27s to 56s.

Tested on x86_64-linux.
parent c3efaf0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment