gdb: Use UNSUPPORTED not FAIL for unsupported target features

Message ID 1465377976-21678-1-git-send-email-andrew.burgess@embecosm.com
State New, archived
Headers

Commit Message

Andrew Burgess June 8, 2016, 9:26 a.m. UTC
  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.

gdb/testsuite/ChangeLog:

	* gdb.base/callfuncs.exp: Report unsupported rather than fail for
	unsupported target features.
---
 gdb/testsuite/ChangeLog              | 5 +++++
 gdb/testsuite/gdb.base/callfuncs.exp | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)
  

Comments

Yao Qi June 8, 2016, 10:25 a.m. UTC | #1
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.
  

Patch

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 98a798b..9a08c73 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@ 
+2016-06-08  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* gdb.base/callfuncs.exp: Report unsupported rather than fail for
+	unsupported target features.
+
 2016-06-06  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* gdb.mi/mi-record-changed.exp: Adjust =record-started output
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
 }