From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12027 invoked by alias); 2 Oct 2009 13:58:09 -0000 Received: (qmail 12017 invoked by uid 22791); 2 Oct 2009 13:58:08 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Oct 2009 13:58:03 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n92DvxcP034932 for ; Fri, 2 Oct 2009 15:57:59 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n92Dvx4N057755 for ; Fri, 2 Oct 2009 15:57:59 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n92Dvxrg092308 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 2 Oct 2009 15:57:59 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: Subject: [RFA] Testsuite: Change match_max for current also Date: Fri, 02 Oct 2009 13:58:00 -0000 Message-ID: <00a301ca4368$63c22c90$2b4685b0$@u-strasbg.fr> 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: 2009-10/txt/msg00054.txt.bz2 I got several "internal buffer full" errors in the results of the testsuite, especially on gcc16. I finally discovered that the expect command match_max is made for that: change the size of the internal buffer used for pattern matching. In lib/gdb.exp, I found this: match_max -d 30000 But then, in several other tests (gdb.base/annota1.exp, gdb.base/annota3.exp and gdb.base/maint.exp), that said that they wanted to increase the size of the buffer, but used smaller values than the 30000 above... I was lost :( In annota1.exp, I found that: verbose "match_max local is: [match_max]" verbose "match_max default is: [match_max -d]" # This is necessary because a 2000 buffer is not enought to get everything # up to the prompt ad the test gets a timeout. match_max 3000 verbose "match_max now is: [match_max]" Running annota1.exp with -v option in RUNTESTFLAGS, I discovered that the local value of match_max still was the expect default of 2000... After digging into the expect sources, I found out that using match_max -d 3000 changes the default value, but only for later started jobs, meaning that it does not change the current value. Adding 'match_max [match_max -d]' right after 'match_max -d 30000' did fix the problem! This removes a "internal buffer full" ERROR in gcc16 testsuite on gdb.server/ext-run.exp: get process list Is this OK? Pierre Muller PS1: If this is approved, we should also consider what to do about the three tests that set another value of match_max (lower than the 30000). PS2: calling 'match_max -d 30000' several times is a waste of time, as long as nothing changes that default value in any of the tests, should it rather be extracted out of default_gdb_init, so that it get executed only once? gdb/testsuite/ChangeLog entry: 2009-10-02 Pierre Muller * lib/gdb.exp (default_gdb_init): Set current value of match_max to default. Index: src/gdb/testsuite/lib/gdb.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v retrieving revision 1.119 diff -u -F^proc -r1.119 gdb.exp --- src/gdb/testsuite/lib/gdb.exp 13 Jul 2009 19:24:18 -0000 1.119 +++ src/gdb/testsuite/lib/gdb.exp 2 Oct 2009 13:28:57 -0000 @@ -2326,6 +2326,8 @@ proc default_gdb_init { args } { # a very large amount of output. We therefore increase the expect # buffer size to be able to contain the entire test output. match_max -d 30000 + # Also set this value for the currently running GDB. + match_max [match_max -d] # We want to add the name of the TCL testcase to the PASS/FAIL messages. if { [llength $args] > 0 } {