aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-11-18 20:25:12 +0000
committerDoug Evans <dje@google.com>2010-11-18 20:25:12 +0000
commitd82490117c421937ac14c2c85852567dfae60a19 (patch)
tree23249821adef19b8ca1c19d2b0d958c6872d86fe
parent77bc06753c1032077538a2500b0d228037e3718b (diff)
downloadgdb-d82490117c421937ac14c2c85852567dfae60a19.zip
gdb-d82490117c421937ac14c2c85852567dfae60a19.tar.gz
gdb-d82490117c421937ac14c2c85852567dfae60a19.tar.bz2
* gdb.server/ext-run.exp: Fix intermittent failures.
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.server/ext-run.exp17
2 files changed, 20 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d3d76ef..a2798f9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-18 Doug Evans <dje@google.com>
+
+ * gdb.server/ext-run.exp: Fix intermittent failures.
+
2010-11-12 Nathan Froyd <froydnj@codesourcery.com>
* gdb.stabs/gdb11479.exp: Use runto_main.
diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp
index d8fda73..e268a7d 100644
--- a/gdb/testsuite/gdb.server/ext-run.exp
+++ b/gdb/testsuite/gdb.server/ext-run.exp
@@ -52,7 +52,22 @@ if { [istarget *-*-linux*] } {
# On Linux, gdbserver can also report the list of processes.
# But only if xml support is compiled in.
if { $do_xml_test } {
- gdb_test "info os processes" ".*pid +user +command.*1 +root +\[/a-z\]*init.*" "get process list"
+ # This is done in a way to avoid the timeout that can occur from
+ # applying .* regexp to large output. It is copied from
+ # gdb.base/maint.exp "maint check-symtabs".
+ send_gdb "info os processes\n"
+ gdb_expect {
+ -re ".*pid +user +command.*1 +root +\[/a-z\]*init" {
+ gdb_expect {
+ -re "$gdb_prompt $" {
+ pass "get process list"
+ }
+ timeout { fail "(timeout) get process list" }
+ }
+ }
+ -re ".*$gdb_prompt $" { fail "get process list" }
+ timeout { fail "(timeout) get process list" }
+ }
}
}