From patchwork Fri Jan 20 15:30:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 18966 Received: (qmail 128130 invoked by alias); 20 Jan 2017 15:30:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 126070 invoked by uid 89); 20 Jan 2017 15:30:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Jan 2017 15:30:43 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cUb9E-0005Uj-9k from Luis_Gustavo@mentor.com ; Fri, 20 Jan 2017 07:30:40 -0800 Received: from [172.30.9.36] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 20 Jan 2017 07:30:36 -0800 Reply-To: Luis Machado Subject: Re: [PATCH] Fix uppercase test names in gdb.python/py-xmethods.exp References: <1484923045-16703-1-git-send-email-lgustavo@codesourcery.com> To: Pedro Alves , From: Luis Machado Message-ID: <1ea54e93-2d77-e90c-5129-3a0a82301ab1@codesourcery.com> Date: Fri, 20 Jan 2017 09:30:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes On 01/20/2017 09:24 AM, Pedro Alves wrote: > On 01/20/2017 02:37 PM, Luis Machado wrote: >> Some leftover uppercase test names in py-xmethods.exp. The patch also >> replaces two "continue" calls with untested calls to make things a bit more >> clear. >> >> gdb/testsuite/ChangeLog: >> >> 2017-01-20 Luis Machado >> >> * gdb.python/py-xmethods.exp: Fix test names starting with lowercase >> and add untested calls. >> --- >> gdb/testsuite/gdb.python/py-xmethods.exp | 44 +++++++++++++++++--------------- >> 1 file changed, 24 insertions(+), 20 deletions(-) >> >> diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp >> index 8f5bf16..38b5998 100644 >> --- a/gdb/testsuite/gdb.python/py-xmethods.exp >> +++ b/gdb/testsuite/gdb.python/py-xmethods.exp >> @@ -18,7 +18,9 @@ >> >> load_lib gdb-python.exp >> >> -if { [skip_cplus_tests] } { continue } >> +if { [skip_cplus_tests] } { >> + untested "skipping C++ tests" >> +} > > We still need something that makes the test > actually be skipped. > Don't we? Oops. How about the following? From bed2ac369d21b4dd03d6a5cff1ab8dc432dd2ac9 Mon Sep 17 00:00:00 2001 From: Luis Machado Date: Wed, 18 Jan 2017 12:11:27 -0600 Subject: [PATCH] Fix uppercase test names in gdb.python/py-xmethods.exp Some leftover uppercase test names in py-xmethods.exp. The patch also replaces two "continue" calls with untested calls to make things a bit more clear. gdb/testsuite/ChangeLog: 2017-01-20 Luis Machado * gdb.python/py-xmethods.exp: Fix test names starting with lowercase and add untested calls. --- gdb/testsuite/gdb.python/py-xmethods.exp | 46 ++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp index 8f5bf16..dcd7191 100644 --- a/gdb/testsuite/gdb.python/py-xmethods.exp +++ b/gdb/testsuite/gdb.python/py-xmethods.exp @@ -18,7 +18,10 @@ load_lib gdb-python.exp -if { [skip_cplus_tests] } { continue } +if { [skip_cplus_tests] } { + untested "skipping C++ tests" + return +} standard_testfile py-xmethods.cc @@ -27,7 +30,10 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { } # Skip all tests if Python scripting is not enabled. -if { [skip_python_tests] } { continue } +if { [skip_python_tests] } { + untested "skipping Python tests" + return +} if ![runto_main] { return -1 @@ -54,7 +60,7 @@ gdb_test "p a_geta" ".* = 1" "before: a_geta 1" gdb_test "p ++a1" "No symbol.*" "before: ++a1" gdb_test "p a1.getarrayind(5)" "Couldn't find method.*" \ - "Before: a1.getarrayind(5)" + "before: a1.getarrayind(5)" gdb_test "p a_ptr->geta()" ".* = 60" "before: a_ptr->geta()" gdb_test "p b_geta" ".* = 1" "before: b_geta 1" @@ -68,19 +74,19 @@ gdb_test "p g.size_diff()" ".*" "before: call g.size_diff()" gdb_test "p g_size_diff" ".* = 2" "before: g_size_diff 2" gdb_test "p g.size_diff()" "Couldn't find method.*" \ - "Before: g.size_diff()" + "before: g.size_diff()" gdb_test "p g.size_mul<2>()" ".*" "before: g.size_mul<2>()" gdb_test "p g_size_mul" ".* = 2" "before: g_size_mul 2" gdb_test "p g.size_mul<5>()" "Couldn't find method.*" \ - "Before: g.size_mul<5>()" + "before: g.size_mul<5>()" gdb_test "p g.mul(2.0)" ".* = 10" "before: g.mul(2.0)" gdb_test "p g_mul" ".* = 2" "before: g_mul 2" gdb_test "p g.mul('a')" "Couldn't find method.*" \ - "Before: g.mul('a')" + "before: g.mul('a')" # Load the script which adds the debug methods. gdb_test_no_output "source ${xmethods_script}" "load the script file" @@ -99,7 +105,7 @@ gdb_test "p a_minus_a" ".* = 4" "after: a_minus_a 4" gdb_test "p a1.geta()" "From Python .*5" "after: a1.geta()" gdb_test "p ++a1" "From Python .*6" "after: ++a1" gdb_test "p a1.getarrayind(5)" "From Python .*5" \ - "After: a1.getarrayind(5)" + "after: a1.getarrayind(5)" gdb_test "P a1\[6\]" ".*int &.*6" "after a1\[\]" gdb_test "P b1\[7\]" ".*const int &.*7" "after b1\[\]" # Note the following test. Xmethods on dynamc types are not looked up @@ -110,40 +116,40 @@ gdb_test "p e.geta()" "From Python .*100" "after: e.geta()" gdb_test "p e_ptr->geta()" "From Python .*100" "after: e_ptr->geta()" gdb_test "p e_ref.geta()" "From Python .*100" "after: e_ref.geta()" gdb_test "p e.method(10)" "From Python .* = void" \ - "After: e.method(10)" + "after: e.method(10)" gdb_test "p e.method('a')" "From Python .* = void" \ - "After: e.method('a')" + "after: e.method('a')" gdb_test "p g.size_diff ()" "From Python G<>::size_diff.*" \ - "After: g.size_diff()" + "after: g.size_diff()" gdb_test "p g.size_diff< unsigned long >()" "From Python G<>::size_diff.*" \ - "After: g.size_diff()" + "after: g.size_diff()" gdb_test "p g.size_mul<2>()" "From Python G<>::size_mul.*" \ - "After: g.size_mul<2>()" + "after: g.size_mul<2>()" gdb_test "p g.size_mul< 5 >()" "From Python G<>::size_mul.*" \ - "After: g.size_mul< 5 >()" + "after: g.size_mul< 5 >()" gdb_test "p g.mul(2.0)" "From Python G<>::mul.*" \ - "After: g.mul(2.0)" + "after: g.mul(2.0)" gdb_test "p g.mul('a')" "From Python G<>::mul.*" \ gdb_test "p g_ptr->mul('a')" "From Python G<>::mul.*" \ "after: g_ptr->mul('a')" # Tests for 'disable/enable xmethod' command. gdb_test_no_output "disable xmethod progspace G_methods" \ - "Disable G_methods" + "disable G_methods" gdb_test "p g.mul('a')" "Couldn't find method.*" \ "g.mul('a') after disabling G_methods" gdb_test_no_output "enable xmethod progspace G_methods" \ - "Enable G_methods" + "dnable G_methods" gdb_test "p g.mul('a')" "From Python G<>::mul.*" \ - "After enabling G_methods" + "after enabling G_methods" gdb_test_no_output "disable xmethod progspace G_methods;mul" \ - "Disable G_methods;mul" + "disable G_methods;mul" gdb_test "p g.mul('a')" "Couldn't find method.*" \ "g.mul('a') after disabling G_methods;mul" gdb_test_no_output "enable xmethod progspace G_methods;mul" \ - "Enable G_methods;mul" + "enable G_methods;mul" gdb_test "p g.mul('a')" "From Python G<>::mul.*" \ - "After enabling G_methods;mul" + "after enabling G_methods;mul" # Test for 'info xmethods' command gdb_test "info xmethod global plus" "global.*plus_plus_A" \ -- 2.7.4