[gdb/testsuite] Fix timeouts in gdb.threads/step-over-*.exp
authorTom de Vries <tdevries@suse.de>
Fri, 20 Mar 2020 13:59:01 +0000 (14:59 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 20 Mar 2020 13:59:01 +0000 (14:59 +0100)
commit0dd7b8f788b8d5239800d59f97b43186dcf425e2
tree2fde80a67de3252f3076ff9422130792a114781a
parent0d832e7f5e8c2e3659a55955c3b419e7cf5c9a34
[gdb/testsuite] Fix timeouts in gdb.threads/step-over-*.exp

When running test-cases gdb.threads/step-over-lands-on-breakpoint.exp and
gdb.threads/step-over-trips-on-watchpoint.exp with target board
unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects, we run into timeouts
due not being able to set a breakpoint and then trying to continue to that
breakpoint.

In total, we run into 186 timeouts, which roughly corresponds to half an hour:
...
$ grep "FAIL.*(timeout)" gdb.sum \
  | awk '{print $2}' \
  | sort \
  | uniq -c
     66 gdb.threads/step-over-lands-on-breakpoint.exp:
    120 gdb.threads/step-over-trips-on-watchpoint.exp:
...

Fix this by bailing out if the first break fails.

Tested on x86_64-linux, both with native and with target board mentioned above.

gdb/testsuite/ChangeLog:

2020-03-20  Tom de Vries  <tdevries@suse.de>

* gdb.threads/step-over-lands-on-breakpoint.exp (do_test): Bail out if
first break fails.
* gdb.threads/step-over-trips-on-watchpoint.exp: (do_test): Same.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp