aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-08-01 10:48:11 +0200
committerTom de Vries <tdevries@suse.de>2019-08-01 10:48:11 +0200
commit2a3ad588e0758bc2c753dfa216c344036e5a22bc (patch)
tree52ee93595102ac3ce0ce201802f1cb5d61773e1d /gdb/testsuite/gdb.base
parent117eb594228cf5447e49475e4fb33480c1f717a7 (diff)
downloadgdb-2a3ad588e0758bc2c753dfa216c344036e5a22bc.zip
gdb-2a3ad588e0758bc2c753dfa216c344036e5a22bc.tar.gz
gdb-2a3ad588e0758bc2c753dfa216c344036e5a22bc.tar.bz2
[gdb/testsuite] Fix gdb.base/structs.exp timeout with check-read1
With gdb.base/structs.exp and check-read1 we get: ... FAIL: gdb.base/structs.exp: p chartest (timeout) ... Fix this by using gdb_test_sequence. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-08-01 Tom de Vries <tdevries@suse.de> PR testsuite/24863 * gdb.base/structs.exp: Fix check-read1 timeout using gdb_test_sequence. * lib/gdb.exp (tcl_version_at_least, lrepeat): New proc.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/structs.exp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index b73cbd7..0e9b8d2 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -102,7 +102,11 @@ proc start_structs_test { types } {
# Verify $anychar_re can match all the values of `char' type.
gdb_breakpoint [gdb_get_line_number "chartest-done"]
gdb_continue_to_breakpoint "chartest-done" ".*chartest-done.*"
- gdb_test "p chartest" "= {({c = ${anychar_re}}, ){255}{c = ${anychar_re}}}"
+ gdb_test_sequence "p chartest" "" \
+ [concat \
+ [list "= \{"] \
+ [lrepeat 255 "^\{c = ${anychar_re}\}, "] \
+ [list "^\{c = ${anychar_re}\}\}"]]
}
# check that at the struct containing all the relevant types is correct