From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7785 invoked by alias); 12 Jul 2009 09:52:42 -0000 Received: (qmail 7775 invoked by uid 22791); 12 Jul 2009 09:52:41 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jul 2009 09:52:34 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6C9qWa6001333 for ; Sun, 12 Jul 2009 05:52:32 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6C9qVc4005850 for ; Sun, 12 Jul 2009 05:52:32 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6C9qUvt005837 for ; Sun, 12 Jul 2009 05:52:31 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n6C9qTZU021270 for ; Sun, 12 Jul 2009 11:52:30 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n6C9qRxc021259 for gdb-patches@sourceware.org; Sun, 12 Jul 2009 11:52:27 +0200 Date: Sun, 12 Jul 2009 14:26:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Fix gdb.base/macscp.exp when using custom inputrc Message-ID: <20090712095227.GA20069@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) 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: 2009-07/txt/msg00342.txt.bz2 Hi, patch fixes FAIL: gdb.base/macscp.exp: (timeout) complete 'p TWENTY_' 2 FAIL: gdb.base/macscp.exp: (timeout) complete 'p FORTY_' 2 FAIL: gdb.base/macscp.exp: (timeout) complete 'p TWENTY_THREE' 2 FAIL: gdb.base/macscp.exp: basic macro splicing which takes 183 seconds due to ==> $HOME/.inputrc <== set bell-style none Another possibility would be to add the forgotten `set env(INPUTRC)' just to gdb.base/macscp.exp . Regression tested on {x86_64,x86_64-32,i686}-fedora11-linux-gnu. Thanks, Jan gdb/testsuite/ 2009-07-12 Jan Kratochvil Fix gdb.base/macscp.exp when using custom inputrc. * gdb.base/completion.exp: Remove env(INPUTRC) set and restore. * gdb.base/readline.exp: Remove env(INPUTRC) set and restore. Remove env(TERM) set. * gdb.cp/cpcompletion.exp: Remove env(INPUTRC) set. * lib/gdb.exp (default_gdb_start): Add env(INPUTRC) and env(TERM) set. --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -85,18 +85,6 @@ if [get_compiler_info ${binfile}] { gdb_exit -# 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. -global env -if [info exists env(INPUTRC)] { - set old_inputrc $env(INPUTRC) -} -set env(INPUTRC) "/dev/null" - gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} @@ -863,11 +851,6 @@ gdb_expect { } # Restore globals modified in this test... -if [info exists old_inputrc] { - set env(INPUTRC) $old_inputrc -} else { - unset env(INPUTRC) -} set timeout $oldtimeout1 return 0 --- a/gdb/testsuite/gdb.base/readline.exp +++ b/gdb/testsuite/gdb.base/readline.exp @@ -146,26 +146,6 @@ if $tracelevel { strace $tracelevel } -# 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. -global env -if [info exists env(INPUTRC)] { - set old_inputrc $env(INPUTRC) -} -set env(INPUTRC) "/dev/null" - -# The 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. -if [info exists env(TERM)] { - set old_term $env(TERM) -} -set env(TERM) "vt100" - gdb_start gdb_reinitialize_dir $srcdir/$subdir @@ -221,11 +201,6 @@ operate_and_get_next "Simple operate-and-get-next" \ # Restore globals modified in this test... -if [info exists old_inputrc] { - set env(INPUTRC) $old_inputrc -} else { - unset env(INPUTRC) -} if [info exists old_gdbhistfile] { set env(GDBHISTFILE) $old_gdbhistfile } else { --- a/gdb/testsuite/gdb.cp/cpcompletion.exp +++ b/gdb/testsuite/gdb.cp/cpcompletion.exp @@ -36,18 +36,6 @@ if {[gdb_compile "${testfile}.o" ${binfile} executable {c++ debug}] != "" } { gdb_exit -# 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. -global env -if [info exists env(INPUTRC)] { - set old_inputrc $env(INPUTRC) -} -set env(INPUTRC) "/dev/null" - gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1172,6 +1172,19 @@ proc default_gdb_start { } { 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] {