From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32542 invoked by alias); 12 Oct 2010 18:23:49 -0000 Received: (qmail 32533 invoked by uid 22791); 12 Oct 2010 18:23:48 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Oct 2010 18:23:43 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9CINeRa030805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 12 Oct 2010 14:23:40 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9CINcq4023446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Oct 2010 14:23:40 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o9CINcHL027152; Tue, 12 Oct 2010 20:23:38 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o9CINbZr027151; Tue, 12 Oct 2010 20:23:37 +0200 Date: Tue, 12 Oct 2010 18:23:00 -0000 From: Jan Kratochvil To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [commit] Fix timeouts in break-interp.exp on slow machines Message-ID: <20101012182337.GA15377@host1.dyn.jankratochvil.net> References: <201010121720.o9CHKTnM003520@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010121720.o9CHKTnM003520@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00198.txt.bz2 On Tue, 12 Oct 2010 19:20:29 +0200, Ulrich Weigand wrote: > This is once again caused by a gdb_expect clause with a ".*" wildcard that > matches a large number of lines. This can cause expect to slow down > significantly, to the extent that the tests time out on slow machines. OK, thanks for the fix. I do not have the slowness reproducible here but I thought gdb_expect is deprecated in the favor of gdb_test_multiple. I do not mind but just curious if it could be rather coded this way or it would be still slow/incompatible by the more patterns of gdb_test_multiple? Tested on x86_64-fedora14snapshot-linux-gnu. Thanks, Jan gdb/testsuite/ 2010-10-12 Jan Kratochvil * gdb.base/break-interp.exp (test_ld): Replace gdb_expect by gdb_test_multiple. --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -442,21 +442,19 @@ proc test_ld {file ifmain trynosym displacement} { if $ifmain { reach "_dl_debug_state" run $displacement - # Use two separate gdb_expect statements to avoid timeouts due to - # slow processing of wildcard capturing long output + # Use two separate gdb_test_multiple statements to avoid timeouts due + # to slow processing of wildcard capturing long output set test "info files" set entrynohex "" - send_gdb "$test\n" - gdb_expect { + gdb_test_multiple $test $test { -re "\r\n\[\t \]*Entry point:\[\t \]*0x(\[0-9a-f\]+)\r\n" { set entrynohex $expect_out(1,string) - gdb_expect { - -re "$gdb_prompt $" { pass $test } - timeout { fail "$test (timeout)" } + gdb_test_multiple "" $test { + -re "\r\n$gdb_prompt $" { + pass $test + } } } - -re ".*$gdb_prompt $" { fail $test } - timeout { fail "$test (timeout)" } } # `info sym' cannot be tested for .opd as the binary may not have