aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2010-09-08 17:22:26 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2010-09-08 17:22:26 +0000
commit55b7ce7f0a3432541c635f0ce10774a35f9684fb (patch)
tree4694eb8ed2e2adf04ed147d15e0ef83f586dcd8d /gdb
parent774b6a14e005ee2ba726d5dc655faf67a15bc7de (diff)
downloadgdb-55b7ce7f0a3432541c635f0ce10774a35f9684fb.zip
gdb-55b7ce7f0a3432541c635f0ce10774a35f9684fb.tar.gz
gdb-55b7ce7f0a3432541c635f0ce10774a35f9684fb.tar.bz2
* gdb.base/maint.exp: Avoid wildcards against potentially very long
"maint print statistics" output to prevent expect timeouts.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/maint.exp18
2 files changed, 16 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a4db465..7c3ae15 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-08 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdb.base/maint.exp: Avoid wildcards against potentially very long
+ "maint print statistics" output to prevent expect timeouts.
+
2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/printcmds.exp (test_float_accepted): Import gdb_prompt.
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 40e9e8d..7e07fe8 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -149,14 +149,18 @@ if [istarget "*-*-cygwin*"] {
set timeout [expr $timeout + 500]
}
-gdb_test_multiple "maint print statistics" "maint print statistics" {
- -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Number of psym tables \\(not yet expanded\\).*Number of symbol tables.*Number of symbol tables with line tables.*Number of symbol tables with blockvectors.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $" {
- # Old output for gdb 6.0 and earlier
- pass "maint print statistics"
- }
- -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Number of psym tables \\(not yet expanded\\).*Number of symbol tables.*Number of symbol tables with line tables.*Number of symbol tables with blockvectors.*Total memory used for objfile obstack.*Total memory used for psymbol cache.*Total memory used for macro cache.*$gdb_prompt $" {
- pass "maint print statistics"
+send_gdb "maint print statistics\n"
+gdb_expect {
+ -re "Statistics for\[^\n\r\]*break\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n Number of \"partial\" symbols read: $decimal\r\n Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n Number of psym tables \\(not yet expanded\\): $decimal\r\n Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for psymbol cache: $decimal\r\n Total memory used for macro cache: $decimal\r\n Total memory used for file name cache: $decimal\r\n" {
+ gdb_expect {
+ -re "$gdb_prompt $" {
+ pass "maint print statistics"
+ }
+ timeout { fail "(timeout) maint print statistics" }
+ }
}
+ -re ".*$gdb_prompt $" { fail "maint print statistics" }
+ timeout { fail "(timeout) maint print statistics" }
}
# There aren't any ...