gdb: Use UNSUPPORTED not XFAIL for unsupported target features
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 8 Jun 2016 09:12:56 +0000 (10:12 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 13 Jun 2016 14:26:26 +0000 (15:26 +0100)
If a target does not support making function calls from GDB then in a
number of test files, we currently report an XFAIL and skip some, or all
of the tests.  This commit changes the XFAIL to an UNSUPPORTED as this
seems more appropriate in these cases.

Some of the tests used bug ID 2416 to be reported in the XFAIL.  In the
current GDB bugzilla bug 2416 has nothing to do with calling target
functions from GDB.

gdb/testsuite/ChangeLog:

* gdb.base/call-ar-st.exp: Report unsupported rather than xfail
for unsupported target features.
* gdb.base/call-rt-st.exp: Likewise.
* gdb.base/call-sc.exp: Likewise.
* gdb.base/call-signal-resume.exp: Likewise.
* gdb.base/call-strs.exp: Likewise.
* gdb.base/callexit.exp: Likewise.
* gdb.base/callfuncs.exp: Likewise.
* gdb.base/nodebug.exp: Likewise.
* gdb.base/printcmds.exp: Likewise.
* gdb.base/ptype.exp: Likewise.
* gdb.base/structs.exp: Likewise.
* gdb.base/unwindonsignal.exp: Likewise.
* gdb.cp/gdb2495.exp: Likewise.
* gdb.cp/templates.exp: Likewise.
* gdb.cp/virtfunc.exp: Likewise.
* gdb.threads/hand-call-in-threads.exp: Likewise.
* gdb.threads/interrupted-hand-call.exp: Likewise.
* gdb.threads/thread-unwindonsignal.exp: Likewise.

19 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/call-ar-st.exp
gdb/testsuite/gdb.base/call-rt-st.exp
gdb/testsuite/gdb.base/call-sc.exp
gdb/testsuite/gdb.base/call-signal-resume.exp
gdb/testsuite/gdb.base/call-strs.exp
gdb/testsuite/gdb.base/callexit.exp
gdb/testsuite/gdb.base/callfuncs.exp
gdb/testsuite/gdb.base/nodebug.exp
gdb/testsuite/gdb.base/printcmds.exp
gdb/testsuite/gdb.base/ptype.exp
gdb/testsuite/gdb.base/structs.exp
gdb/testsuite/gdb.base/unwindonsignal.exp
gdb/testsuite/gdb.cp/gdb2495.exp
gdb/testsuite/gdb.cp/templates.exp
gdb/testsuite/gdb.cp/virtfunc.exp
gdb/testsuite/gdb.threads/hand-call-in-threads.exp
gdb/testsuite/gdb.threads/interrupted-hand-call.exp
gdb/testsuite/gdb.threads/thread-unwindonsignal.exp

index 7d2b1447620df6d1dc9d330d6c10f79aa2b17aa3..ba7dd3989889e454fa019e7725261ee5edba7b7d 100644 (file)
@@ -1,3 +1,25 @@
+2016-06-13  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gdb.base/call-ar-st.exp: Report unsupported rather than xfail
+       for unsupported target features.
+       * gdb.base/call-rt-st.exp: Likewise.
+       * gdb.base/call-sc.exp: Likewise.
+       * gdb.base/call-signal-resume.exp: Likewise.
+       * gdb.base/call-strs.exp: Likewise.
+       * gdb.base/callexit.exp: Likewise.
+       * gdb.base/callfuncs.exp: Likewise.
+       * gdb.base/nodebug.exp: Likewise.
+       * gdb.base/printcmds.exp: Likewise.
+       * gdb.base/ptype.exp: Likewise.
+       * gdb.base/structs.exp: Likewise.
+       * gdb.base/unwindonsignal.exp: Likewise.
+       * gdb.cp/gdb2495.exp: Likewise.
+       * gdb.cp/templates.exp: Likewise.
+       * gdb.cp/virtfunc.exp: Likewise.
+       * gdb.threads/hand-call-in-threads.exp: Likewise.
+       * gdb.threads/interrupted-hand-call.exp: Likewise.
+       * gdb.threads/thread-unwindonsignal.exp: Likewise.
+
 2016-06-10  Tom Tromey  <tom@tromey.com>
 
        PR rust/20110:
index 2a035617c19ea9619edaf457062a2ef948581522..28436d50238ea84af045f92c027e130c5677f36b 100644 (file)
@@ -22,8 +22,7 @@ standard_testfile
 # Some targets can't call functions, 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
 }
 
index b7b880ece211175c4c4b81bf84120bff8609e913..0f9c5e8f7f048a8570821cb29350716c54cf8b76 100644 (file)
@@ -40,8 +40,7 @@ if [get_compiler_info] {
 # 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
 }
 
index faa43e655bb957e956851c5da30d0c9a965cada0..7592d65e6b7a976657a8a88ffbbe54fb06dd2c9c 100644 (file)
@@ -23,8 +23,7 @@
 # test.
 
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*"
-    fail "This target can not call functions"
+    unsupported "This target can not call functions"
     continue
 }
 
index 5ae193b4c79b2081c3a7582625819477be76cb53..a6b07cf72f0d3c5328b40b0b000daacfc6717940 100644 (file)
@@ -36,8 +36,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 # 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
 }
 
index 5d7fcb6e1c46b65c955e933d293b55100c6309c6..7a310d40911020a25b30baafbc3ecc1d3dad528a 100644 (file)
@@ -28,8 +28,7 @@ standard_testfile
 # Some targets can't call functions, 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
 }
 
index 5a690ee7e1bf292843e1c32d2cbe1a9a6bd180fe..219c9a47ed1f290e1210ad447b90f4dab575d163 100644 (file)
@@ -24,8 +24,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 # 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
 }
 
index fbe896c476f7b527646a0dd9dddb1e7ea6db78d4..1ec33d8958cf94f9eab4b3cd2faf771573957d9f 100644 (file)
@@ -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
 }
 
index ebf1f04eba48632a76c7f89f032508291949ec3b..43867ba983679ec2da3b2c805ba14996a9c7bfc8 100644 (file)
@@ -123,8 +123,7 @@ if [runto inner] then {
     # This test is not as obscure as it might look.  `p getenv ("TERM")'
     # is a real-world example, at least on many systems.
     if [target_info exists gdb,cannot_call_functions] {
-       setup_xfail "*-*-*" 2416
-       fail "p/c array_index(\"abcdef\",2)"
+       unsupported "p/c array_index(\"abcdef\",2)"
     } else {
        # We need to up this because this can be really slow on some boards.
        # (malloc() is called as part of the test).
index d599a70e10c920f9eee2b9a3d4ce4d764e69e10d..7937fe7321acf2fe290db74d0d498d94955580fb 100644 (file)
@@ -683,8 +683,7 @@ proc test_print_string_constants {} {
     gdb_test_no_output "set print elements 50"
 
     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"
        return
     }
 
@@ -707,8 +706,7 @@ proc test_print_string_constants {} {
 proc test_print_array_constants {} {
 
     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"
        return
     }
 
index b64e189f449ebeaff99d878fac4391399b501c29..dd610919d9fc18b3bb3c91abdbf2ecbefe84de5f 100644 (file)
@@ -588,14 +588,10 @@ gdb_test "ptype foo" "type = char" "ptype foo typedef after second list of charf
 # requires a running process.  These call malloc, and can take a long
 # time to execute over a slow serial link, so increase the timeout.
 
-# UDI can't do this (PR 2416).  XFAIL is not suitable, because attempting
-# the operation causes a slow painful death rather than a nice simple failure.
-
 if [runto_main] then {
 
   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
   }
 
index 280653ebed466b8668c011b569548e8089d397a3..c5253402593727bb6da21e56da1e1fe8ec0ba6f6 100644 (file)
@@ -20,8 +20,7 @@
 # test.
 
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*"
-    fail "This target can not call functions"
+    unsupported "This target can not call functions"
     continue
 }
 
index 6ff6b37d1961e121393b21ce7f05993d58fd1aa5..cf63c6dbd8e00750b66ff7a1348cd21e0aa14dad 100644 (file)
@@ -22,8 +22,7 @@ if [target_info exists gdb,nosignals] {
 # 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
 }
 
index 4ce386f530736be86bf640944e9026499058d8ad..0ce1a53768e2b48010fe1b08cf829024e9a9ca30 100644 (file)
@@ -54,8 +54,7 @@ if [get_compiler_info "c++"] {
 # 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
 }
 
index 6fa154135a433581156ea7f713d81887aeba4eb7..c503598e1971ad22f365fd49542d5360ecb84b01 100644 (file)
@@ -184,8 +184,7 @@ proc test_template_calls {} {
     global gdb_prompt
 
     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"
        return
     }
 
index 052c33d35d428f6a6fefd90b78513f48784cfef4..04fe5aa5e2b8b6c9ac69acb32053f742ddc8ef7f 100644 (file)
@@ -177,8 +177,7 @@ proc test_virtual_calls {} {
     global nl
 
     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"
        return 0
     }
 
index c11542069cab1dae50f5c13c0accf35801d6323c..67c2c8e220542ca24861d1351b8cbd39ccfef616 100644 (file)
@@ -26,8 +26,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 # 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
 }
 
index 76a3d6794d3c6a85acac19d251c95a10f11f8fbb..556902c13f052366dfa62bf0e326a6b3b8f57d36 100644 (file)
@@ -27,8 +27,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 # 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
 }
 
index 487e44cfa3e98362fbd294eca666a6d5203fc52a..1327c7e1931ad53ba51a0008b7c19410bf15bb76 100644 (file)
@@ -27,8 +27,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 # 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
 }