From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: cagney@gnu.org
Cc: hans-peter.nilsson@axis.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA:] sim-defs.exp: support xfail
Date: Tue, 16 Nov 2004 16:22:00 -0000 [thread overview]
Message-ID: <200411161622.iAGGMTPv015831@ignucius.se.axis.com> (raw)
In-Reply-To: <41924417.8060202@gnu.org> (message from Andrew Cagney on Wed, 10 Nov 2004 11:38:47 -0500)
> Date: Wed, 10 Nov 2004 11:38:47 -0500
> From: Andrew Cagney <cagney@gnu.org>
> I can't think of a single reason for a simulator test that failing not
> being for a known bug.
>
> However, for consistency with dejagnu, we might as well support both.
> Feel free to add the necessary glue to cover all of xfail and kfail and
> kpass.
I felt free to the following, tested with dejagnu-1.4.4.
There's no separate kpass support (and no need for any, for the
same reason you don't need to add separate xpass support. :-)
* lib/sim-defs.exp (run_sim_test): Support "xfail" and "kfail".
In head comment, mention that output specifications concatenate.
Index: sim-defs.exp
===================================================================
RCS file: /cvs/src/src/sim/testsuite/lib/sim-defs.exp,v
retrieving revision 1.9
diff -c -p -r1.9 sim-defs.exp
*** sim-defs.exp 16 Nov 2004 07:06:17 -0000 1.9
--- sim-defs.exp 16 Nov 2004 16:12:10 -0000
*************** proc sim_run { prog sim_opts prog_opts r
*** 163,171 ****
--- 163,177 ----
# sim[(mach-list)]: <simulator options>
# output: program output pattern to match with string-match
# xerror: program is expected to return with a "failure" exit code
+ # xfail: <PRMS-opt> <target-triplets-where-test-fails>
+ # kfail: <PRMS> <target-triplets-where-test-fails>
# If `output' is not specified, the program must output "pass" if !xerror or
# "fail" if xerror.
# The parens in "optname()" are optional if the specification is for all machs.
+ # Multiple "output", "xfail" and "kfail" options concatenate.
+ # The xfail and kfail arguments are space-separated target triplets and PRIDs.
+ # There must be a PRMS (bug report ID) specified for kfail, while it's
+ # optional for xfail.
proc run_sim_test { name requested_machs } {
global subdir srcdir
*************** proc run_sim_test { name requested_machs
*** 196,201 ****
--- 202,209 ----
set opts(mach) ""
set opts(timeout) ""
set opts(xerror) "no"
+ set opts(xfail) ""
+ set opts(kfail) ""
if ![info exists global_as_options] {
set global_as_options ""
*************** proc run_sim_test { name requested_machs
*** 233,238 ****
--- 241,251 ----
if { $opt_name == "output" } {
set opt_val "$opts(output)$opt_val"
}
+ # Similar with "xfail" and "kfail", but arguments are space-separated.
+ if { $opt_name == "xfail" || $opt_name == "kfail" } {
+ set opt_val "$opts($opt_name) $opt_val"
+ }
+
foreach m $opt_machs {
set opts($opt_name,$m) $opt_val
}
*************** proc run_sim_test { name requested_machs
*** 266,271 ****
--- 279,296 ----
verbose -log "Testing $name on machine $mach."
+ # Time to setup xfailures and kfailures.
+ if { "$opts(xfail)" != "" } {
+ verbose -log "xfail: $opts(xfail)"
+ # Using eval to make $opts(xfail) appear as individual
+ # arguments.
+ eval setup_xfail $opts(xfail)
+ }
+ if { "$opts(kfail)" != "" } {
+ verbose -log "kfail: $opts(kfail)"
+ eval setup_kfail $opts(kfail)
+ }
+
if ![info exists opts(as,$mach)] {
set opts(as,$mach) $opts(as)
}
brgds, H-P
prev parent reply other threads:[~2004-11-16 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 9:52 Hans-Peter Nilsson
2004-11-10 14:03 ` Andrew Cagney
2004-11-10 14:55 ` Hans-Peter Nilsson
2004-11-10 16:40 ` Andrew Cagney
2004-11-16 16:22 ` Hans-Peter Nilsson [this message]
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=200411161622.iAGGMTPv015831@ignucius.se.axis.com \
--to=hans-peter.nilsson@axis.com \
--cc=cagney@gnu.org \
--cc=gdb-patches@sources.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