From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87004 invoked by alias); 24 Jul 2015 20:51:20 -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 86994 invoked by uid 89); 24 Jul 2015 20:51:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ausc60pc101.us.dell.com Received: from ausc60pc101.us.dell.com (HELO ausc60pc101.us.dell.com) (143.166.85.206) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 24 Jul 2015 20:51:18 +0000 X-LoopCount0: from 10.170.28.39 From: To: CC: , , Subject: Re: [PATCH] Make sure GDB uses a valid shell when starting the inferior and to perform the "shell" command Date: Fri, 24 Jul 2015 20:51:00 -0000 Message-ID: <6E0AD60C-689F-4958-964D-FD560FE77C06@dell.com> References: <1437761993-18758-1-git-send-email-sergiodj@redhat.com> <55B2850D.6030306@ericsson.com> <87k2tp5q3g.fsf@redhat.com> <838ua52wmp.fsf@gnu.org> <87fv4d5p8l.fsf@redhat.com> <837fpp2uz5.fsf@gnu.org> <94F6A309-A197-4A71-BEB9-42E009DD1EB5@dell.com> <55B2A24B.8000209@ericsson.com> In-Reply-To: <55B2A24B.8000209@ericsson.com> Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00732.txt.bz2 DQo+IE9uIEp1bCAyNCwgMjAxNSwgYXQgNDozOCBQTSwgU2ltb24gTWFyY2hp IDxzaW1vbi5tYXJjaGlAZXJpY3Nzb24uY29tPiB3cm90ZToNCj4gDQo+IE9u IDE1LTA3LTI0IDA0OjI1IFBNLCBQYXVsX0tvbmluZ0BEZWxsLmNvbSB3cm90 ZToNCj4+IEJ1dCBpZiB5b3Ugb21pdCBhIHNoZWxsLCBpcyB0aGUgdXNlciBv ZiB0aGF0IHNoZWxsIGJsb2NrZWQgZnJvbSB1c2luZyBnZGI/ICBUaGF04oCZ cyBub3QgYSBnb29kIGZhaWx1cmUgbW9kZS4gIEl0IHNlZW1zIHRvIG1lIHRo YXQgb21pdHRpbmcgYSBub24tc2hlbGwgaXMgbXVjaCBtb3JlIGZvcmdpdmlu ZzogYWxsIHRoYXQgaGFwcGVucyBpcyB0aGF0IHlvdSBkb27igJl0IGdldCB0 aGUgZnJpZW5kbHkgZXJyb3IgbWVzc2FnZS4NCj4+IA0KPj4gU28gdGhhdCBz YXlzIHRoZSBleHBsaWNpdCBsaXN0IHNob3VsZCBiZSBvZiBub24tc2hlbGxz Lg0KPj4gDQo+PiAJcGF1bA0KPiANCj4gV2l0aCBFbGkncyBzdWdnZXN0aW9u LCBpZiBTSEVMTCBpcyB2YWxpZCBidXQgZ2RiIGRvZXNuJ3Qga25vdyBhYm91 dCBpdCAoZS5nLg0KPiBTSEVMTD0vbXkvc3VwZXIvZHVwZXIvc2hlbGwpLCBp dCB3aWxsIGZhbGwgYmFjayB0byB1c2luZyAvYmluL3NoLiAgU28gbm8sDQo+ IHRoZSB1c2VyIHdvdWxkbid0IGJlIGJsb2NrZWQuDQo+IA0KPiANCk5vdCB1 bmxlc3MgdGhlIGZlYXR1cmVzIGluIHRoYXQgdW5rbm93biBzaGVsbCBhcmUg bmVlZGVkIGZvciB0aGUgYXBwbGljYXRpb24gdG8gZnVuY3Rpb24gY29ycmVj dGx5Lg0KDQoJcGF1bA0K >From gdb-patches-return-124662-listarch-gdb-patches=sources.redhat.com@sourceware.org Fri Jul 24 21:13:28 2015 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 104421 invoked by alias); 24 Jul 2015 21:13:28 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 104411 invoked by uid 89); 24 Jul 2015 21:13:28 -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,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; Fri, 24 Jul 2015 21:13:17 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id B281118DF60 for ; Fri, 24 Jul 2015 21:13:16 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-51.yyz.redhat.com [10.15.17.51]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6OLDG5W013027; Fri, 24 Jul 2015 17:13:16 -0400 From: Sergio Durigan Junior To: GDB Patches Cc: Sergio Durigan Junior Subject: [PATCH] Uniquify test names from gdb.python/{py-objfile.exp,py-pp-registration.exp} Date: Fri, 24 Jul 2015 21:13:00 -0000 Message-Id: <1437772393-6739-1-git-send-email-sergiodj@redhat.com> X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00733.txt.bz2 Content-length: 4628 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: 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