From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17660 invoked by alias); 3 Apr 2002 14:21:32 -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 17611 invoked from network); 3 Apr 2002 14:21:28 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 3 Apr 2002 14:21:28 -0000 Received: from redhat.com (rtl.cygnus.com [205.180.230.21]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id GAA08467; Wed, 3 Apr 2002 06:21:26 -0800 (PST) Message-ID: <3CAB0F53.D96BF21B@redhat.com> Date: Wed, 03 Apr 2002 06:21:00 -0000 From: Fernando Nasser Organization: Red Hat Canada X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com Subject: Re: [RFA/testsuite] Significantly speed up commands.exp References: <20020403012054.A28087@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00064.txt.bz2 This apparently was a problem with HP-UX. Anyway, we should not have to hack GDB -- HP-UX folks have to get a newer Dejagnu if they have not done so yet. So lets go ahead and remove the hack. Thank you very much. Fernando Daniel Jacobowitz wrote: > > There's no good reason for how long commands.exp takes on any fast machine. > I figured something was timing out somewhere and went digging. Sure enough, > there's a nasty hack in gdb_expect to support -notransfer as the first > argument to gdb_expect and pass it on to remote_expect in the same way; but > the comment alludes to a DejaGNU bug which seems to be long gone. At least, > I couldn't find it in any version of DejaGNU I looked at. Similarly, since > 1994 at least and probably earlier, expect has wanted -notransfer before the > individual -re entries, not before the whole block. > > Killing the hack saves about a minute in timeouts; every line of a > multi-line command was pausing for two seconds. This makes my 4-way test > runs a little happier. I think there's another culprit somewhere, but > before this patch: > > real 23m38.255s > user 8m22.000s > sys 1m44.880s > > Afterwards, it should be about 19min. Wall clock twice system time used > isn't too shabby, since there's a lot of I/O involved. > > OK to commit? > > -- > Daniel Jacobowitz Carnegie Mellon University > MontaVista Software Debian GNU/Linux Developer > > 2002-04-02 Daniel Jacobowitz > > * lib/gdb.exp (gdb_test): Move -notransfer inside of gdb_expect. > (gdb_expect): Remove $notransfer hack. > > Index: gdb.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v > retrieving revision 1.14 > diff -u -p -r1.14 gdb.exp > --- gdb/gdb/testsuite/lib/gdb.exp 2001/10/02 19:42:10 1.14 > +++ gdb/gdb/testsuite/lib/gdb.exp 2002/04/03 06:14:12 > @@ -440,9 +440,9 @@ proc gdb_test { args } { > # we need to set -notransfer expect option so that > # command output is not lost for pattern matching > # - guo > - gdb_expect -notransfer 2 { > - -re "\[\r\n\]" { } > - timeout { } > + gdb_expect 2 { > + -notransfer -re "\[\r\n\]" { verbose "partial: match" 3 } > + timeout { verbose "partial: timeout" 3 } > } > set string [string range "$string" [expr $foo + 1] end]; > } else { > @@ -1132,20 +1132,6 @@ proc send_gdb { string } { > # > > proc gdb_expect { args } { > - # allow -notransfer expect flag specification, > - # used by gdb_test routine for multi-line commands. > - # packed with gtimeout when fed to remote_expect routine, > - # which is a hack but due to what looks like a res and orig > - # parsing problem in remote_expect routine (dejagnu/lib/remote.exp): > - # what's fed into res is not removed from orig. > - # - guo > - if { [lindex $args 0] == "-notransfer" } { > - set notransfer -notransfer; > - set args [lrange $args 1 end]; > - } else { > - set notransfer ""; > - } > - > if { [llength $args] == 2 && [lindex $args 0] != "-re" } { > set gtimeout [lindex $args 0]; > set expcode [list [lindex $args 1]]; > @@ -1186,7 +1172,7 @@ proc gdb_expect { args } { > } > } > set code [catch \ > - {uplevel remote_expect host "$gtimeout $notransfer" $expcode} string]; > + {uplevel remote_expect host $gtimeout $expcode} string]; > if [info exists old_val] { > set remote_suppress_flag $old_val; > } else { -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9