From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16854 invoked by alias); 17 Sep 2014 17:33:38 -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 16841 invoked by uid 89); 17 Sep 2014 17:33:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_50,KAM_STOCKGEN,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 17 Sep 2014 17:33:35 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8HHXUHI025746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Sep 2014 13:33:30 -0400 Received: from localhost (dhcp-10-15-16-169.yyz.redhat.com [10.15.16.169]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8HHXUcF032110 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 17 Sep 2014 13:33:30 -0400 From: Sergio Durigan Junior To: Yao Qi Cc: Subject: Re: [PATCH 1/3] Clean up gdb.python/ tests References: <1410956225-12592-1-git-send-email-yao@codesourcery.com> <1410956225-12592-2-git-send-email-yao@codesourcery.com> X-URL: http://www.redhat.com Date: Wed, 17 Sep 2014 17:33:00 -0000 In-Reply-To: <1410956225-12592-2-git-send-email-yao@codesourcery.com> (Yao Qi's message of "Wed, 17 Sep 2014 20:17:03 +0800") Message-ID: <87bnqem9sm.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00592.txt.bz2 On Wednesday, September 17 2014, Yao Qi wrote: > This patch is to clean up various gdb.python/*.exp tests, such as > removing trailing ".*" from the pattern and fix one typo I find during > reading the code. > > gdb/testsuite: > > 2014-09-17 Yao Qi > > * gdb.python/python.exp: Remove trailing ".*". Fix typo > locationn. > * gdb.python/py-symbol.exp: Remove trailing ".*" in the > pattern. > * gdb.python/py-symtab.exp: Likewise. Thanks for the cleanup, Yao. This patch seems pretty much OK to me, although I like it when the files in the ChangeLog entry are mentioned in the same order as they appear on the diff :-). Cheers, > --- > gdb/testsuite/gdb.python/py-symbol.exp | 2 +- > gdb/testsuite/gdb.python/py-symtab.exp | 6 +++--- > gdb/testsuite/gdb.python/python.exp | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp > index 9b6ba2e..eadbcad 100644 > --- a/gdb/testsuite/gdb.python/py-symbol.exp > +++ b/gdb/testsuite/gdb.python/py-symbol.exp > @@ -117,7 +117,7 @@ gdb_test "python print (t\[0\].addr_class == gdb.SYMBOL_LOC_CONST)" "True" "Test > gdb_test "python print (t\[0\].type)" "enum tag" "Get type" > > # Test symtab attribute. > -gdb_test "python print (t\[0\].symtab)" "gdb.python/py-symbol.c.*" "Get symtab" > +gdb_test "python print (t\[0\].symtab)" "gdb.python/py-symbol.c" "Get symtab" > > # C++ tests > # Recompile binary. > diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp > index e6ac9c3..d8f7d48 100644 > --- a/gdb/testsuite/gdb.python/py-symtab.exp > +++ b/gdb/testsuite/gdb.python/py-symtab.exp > @@ -50,16 +50,16 @@ gdb_py_test_silent_cmd "step" "Step to the next line" 0 > gdb_py_test_silent_cmd "python new_pc = gdb.selected_frame().find_sal().pc" "Get new PC" 0 > > # Test sal. > -gdb_test "python print (sal.symtab)" ".*gdb.python/py-symbol.c.*" "Test symtab" > +gdb_test "python print (sal.symtab)" ".*gdb.python/py-symbol.c" "Test symtab" > gdb_test "python print (sal.pc)" "${decimal}" "Test sal.pc" > gdb_test "python print (sal.last == (new_pc - 1))" "True" "Test sal.last" > gdb_test "python print (sal.line)" "$line_no" "Test sal.line" > gdb_test "python print (sal.is_valid())" "True" "Test sal.is_valid" > > # Test symbol table. > -gdb_test "python print (symtab.filename)" ".*gdb.python/py-symbol.c.*" "Test symtab.filename" > +gdb_test "python print (symtab.filename)" ".*gdb.python/py-symbol.c" "Test symtab.filename" > gdb_test "python print (symtab.objfile)" "" "Test symtab.objfile" > -gdb_test "python print (symtab.fullname())" "testsuite/gdb.python/py-symbol.c.*" "Test symtab.fullname" > +gdb_test "python print (symtab.fullname())" "testsuite/gdb.python/py-symbol.c" "Test symtab.fullname" > gdb_test "python print (symtab.is_valid())" "True" "Test symtab.is_valid()" > gdb_test "python print (\"qq\" in global_symbols)" "True" "Test qq in global symbols" > gdb_test "python print (\"func\" in global_symbols)" "True" "Test func in global symbols" > diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp > index 49f6e88..748700b 100644 > --- a/gdb/testsuite/gdb.python/python.exp > +++ b/gdb/testsuite/gdb.python/python.exp > @@ -189,14 +189,14 @@ gdb_py_test_silent_cmd "python symtab = gdb.decode_line()" "test decode_line cur > gdb_test "python print (len(symtab))" "2" "Test decode_line current location" > gdb_test "python print (symtab\[0\])" "None" "Test decode_line expression parse" > gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line current location" > -gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/python.c.*" "Test decode_line current locationn filename" > +gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/python.c" "Test decode_line current location filename" > gdb_test "python print (symtab\[1\]\[0\].line)" "$lineno" "Test decode_line current location line number" > > gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"python.c:26 if foo\")" "test decode_line python.c:26" 1 > gdb_test "python print (len(symtab))" "2" "Test decode_line python.c:26 length" > gdb_test "python print (symtab\[0\])" "if foo" "Test decode_line expression parse" > gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line python.c:26 length" > -gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/python.c.*" "Test decode_line python.c:26 filename" > +gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/python.c" "Test decode_line python.c:26 filename" > gdb_test "python print (symtab\[1\]\[0\].line)" "26" "Test decode_line python.c:26 line number" > > gdb_test "python gdb.decode_line(\"randomfunc\")" \ > @@ -204,7 +204,7 @@ gdb_test "python gdb.decode_line(\"randomfunc\")" \ > gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"func1\")" "test decode_line func1()" 1 > gdb_test "python print (len(symtab))" "2" "Test decode_line func1 length" > gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line func1 length" > -gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/python-1.c.*" "Test decode_line func1 filename" > +gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/python-1.c" "Test decode_line func1 filename" > gdb_test "python print (symtab\[1\]\[0\].line)" "19" "Test decode_line func1 line number" > gdb_py_test_silent_cmd {python symtab = gdb.decode_line ("func1,func2")} \ > "test decode_line func1,func2" 1 > -- > 1.9.3 -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/