From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4314 invoked by alias); 12 Oct 2010 17:20:41 -0000 Received: (qmail 4288 invoked by uid 22791); 12 Oct 2010 17:20:39 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.17.167) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Oct 2010 17:20:34 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.1/8.13.1) with ESMTP id o9CHKVjU007574 for ; Tue, 12 Oct 2010 17:20:31 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9CHKUPc4137198 for ; Tue, 12 Oct 2010 19:20:30 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o9CHKUvm003537 for ; Tue, 12 Oct 2010 19:20:30 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o9CHKTnM003520 for ; Tue, 12 Oct 2010 19:20:29 +0200 Message-Id: <201010121720.o9CHKTnM003520@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 12 Oct 2010 19:20:29 +0200 Subject: [commit] Fix timeouts in break-interp.exp on slow machines To: gdb-patches@sourceware.org Date: Tue, 12 Oct 2010 17:20:00 -0000 From: "Ulrich Weigand" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00195.txt.bz2 Hello, since Jan checked in his recent set of patches, break-interp.exp test cases have started to succeed on my ARM machines. However, I was still seeing timeouts in the "info files" tests. 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. Fixed along the lines of similiar tests elsewhere by separating the statement into two different gdb_expect patterns, which eliminates the need for this particular wildcard. Tested on i386-linux and armv7l-linux-gnueabi with no regressions, fixes the timeouts on ARM. Committed to mainline. Bye, Ulrich ChangeLog: * break-interp.exp (test_ld): Use two separate gdb_expect statements for the "info files" test to avoid timeouts on slow machines. Index: gdb/testsuite/gdb.base/break-interp.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break-interp.exp,v retrieving revision 1.22 diff -u -p -r1.22 break-interp.exp --- gdb/testsuite/gdb.base/break-interp.exp 11 Oct 2010 08:47:47 -0000 1.22 +++ gdb/testsuite/gdb.base/break-interp.exp 12 Oct 2010 13:38:57 -0000 @@ -442,14 +442,23 @@ proc test_ld {file ifmain trynosym displ 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 set test "info files" set entrynohex "" - gdb_test_multiple $test $test { - -re "\r\n\[\t \]*Entry point:\[\t \]*0x(\[0-9a-f\]+)\r\n.*$gdb_prompt $" { + send_gdb "$test\n" + gdb_expect { + -re "\r\n\[\t \]*Entry point:\[\t \]*0x(\[0-9a-f\]+)\r\n" { set entrynohex $expect_out(1,string) - pass $test + gdb_expect { + -re "$gdb_prompt $" { pass $test } + timeout { fail "$test (timeout)" } + } } + -re ".*$gdb_prompt $" { fail $test } + timeout { fail "$test (timeout)" } } + # `info sym' cannot be tested for .opd as the binary may not have # symbols. if {[istarget powerpc64-*] && [is_lp64_target]} { -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com