gdb: Use UNSUPPORTED not FAIL for unsupported target features
Commit Message
* Yao Qi <qiyaoltc@gmail.com> [2016-06-08 11:25:29 +0100]:
> On Wed, Jun 8, 2016 at 10:26 AM, Andrew Burgess
> <andrew.burgess@embecosm.com> wrote:
> > If a target does not support making function calls from GDB then we
> > abandon the gdb.base/callfuncs.exp test file early. Currently we report
> > a single FAIL before leaving the test file, this commit changes this to
> > a single UNSUPPORTED.
>
> XFAIL is reported, like this,
>
> XFAIL: gdb.base/callfuncs.exp: This target can not call functions (PRMS 2416)
>
> I suspect you get FAIL because your target_triplet is foo-bar, so
> *-*-* doesn't match.
That's a good point. I've updated the patch to say XFAIL to
UNSUPPORTED, as I still think that the change is sensible. New
version below.
Thanks,
Andrew
---
gdb: Use UNSUPPORTED not XFAIL for unsupported target features
If a target does not support making function calls from GDB then we
abandon the gdb.base/callfuncs.exp test file early. Currently we report
a single XFAIL before leaving the test file, this commit changes this to
a single UNSUPPORTED.
gdb/testsuite/ChangeLog:
* gdb.base/callfuncs.exp: Report unsupported rather than xfail for
unsupported target features.
Comments
On Wed, Jun 8, 2016 at 12:40 PM, Andrew Burgess
> diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
> index fbe896c..1ec33d8 100644
> --- a/gdb/testsuite/gdb.base/callfuncs.exp
> +++ b/gdb/testsuite/gdb.base/callfuncs.exp
> @@ -26,8 +26,7 @@ if [support_complex_tests] {
> # Some targets can't do function calls, so don't even bother with this
> # test.
> if [target_info exists gdb,cannot_call_functions] {
> - setup_xfail "*-*-*" 2416
> - fail "This target can not call functions"
> + unsupported "This target can not call functions"
> continue
> }
>
That change makes sense to me. UNSUPPORTED is better XFAIL.
There are many instances,
./gdb.base/unwindonsignal.exp: setup_xfail "*-*-*" 2416
./gdb.base/call-signal-resume.exp: setup_xfail "*-*-*" 2416
./gdb.base/call-rt-st.exp: setup_xfail "*-*-*" 2416
./gdb.base/call-ar-st.exp: setup_xfail "*-*-*" 2416
./gdb.base/ptype.exp: setup_xfail "*-*-*" 2416
./gdb.base/callexit.exp: setup_xfail "*-*-*" 2416
./gdb.base/callfuncs.exp: setup_xfail "*-*-*" 2416
./gdb.base/nodebug.exp: setup_xfail "*-*-*" 2416
./gdb.base/call-strs.exp: setup_xfail "*-*-*" 2416
./gdb.base/printcmds.exp: setup_xfail "*-*-*" 2416
./gdb.base/printcmds.exp: setup_xfail "*-*-*" 2416
./gdb.threads/thread-unwindonsignal.exp: setup_xfail "*-*-*" 2416
./gdb.threads/hand-call-in-threads.exp: setup_xfail "*-*-*" 2416
./gdb.threads/interrupted-hand-call.exp: setup_xfail "*-*-*" 2416
./gdb.cp/templates.exp: setup_xfail "*-*-*" 2416
./gdb.cp/gdb2495.exp: setup_xfail "*-*-*" 2416
./gdb.cp/virtfunc.exp: setup_xfail "*-*-*" 2416
so I think we need to clean them up too. I don't think 2416 is the PR number
in sourceware.org bugzilla, so we don't loose any information after
the cleanup. The patch can go in without another review.
@@ -1,3 +1,8 @@
+2016-06-08 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.base/callfuncs.exp: Report unsupported rather than xfail for
+ unsupported target features.
+
2016-06-06 Simon Marchi <simon.marchi@ericsson.com>
* gdb.mi/mi-record-changed.exp: Adjust =record-started output
@@ -26,8 +26,7 @@ if [support_complex_tests] {
# Some targets can't do function calls, so don't even bother with this
# test.
if [target_info exists gdb,cannot_call_functions] {
- setup_xfail "*-*-*" 2416
- fail "This target can not call functions"
+ unsupported "This target can not call functions"
continue
}