From: Yao Qi <yao@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix kfail in gdb.base/callfuncs.exp
Date: Wed, 24 Oct 2012 07:43:00 -0000 [thread overview]
Message-ID: <50879C02.4040106@codesourcery.com> (raw)
In-Reply-To: <877gqhf2uk.fsf@fleche.redhat.com>
On 10/24/2012 02:41 AM, Tom Tromey wrote:
>>>>>> "Yao" == Yao Qi <yao@codesourcery.com> 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 <yao@codesourcery.com>
* 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
next prev parent reply other threads:[~2012-10-24 7:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 11:46 Yao Qi
2012-10-23 6:59 ` ping: " Yao Qi
2012-10-23 8:36 ` Mark Kettenis
2012-10-23 10:06 ` Yao Qi
2012-10-23 18:22 ` Mark Kettenis
2012-10-24 7:45 ` Yao Qi
2012-10-23 18:41 ` Tom Tromey
2012-10-24 7:43 ` Yao Qi [this message]
2012-10-24 14:56 ` Tom Tromey
2012-10-25 14:55 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50879C02.4040106@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox