aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/info-macros.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-08-05 15:41:04 +0200
committerTom de Vries <tdevries@suse.de>2019-08-05 15:41:04 +0200
commitd86bd7cba1965c621b63792179febcf9eeb273ad (patch)
tree9f7184ec615830080c6ea3216ad3bb13cbac1849 /gdb/testsuite/gdb.base/info-macros.exp
parent8abfcabcb49fcd8b95854a5b59e7928e3c6000ff (diff)
downloadgdb-d86bd7cba1965c621b63792179febcf9eeb273ad.zip
gdb-d86bd7cba1965c621b63792179febcf9eeb273ad.tar.gz
gdb-d86bd7cba1965c621b63792179febcf9eeb273ad.tar.bz2
[gdb/testsuite] Run read1 timeout tests with with_read1_timeout_factor
When running tests with check-read1, we run into some timeouts where the tests are not easy to rewrite using gdb_test_sequence: ... FAIL: gdb.base/help.exp: help data (timeout) FAIL: gdb.base/help.exp: help files (timeout) FAIL: gdb.base/help.exp: help internals (timeout) FAIL: gdb.base/help.exp: help user-defined (timeout) FAIL: gdb.base/help.exp: help breakpoint "b" abbreviation (timeout) FAIL: gdb.base/help.exp: help breakpoint "br" abbreviation (timeout) FAIL: gdb.base/help.exp: help breakpoint "bre" abbreviation (timeout) FAIL: gdb.base/info-macros.exp: info macros 2 (timeout) FAIL: gdb.base/info-macros.exp: next (timeout) FAIL: gdb.base/info-macros.exp: info macros 3 (timeout) FAIL: gdb.base/info-macros.exp: next (timeout) FAIL: gdb.base/info-macros.exp: next (timeout) FAIL: gdb.base/info-macros.exp: info macros (timeout) FAIL: gdb.base/info-macros.exp: next (timeout) FAIL: gdb.base/info-macros.exp: next (timeout) FAIL: gdb.base/info-macros.exp: info macros 7 (timeout) FAIL: gdb.cp/nested-types.exp: ptype S10 (limit = -1) // parse failed (timeout) FAIL: gdb.cp/nested-types.exp: set print type nested-type-limit 1 (timeout) ... Fix these by increasing the timeout by a factor 10. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-08-05 Tom de Vries <tdevries@suse.de> PR testsuite/24863 * lib/gdb.exp (with_read1_timeout_factor): New proc. * gdb.base/help.exp: Use with_read1_timeout_factor. * gdb.base/info-macros.exp: Same. * gdb.cp/nested-types.exp: Same.
Diffstat (limited to 'gdb/testsuite/gdb.base/info-macros.exp')
-rw-r--r--gdb/testsuite/gdb.base/info-macros.exp21
1 files changed, 14 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.base/info-macros.exp b/gdb/testsuite/gdb.base/info-macros.exp
index b76a5bb..e2385fa 100644
--- a/gdb/testsuite/gdb.base/info-macros.exp
+++ b/gdb/testsuite/gdb.base/info-macros.exp
@@ -132,12 +132,19 @@ set test "info macro -a -- FOO"
set testname "$test"
gdb_test "$test" "$r1$r2$r3$r4" "$testname"
+proc gdb_test_multiple_with_read1_timeout_factor { factor command message \
+ user_code } {
+ with_read1_timeout_factor $factor {
+ uplevel [list gdb_test_multiple $command $message $user_code]
+ }
+}
+
set test "info macros"
set r1 ".*#define FOO \"hello\""
set r2 ".*#define ONE"
set r3 ".*\r\n$gdb_prompt"
set testname "$test 2"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re "$r1$r2$r3" {
pass $testname
}
@@ -158,7 +165,7 @@ set r2 ".*#define ONE"
set r3 ".*#define TWO"
set r4 ".*\r\n$gdb_prompt"
set testname "$test 3"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define THREE.*\r\n$gdb_prompt" {
fail $testname
}
@@ -178,7 +185,7 @@ set r3 ".*#define THREE"
set r4 ".*#define TWO"
set r5 ".*\r\n$gdb_prompt"
set testname "$test 4"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define FOUR.*\r\n$gdb_prompt" {
fail $testname
}
@@ -188,7 +195,7 @@ gdb_test_multiple "$test" $testname {
}
# same as above with a linespec.
set test "info macros *\$pc"
-gdb_test_multiple "$test" $test {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $test {
-re ".*#define FOUR.*\r\n$gdb_prompt" {
fail $test
}
@@ -204,7 +211,7 @@ set r3 ".*#define TWO."
set r4 ".*\r\n$gdb_prompt"
set test "info macros"
set testname "$test 5"
-gdb_test_multiple "$test" $test {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $test {
-re ".*#define THREE.*\r\n$gdb_prompt" {
fail $testname
}
@@ -221,7 +228,7 @@ gdb_test "next" ".*" ""
set r1 ".*#define DEF_MACROS"
set r2 ".*\r\n$gdb_prompt"
set testname "$test 6"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define FOO \" \".*\r\n$gdb_prompt" {
fail $testname
}
@@ -257,7 +264,7 @@ set r2 ".*#define FOO\\(a\\) foo = a"
set r3 ".*#define FOUR"
set r4 ".*\r\n$gdb_prompt"
set testname "$test 7"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define FOO \" \".*\r\n$gdb_prompt" {
fail $testname
}