From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22409 invoked by alias); 25 Mar 2011 13:16:01 -0000 Received: (qmail 22396 invoked by uid 22791); 25 Mar 2011 13:16:00 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mms2.broadcom.com (HELO mms2.broadcom.com) (216.31.210.18) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Mar 2011 13:15:56 +0000 Received: from [10.9.200.133] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Fri, 25 Mar 2011 06:18:24 -0700 X-Server-Uuid: D3C04415-6FA8-4F2C-93C1-920E106A2031 Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB02.corp.ad.broadcom.com (10.9.200.133) with Microsoft SMTP Server id 8.2.247.2; Fri, 25 Mar 2011 06:15:42 -0700 Received: from [10.177.69.119] (unknown [10.177.69.119]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 02C6674D03 for ; Fri, 25 Mar 2011 06:15:44 -0700 (PDT) Message-ID: <4D8C9580.3050302@broadcom.com> Date: Fri, 25 Mar 2011 15:46:00 -0000 From: "Andrew Burgess" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] Clear GREP_OPTIONS environment variable. References: <4D807468.8020703@broadcom.com> <20110316161435.GR31264@adacore.com> <4D81D03A.4090200@broadcom.com> In-Reply-To: <4D81D03A.4090200@broadcom.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit 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: 2011-03/txt/msg01093.txt.bz2 On 17/03/2011 09:11, Andrew Burgess wrote: > > gdb/testsuite/ChangeLog > > 2011-03-15 Andrew Burgess > > * lib/gdb.exp (default_gdb_start,gdb_init): Clear the GREP_OPTIONS > environment variable to make grep output more predictable. Move > all the environment setup into gdb_init so it's done once per test > case rather than each time we start gdb. I committed the second version of this patch with a tiny modification, removing the "global env" line from default_gdb_start as it's no longer needed. No test regressions here. Cheers, Andrew Patch as committed: Index: ./gdb/testsuite/lib/gdb.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v retrieving revision 1.168 retrieving revision 1.169 diff -u -p -r1.168 -r1.169 --- ./gdb/testsuite/lib/gdb.exp 15 Mar 2011 16:41:42 -0000 1.168 +++ ./gdb/testsuite/lib/gdb.exp 25 Mar 2011 13:08:11 -0000 1.169 @@ -1311,25 +1311,9 @@ proc default_gdb_start { } { global gdb_prompt global timeout global gdb_spawn_id; - global env gdb_stop_suppressing_tests; - set env(LC_CTYPE) C - - # Don't let a .inputrc file or an existing setting of INPUTRC mess up - # the test results. Even if /dev/null doesn't exist on the particular - # platform, the readline library will use the default setting just by - # failing to open the file. OTOH, opening /dev/null successfully will - # also result in the default settings being used since nothing will be - # read from this file. - set env(INPUTRC) "/dev/null" - - # The gdb.base/readline.exp arrow key test relies on the standard VT100 - # bindings, so make sure that an appropriate terminal is selected. - # The same bug doesn't show up if we use ^P / ^N instead. - set env(TERM) "vt100" - verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS" if [info exists gdb_spawn_id] { @@ -2796,11 +2780,30 @@ proc gdb_init { args } { set banned_variables_traced 1 } - # We set LC_ALL and LANG to C so that we get the same messages as - # expected. + # We set LC_ALL, LC_CTYPE, and LANG to C so that we get the same + # messages as expected. setenv LC_ALL C + setenv LC_CTYPE C setenv LANG C + # Don't let a .inputrc file or an existing setting of INPUTRC mess up + # the test results. Even if /dev/null doesn't exist on the particular + # platform, the readline library will use the default setting just by + # failing to open the file. OTOH, opening /dev/null successfully will + # also result in the default settings being used since nothing will be + # read from this file. + setenv INPUTRC "/dev/null" + + # The gdb.base/readline.exp arrow key test relies on the standard VT100 + # bindings, so make sure that an appropriate terminal is selected. + # The same bug doesn't show up if we use ^P / ^N instead. + setenv TERM "vt100" + + # Some tests (for example gdb.base/maint.exp) shell out from gdb to use + # grep. Clear GREP_OPTIONS to make the behavoiur predictable, + # especially having color output turned on can cause tests to fail. + setenv GREP_OPTIONS "" + return [eval default_gdb_init $args]; }