From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25896 invoked by alias); 2 Aug 2011 09:07:53 -0000 Received: (qmail 25887 invoked by uid 22791); 2 Aug 2011 09:07:53 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Aug 2011 09:07:36 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7297ZZC012241 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Aug 2011 05:07:35 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7297W2V002309; Tue, 2 Aug 2011 05:07:33 -0400 From: Phil Muldoon To: Matt Rice Cc: gdb-patches@sourceware.org Subject: Re: [patch] python prompt additions at first prompt. References: Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Tue, 02 Aug 2011 09:07:00 -0000 In-Reply-To: (Matt Rice's message of "Mon, 1 Aug 2011 10:43:51 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-08/txt/msg00026.txt.bz2 Matt Rice writes: > On Mon, Aug 1, 2011 at 7:13 AM, Phil Muldoon wrote: > Think it was the quoting of $gdb_prompt which had me foiled. > > 2011-08-01 Matt Rice > > * gdb.python/py-prompt.exp: New file. Thanks. > +++ b/gdb/testsuite/gdb.python/py-prompt.exp > @@ -0,0 +1,60 @@ > +# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. > + This is a new file, so we just need 2011. Also, the other prompt tests are in python.exp, so this standalone test is kind of an anomaly. What do you think about combining the python.exp prompt tests into this test file? If you think that is ok, then you can just submit another consolidation patch after this one has been approved and checked in. > +set GDBFLAGS [concat $GDBFLAGS " -ex \"python def foo(x): return \'(Foo) \'\""] > +set GDBFLAGS [concat $GDBFLAGS " -ex \"python gdb.prompt_hook = foo\""] > + > +set tmp_gdbflags $GDBFLAGS > +set saved_gdb_prompt $gdb_prompt > + > +global gdb_prompt > +set gdb_prompt "\[(\]Foo\[)\]" > + > + > +# The following tests are strange in that we are testing the first prompt > +# gdb_start will fail/timeout if does not receive the '(foo) ' prompt. > +# otherwise no 'passing' test is performed. > +set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing on\""] > +gdb_start > +gdb_exit While this does test the prompt at startup, without a PASS/FAIL how can we track if it has regressed? I think it will just timeout, which is not optimal. If Tom (or any other maintainer) is ok with it, I guess I am too. If there is a method to utilise a formal PASS/FAIL into the test I would prefer that. Thanks again for doing this. Cheers Phil