This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/testsuite] Wait for gdbserver output
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 28 Feb 2004 13:08:41 -0500
- Subject: [patch/testsuite] Wait for gdbserver output
In combination with my last change to gdbserver, this provides a nice
improvemet in test runtime. Otherwise we issue "target remote" before the
target issues listen(); that means that we will delay for some suitably long
timeout and retry.
Will commit in a bit.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-02-28 Daniel Jacobowitz <drow@mvista.com>
* config/gdbserver.exp (gdbserver_gdb_load): Wait for a complete
line of output.
Index: gdb/testsuite/config/gdbserver.exp
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/config/gdbserver.exp,v
retrieving revision 1.6
diff -u -p -r1.6 gdbserver.exp
--- gdb/testsuite/config/gdbserver.exp 18 Jan 2004 15:23:30 -0000 1.6
+++ gdb/testsuite/config/gdbserver.exp 27 Feb 2004 17:05:13 -0000
@@ -144,11 +144,13 @@ proc gdbserver_gdb_load { server_exec }
"$gdbserver $sockethost$portnum $server_exec"]
}
- # Wait for the server to produce at least one character of output.
+ # Wait for the server to produce at least one line and an additional
+ # character of output. This will wait until any TCP socket has been
+ # created, so that GDB can connect.
expect {
-i $server_spawn_id
-notransfer
- -re . { }
+ -re ".*\n." { }
}
# We can't just call close, because if gdbserver is local then that means