From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17131 invoked by alias); 28 Feb 2004 18:08:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17122 invoked from network); 28 Feb 2004 18:08:42 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 28 Feb 2004 18:08:42 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ax8tF-0004OC-RN for ; Sat, 28 Feb 2004 13:08:41 -0500 Date: Sat, 28 Feb 2004 18:08:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: [patch/testsuite] Wait for gdbserver output Message-ID: <20040228180841.GA16831@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00845.txt.bz2 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 * 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