From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5846 invoked by alias); 24 Oct 2012 07:43:18 -0000 Received: (qmail 5836 invoked by uid 22791); 24 Oct 2012 07:43:17 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Oct 2012 07:43:13 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TQvcM-0003Fj-Sn from Yao_Qi@mentor.com ; Wed, 24 Oct 2012 00:43:10 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 24 Oct 2012 00:43:10 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Wed, 24 Oct 2012 00:42:50 -0700 Message-ID: <50879C02.4040106@codesourcery.com> Date: Wed, 24 Oct 2012 07:43:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Tom Tromey CC: Subject: Re: [PATCH] Fix kfail in gdb.base/callfuncs.exp References: <1350301607-16574-1-git-send-email-yao@codesourcery.com> <877gqhf2uk.fsf@fleche.redhat.com> In-Reply-To: <877gqhf2uk.fsf@fleche.redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-10/txt/msg00431.txt.bz2 On 10/24/2012 02:41 AM, Tom Tromey wrote: >>>>>> "Yao" == Yao Qi writes: > > No comment on the patch, just a question > > Yao> - setup_kfail_for_target gdb/12798 "x86_64-*-*" > > I didn't know this proc, so I looked it up: > > proc setup_kfail_for_target { PR target } { > if { [istarget $target] } { > setup_kfail $PR $target > } > } > > But setup_kfail itself just does: > > proc setup_kfail { args } { > [...] > if {[istarget $sub_arg]} { > set kfail_flag 1 > continue > } > > So I don't understand how setup_kfail_for_target is different. > If I'm missing something, I'd like to know what. > Otherwise I think we can nuke this proc entirely. > Tom, This proc is to link the same fail to different PRs according to different target triplets (See more here http://sourceware.org/ml/gdb-patches/2011-05/msg00508.html). For example, in gdb.base/varargs.exp setup_kfail_for_target gdb/12790 "x86_64-*-*" setup_kfail_for_target gdb/12791 "arm*-*-*" gdb_test $test ".*= 4 \\+ 4 \\* I" $test 'setup_kfail_for_target' can be replaced with 'setup_kfail' if there is only one PR number for a given fail, but it is still useful in gdb.base/varargs.exp. The patch below is to replace 'setup_kfail_for_target' with 'setup_kfail', and add one sentence of comment to proc 'setup_kfail_for_target'. Is it OK? -- Yao gdb/testsuite: 2012-10-24 Yao Qi * gdb.base/callfuncs.exp (do_function_calls): User 'setup_kfail' instead of 'setup_kfail_for_target'. * gdb.trace/ftrace.exp (test_fast_tracepoints): Likewise. * lib/gdb.exp (setup_kfail_for_target): Add comment. --- gdb/testsuite/gdb.base/callfuncs.exp | 4 ++-- gdb/testsuite/gdb.trace/ftrace.exp | 4 ++-- gdb/testsuite/lib/gdb.exp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 75ea5f0..53ffafd 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -245,11 +245,11 @@ proc do_function_calls {} { gdb_test "p t_structs_fc(struct_val1)" ".*= 3 \\+ 3 \\* I" \ "call inferior func with struct - returns float _Complex" - setup_kfail_for_target gdb/12783 "i?86-*-*" + setup_kfail gdb/12783 "i?86-*-*" gdb_test "p t_structs_dc(struct_val1)" ".*= 4 \\+ 4 \\* I" \ "call inferior func with struct - returns double _Complex" - setup_kfail_for_target gdb/12783 "i?86-*-*" + setup_kfail gdb/12783 "i?86-*-*" gdb_test "p t_structs_ldc(struct_val1)" "= 5 \\+ 5 \\* I" \ "call inferior func with struct - returns long double _Complex" } diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp index 56cd2fa..2a3dbae 100644 --- a/gdb/testsuite/gdb.trace/ftrace.exp +++ b/gdb/testsuite/gdb.trace/ftrace.exp @@ -132,13 +132,13 @@ proc test_fast_tracepoints {} { gdb_test "tfind pc *set_point" "Found trace frame .*" \ "tfind set_point frame, first time" - setup_kfail_for_target "gdb/13808" "x86_64-*-linux*" + setup_kfail "gdb/13808" "x86_64-*-linux*" gdb_test "print globvar" " = 1" gdb_test "tfind pc *set_point" "Found trace frame .*" \ "tfind set_point frame, second time" - setup_kfail_for_target "gdb/13808" "x86_64-*-linux*" + setup_kfail "gdb/13808" "x86_64-*-linux*" gdb_test "print anarg" " = 200" gdb_test "tfind start" "Found trace frame .*" \ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index f27d4a7..29bf8f7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3435,7 +3435,8 @@ proc setup_xfail_format { format } { } # Like setup_kfail, but only call setup_kfail conditionally if -# istarget[TARGET] returns true. +# istarget[TARGET] returns true. This proc is useful to link +# the same fail to different PRs on different triplets. proc setup_kfail_for_target { PR target } { if { [istarget $target] } { setup_kfail $PR $target -- 1.7.7.6