From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39476 invoked by alias); 28 Jul 2015 21:40:31 -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 39464 invoked by uid 89); 28 Jul 2015 21:40:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham 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; Tue, 28 Jul 2015 21:40:29 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 85F8A93865 for ; Tue, 28 Jul 2015 21:40:28 +0000 (UTC) Received: from localhost (unused-10-15-17-51.yyz.redhat.com [10.15.17.51]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6SLeRSb027134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 28 Jul 2015 17:40:28 -0400 From: Sergio Durigan Junior To: GDB Patches Subject: Re: [PATCH] Uniquify test names from gdb.python/{py-objfile.exp,py-pp-registration.exp} References: <1437772393-6739-1-git-send-email-sergiodj@redhat.com> X-URL: http://blog.sergiodj.net Date: Tue, 28 Jul 2015 21:40:00 -0000 In-Reply-To: <1437772393-6739-1-git-send-email-sergiodj@redhat.com> (Sergio Durigan Junior's message of "Fri, 24 Jul 2015 17:13:13 -0400") Message-ID: <871tfsq7uc.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00843.txt.bz2 On Friday, July 24 2015, I wrote: > While running some regression tests, I noticed that the two Python > tests mentioned in the $SUBJECT contain non-unique names. This is a > violation of our guidelines: > > I went ahead and pushed this: Let me know if there is any problem. > And also makes things harder for BuildBot. So I hacked both testcases > and made every test name unique. I guess this could be considered an > obvious patch, but I decided to post it before pushing because others > may have different opinions about the names. > > OK to apply? > > gdb/testsuite/ChangeLog: > 2015-07-24 Sergio Durigan Junior > > * gdb.python/py-objfile.exp: Make some tests have unique names. > * gdb.python/py-pp-registration.exp: Likewise. > --- > gdb/testsuite/gdb.python/py-objfile.exp | 15 +++++++++------ > gdb/testsuite/gdb.python/py-pp-registration.exp | 11 ++++++++--- > 2 files changed, 17 insertions(+), 9 deletions(-) > > diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp > index 4de20c5..7dd094c 100644 > --- a/gdb/testsuite/gdb.python/py-objfile.exp > +++ b/gdb/testsuite/gdb.python/py-objfile.exp > @@ -46,7 +46,7 @@ gdb_test "python print (objfile.username)" "${testfile}" \ > "Get objfile user name" > > gdb_test "python print (gdb.lookup_objfile (\"${testfile}\").filename)" \ > - "${testfile}" > + "${testfile}" "print lookup_objfile filename" > gdb_test "python print (gdb.lookup_objfile (\"junk\"))" \ > "Objfile not found\\.\r\n${python_error_text}" > > @@ -56,7 +56,7 @@ if [string compare $binfile_build_id ""] { > gdb_test "python print (objfile.build_id)" "$binfile_build_id" \ > "Get objfile build id" > gdb_test "python print (gdb.lookup_objfile (\"$binfile_build_id\", by_build_id=True).filename)" \ > - "${testfile}" > + "${testfile}" "print lookup_objfile filename by build-id" > } else { > unsupported "build-id is not supported by the compiler" > } > @@ -64,9 +64,11 @@ if [string compare $binfile_build_id ""] { > # Other lookup_objfile_by_build_id tests we can do, even if compiler doesn't > # support them. > gdb_test "python print (gdb.lookup_objfile (\"foo\", by_build_id=True))" \ > - "Not a valid build id\\.\r\n${python_error_text}" > + "Not a valid build id\\.\r\n${python_error_text}" \ > + "print invalid file lookup_objfile by build-id" > gdb_test "python print (gdb.lookup_objfile (\"1234abcdef\", by_build_id=True))" \ > - "Objfile not found\\.\r\n${python_error_text}" > + "Objfile not found\\.\r\n${python_error_text}" \ > + "print invalid file lookup_objfile by build-id 2" > > gdb_test "python print (objfile.progspace)" "" \ > "Get objfile program space" > @@ -104,7 +106,7 @@ if ![runto_main] { > return 0 > } > > -gdb_py_test_silent_cmd "python objfile = gdb.objfiles()\[0\]" \ > +gdb_py_test_silent_cmd "python objfile = gdb.s()\[0\]" \ > "Get no-debug objfile file" 1 > > gdb_test "python print (objfile.owner)" "None" \ > @@ -131,7 +133,8 @@ gdb_test "p main" "= {int \\(\\)} $hex
" \ > # Separate debug files are not findable. > if { [get_python_valueof "sep_objfile.build_id" "None"] != "None" } { > gdb_test "python print (gdb.lookup_objfile (sep_objfile.build_id, by_build_id=True))" \ > - "Objfile not found\\.\r\n${python_error_text}" > + "Objfile not found\\.\r\n${python_error_text}" \ > + "print lookup_objfile of separate debug file" > } > > # An objfile that was a symlink to a differently named file is still > diff --git a/gdb/testsuite/gdb.python/py-pp-registration.exp b/gdb/testsuite/gdb.python/py-pp-registration.exp > index 2193407..60f3436 100644 > --- a/gdb/testsuite/gdb.python/py-pp-registration.exp > +++ b/gdb/testsuite/gdb.python/py-pp-registration.exp > @@ -46,7 +46,8 @@ proc prepare_test { } { > return 0 > } > > - gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" > + gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \ > + "read file" > > gdb_test_no_output "py progspace = gdb.current_progspace()" > gdb_test_no_output "py my_pretty_printer1 = build_pretty_printer1()" > @@ -108,9 +109,13 @@ with_test_prefix "replace" { > gdb_test "py gdb.printing.register_pretty_printer(progspace, my_pretty_printer2, replace=False)" \ > "RuntimeError: pretty-printer already registered: pp-test\r\nError while executing Python code." > > - test_printers "s1" > + with_test_prefix "test printers 1" { > + test_printers "s1" > + } > > gdb_test_no_output "py gdb.printing.register_pretty_printer(progspace, my_pretty_printer2, replace=True)" > > - test_printers "s2" > + with_test_prefix "test printers 2" { > + test_printers "s2" > + } > } > -- > 2.4.3 -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/