From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63107 invoked by alias); 15 May 2015 17:04:16 -0000 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 Received: (qmail 63080 invoked by uid 89); 15 May 2015 17:04:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-oi0-f46.google.com Received: from mail-oi0-f46.google.com (HELO mail-oi0-f46.google.com) (209.85.218.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 15 May 2015 17:04:13 +0000 Received: by oign205 with SMTP id n205so86949530oig.2 for ; Fri, 15 May 2015 10:04:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=GfJAXbTJyNdZpy5QiPVhn/FGjbaCNF4IjFX7tO8NZ9Y=; b=QOi/JojQ9+lHhMyXx40J9PU6f1RzIl/DBhc4ycRJczUp9UV4t91iF6zNjmMkJKTTiv OjGFKl4SESq2sagsqCHo58CPgpAPncrif9ezHh6013RbnN8CiCcGtxkA1Jt5vf2lZ+c7 NVdblRXBmv/jcPzeUBhg+aPm6STi/8kJ5Y9f8QW9I0gMrqWq71z5p5StfVVDyYhqhrIb 9ntc4h8iisl3nSf2t+zEvtCAiAiuAgJEg6LGZN8s+xIj+2BrX/oTx+3MPRyplgj+x6E4 MvaUFtn5dgruQX3fVEArWYLcpw1n6B50k6QYXWuhHIHbCdxdpw3RxJZPSyjEa82gs9Z5 JBTQ== X-Gm-Message-State: ALoCoQkESpTvrNuu/UaIeLm5OkV0AJgY3fMhmB3A+ET3sQXj7Y7y9ed6IAZ+yql/YSVIf4QQCFzX X-Received: by 10.182.42.131 with SMTP id o3mr9252809obl.59.1431709451371; Fri, 15 May 2015 10:04:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.243.232 with HTTP; Fri, 15 May 2015 10:03:50 -0700 (PDT) In-Reply-To: <55561958.2030105@redhat.com> References: <1431523782-20409-1-git-send-email-patrick@parcs.ath.cx> <55561958.2030105@redhat.com> From: Patrick Palka Date: Fri, 15 May 2015 17:04:00 -0000 Message-ID: Subject: Re: [PATCH] [COMMITTED] Fix PR gdb/17820 To: Pedro Alves Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-05/txt/msg00401.txt.bz2 On Fri, May 15, 2015 at 12:05 PM, Pedro Alves wrote: > Hi Patrick, > > I noticed that the buildbots are showing that this new test is failing: > > https://sourceware.org/ml/gdb-testers/2015-q2/msg04164.html > > ~~~ > ============================ > new FAIL: gdb.base/gdbinit-history.exp: show commands <<2>> > new FAIL: gdb.base/gdbinit-history.exp: show history size > new FAIL: gdb.base/gdbinit-history.exp: show history size <<2>> > ~~~ > > Logs at: > > http://gdb-build.sergiodj.net/cgit/Fedora-x86_64-m64/.git/tree/?h=master&id=aa0e3e6cdb70d805ec9a3c689861d936ab9c5c90 > > (follow the "plain" link on the right right) > > Then I noticed that the test is also failing on my > machine (F20). :-) I went ahead and wrote a fix. What do > you think? Interesting. I obviously did not encounter this failure even though I too have HISTSIZE set (in my local rc file however). > > ------- > From d75f038583bfa6265253e389c1012dc29eabd208 Mon Sep 17 00:00:00 2001 > From: Pedro Alves > Date: Fri, 15 May 2015 16:47:23 +0100 > Subject: [PATCH] Fix gdb.base/gdbinit-history.exp when HISTSIZE is set in the > environment > > Some buildslaves are showing that this test is failing. E.g.,: > > https://sourceware.org/ml/gdb-testers/2015-q2/msg04164.html > > The issue is that HISTSIZE is set to 1000 in the environment that runs > the tests (that's the default in Fedora, set in /etc/profile). > > We can trivially reproduce it with: > > $ HISTSIZE=1000 make check RUNTESTFLAGS="gdbinit-history.exp" > (...) > Running /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/gdbinit-history.exp ... > FAIL: gdb.base/gdbinit-history.exp: show history size > FAIL: gdb.base/gdbinit-history.exp: show history size > FAIL: gdb.base/gdbinit-history.exp: show commands > > gdb.log shows: > ... > (gdb) set height 0 > (gdb) set width 0 > (gdb) show history size > The size of the command history is 1000. > (gdb) FAIL: gdb.base/gdbinit-history.exp: show history size > > gdb/testsuite/ChangeLog: > 2015-05-15 Pedro Alves > > * gdb.base/gdbinit-history.exp (test_gdbinit_history_setting): > Unset HISTSIZE in the environment while testing and restore > afterwards. > --- > gdb/testsuite/gdb.base/gdbinit-history.exp | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp > index 474680a..7513934 100644 > --- a/gdb/testsuite/gdb.base/gdbinit-history.exp > +++ b/gdb/testsuite/gdb.base/gdbinit-history.exp > @@ -29,6 +29,17 @@ proc test_gdbinit_history_setting { home size } { > > set old_home $env(HOME) > set env(HOME) "$srcdir/$subdir/$home" > + > + # The HISTSIZE environment variable takes precedence over whatever > + # history size is set in .gdbinit. Make sure the former is not > + # set. > + set have_old_histsize 0 > + if [info exists env(HISTSIZE)] { > + set old_histsize $env(HISTSIZE) > + unset env(HISTSIZE) > + set have_old_histsize 1 > + } > + > set saved_internal_gdbflags $INTERNAL_GDBFLAGS > set INTERNAL_GDBFLAGS [string map {"-nx" ""} $INTERNAL_GDBFLAGS] > > @@ -44,6 +55,11 @@ proc test_gdbinit_history_setting { home size } { > } > > set INTERNAL_GDBFLAGS $saved_internal_gdbflags > + > + if {$have_old_histsize} { > + set env(HISTSIZE) $old_histsize > + } Why not change this predicate to if [info exists old_histsize] to obviate the need for $have_old_histsize altogether? > + > set $env(HOME) $old_home > } > > -- > 1.9.3 > >