This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] gdb.server/ext-run.exp: Fix intermittent failures.
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Mon, 15 Nov 2010 14:37:36 -0800 (PST)
- Subject: [patch] gdb.server/ext-run.exp: Fix intermittent failures.
Hi.
I'm seeing intermittent failures in gdb.server/ext-run.exp.
FAIL: gdb.server/ext-run.exp: get process list (timeout)
FAIL: gdb.server/ext-run.exp: monitor exit (got interactive prompt)
They're the same kind of failure as was recently fixed
in gdb.base/maint.exp, and I've applied the same fix here.
I will check this in in two days if there are no objections.
2010-11-15 Doug Evans <dje@google.com>
* gdb.server/ext-run.exp: Fix intermittent failures.
Index: ext-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.server/ext-run.exp,v
retrieving revision 1.10
diff -u -p -r1.10 ext-run.exp
--- ext-run.exp 10 Jun 2010 19:48:20 -0000 1.10
+++ ext-run.exp 15 Nov 2010 22:34:38 -0000
@@ -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" }
+ }
}
}