diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-04-15 12:46:58 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-04-15 12:46:58 +0100 |
commit | 45fd756cafe258b9792b86e1f5df823ec0b848b4 (patch) | |
tree | b5b92571334a99e4481e13a596e5cf9788e4b8f2 /gdb/testsuite/gdb.reverse | |
parent | 78e9aa70febc3985a2c88dbc0c7a87d214231c3d (diff) | |
download | fsf-binutils-gdb-45fd756cafe258b9792b86e1f5df823ec0b848b4.zip fsf-binutils-gdb-45fd756cafe258b9792b86e1f5df823ec0b848b4.tar.gz fsf-binutils-gdb-45fd756cafe258b9792b86e1f5df823ec0b848b4.tar.bz2 |
Increase timeout in watch-bitfields.exp for software watchpoint
I see the following two timeout fails on pandaboard (arm-linux target),
FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: continue until exit (timeout)
FAIL: gdb.base/watch-bitfields.exp: regular watch against bitfields: continue until exit (timeout)
In this test, more than one watchpoint is used, so the following
watchpoint requests fall back to software watchpoint, so that GDB
will single step all the way and it is very slow.
This patch is to copy the fix from
[PATCH] GDB/testsuite: Correct gdb.base/watchpoint-solib.exp timeout tweak
https://sourceware.org/ml/gdb-patches/2014-07/msg00716.html
I find the left-over of this patch review is to factor out code into
a procedure, so I do that in this patch.
Re-run tests watch-bitfields.exp, watchpoint-solib.exp, sigall-reverse.exp,
and until-precsave.exp on pandaboard, no regression.
gdb/testsuite:
2015-04-15 Pedro Alves <palves@redhat.com>
Yao Qi <yao.qi@linaro.org>
* gdb.base/watch-bitfields.exp (test_watch_location): Increase
timeout by factor of 4.
(test_regular_watch): Likewise.
* gdb.base/watchpoint-solib.exp: Use with_timeout_factor.
* gdb.reverse/sigall-reverse.exp: Likewise.
* gdb.reverse/until-precsave.exp: Likewise.
* lib/gdb.exp (with_timeout_factor): New proc.
(gdb_expect): Move some code to ...
(get_largest_timeout): ... here. New procedure.
Diffstat (limited to 'gdb/testsuite/gdb.reverse')
-rw-r--r-- | gdb/testsuite/gdb.reverse/sigall-reverse.exp | 15 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/until-precsave.exp | 21 |
2 files changed, 12 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.reverse/sigall-reverse.exp b/gdb/testsuite/gdb.reverse/sigall-reverse.exp index 69152d4..065eea7 100644 --- a/gdb/testsuite/gdb.reverse/sigall-reverse.exp +++ b/gdb/testsuite/gdb.reverse/sigall-reverse.exp @@ -251,18 +251,11 @@ gdb_test "continue" \ "get signal TERM" gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM" -set savedtimeout $timeout -if { [target_info exists gdb,timeout] - && $timeout < [target_info gdb,timeout] } { - set oldtimeout [target_info gdb,timeout] -} else { - set oldtimeout $timeout +with_timeout_factor 2 { + gdb_test "continue" "\[process \[0-9\]+ .*" "continue to signal exit" \ + "The next instruction is syscall exit_group.* program...y. or n. " \ + "yes" } -set timeout [expr $oldtimeout * 2] -gdb_test "continue" "\[process \[0-9\]+ .*" "continue to signal exit" \ - "The next instruction is syscall exit_group.* program...y. or n. " \ - "yes" -set timeout $savedtimeout foreach sig [lreverse $signals] { test_one_sig_reverse $sig diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp index 1684645..640839f 100644 --- a/gdb/testsuite/gdb.reverse/until-precsave.exp +++ b/gdb/testsuite/gdb.reverse/until-precsave.exp @@ -49,22 +49,17 @@ gdb_test "break $end_of_main" \ "BP at end of main" # This can take awhile. -set savedtimeout $timeout -if { [target_info exists gdb,timeout] - && $timeout < [target_info gdb,timeout] } { - set oldtimeout [target_info gdb,timeout] -} else { - set oldtimeout $timeout +with_timeout_factor 15 { + gdb_test "continue" "Breakpoint .* set breakpoint 10a here .*" "run to end of main" } -set timeout [expr $oldtimeout * 15] -gdb_test "continue" "Breakpoint .* set breakpoint 10a here .*" "run to end of main" # So can this, against gdbserver, for example. -set timeout [expr $oldtimeout * 3] -gdb_test "record save $precsave" \ - "Saved core file $precsave with execution log\." \ - "save process recfile" -set timeout $savedtimeout + +with_timeout_factor 3 { + gdb_test "record save $precsave" \ + "Saved core file $precsave with execution log\." \ + "save process recfile" +} gdb_test "kill" "" "Kill process, prepare to debug log file" \ "Kill the program being debugged\\? \\(y or n\\) " "y" |