diff options
author | Tom de Vries <tdevries@suse.de> | 2020-03-20 14:59:01 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-03-20 14:59:01 +0100 |
commit | 0dd7b8f788b8d5239800d59f97b43186dcf425e2 (patch) | |
tree | 2fde80a67de3252f3076ff9422130792a114781a /gdb/testsuite | |
parent | 0d832e7f5e8c2e3659a55955c3b419e7cf5c9a34 (diff) | |
download | gdb-0dd7b8f788b8d5239800d59f97b43186dcf425e2.zip gdb-0dd7b8f788b8d5239800d59f97b43186dcf425e2.tar.gz gdb-0dd7b8f788b8d5239800d59f97b43186dcf425e2.tar.bz2 |
[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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp | 5 |
3 files changed, 14 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cb65ffa..e863a09 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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. + 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com> * gdb.server/exit-multiple-threads.c: New file. diff --git a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp index 64ef6e8..1921aff 100644 --- a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp +++ b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp @@ -38,7 +38,10 @@ proc do_test {displaced command} { gdb_test_no_output "set displaced-stepping $displaced" - gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] + set line [gdb_get_line_number "set wait-thread breakpoint here"] + if { ![gdb_breakpoint $line] } { + return + } gdb_continue_to_breakpoint "run to wait-thread breakpoint" gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads" diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp index 7d5da52..41c21ae 100644 --- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp +++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp @@ -57,7 +57,10 @@ proc do_test { displaced with_bp } { gdb_test_no_output "set displaced-stepping $displaced" - gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] + set line [gdb_get_line_number "set wait-thread breakpoint here"] + if { ![gdb_breakpoint $line] } { + return + } gdb_continue_to_breakpoint "run to wait-thread breakpoint" gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads" |