From cad8e26d2a2c7cee04954624fbaf91f03eec50ec Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Wed, 8 Jun 2016 10:12:56 +0100 Subject: [PATCH] gdb: Use UNSUPPORTED not XFAIL for unsupported target features 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. --- gdb/testsuite/ChangeLog | 22 +++++++++++++++++++ gdb/testsuite/gdb.base/call-ar-st.exp | 3 +-- gdb/testsuite/gdb.base/call-rt-st.exp | 3 +-- gdb/testsuite/gdb.base/call-sc.exp | 3 +-- gdb/testsuite/gdb.base/call-signal-resume.exp | 3 +-- gdb/testsuite/gdb.base/call-strs.exp | 3 +-- gdb/testsuite/gdb.base/callexit.exp | 3 +-- gdb/testsuite/gdb.base/callfuncs.exp | 3 +-- gdb/testsuite/gdb.base/nodebug.exp | 3 +-- gdb/testsuite/gdb.base/printcmds.exp | 6 ++--- gdb/testsuite/gdb.base/ptype.exp | 6 +---- gdb/testsuite/gdb.base/structs.exp | 3 +-- gdb/testsuite/gdb.base/unwindonsignal.exp | 3 +-- gdb/testsuite/gdb.cp/gdb2495.exp | 3 +-- gdb/testsuite/gdb.cp/templates.exp | 3 +-- gdb/testsuite/gdb.cp/virtfunc.exp | 3 +-- .../gdb.threads/hand-call-in-threads.exp | 3 +-- .../gdb.threads/interrupted-hand-call.exp | 3 +-- .../gdb.threads/thread-unwindonsignal.exp | 3 +-- 19 files changed, 41 insertions(+), 41 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7d2b1447620..ba7dd398988 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,25 @@ +2016-06-13 Andrew Burgess + + * 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 PR rust/20110: diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp index 2a035617c19..28436d50238 100644 --- a/gdb/testsuite/gdb.base/call-ar-st.exp +++ b/gdb/testsuite/gdb.base/call-ar-st.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp index b7b880ece21..0f9c5e8f7f0 100644 --- a/gdb/testsuite/gdb.base/call-rt-st.exp +++ b/gdb/testsuite/gdb.base/call-rt-st.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp index faa43e655bb..7592d65e6b7 100644 --- a/gdb/testsuite/gdb.base/call-sc.exp +++ b/gdb/testsuite/gdb.base/call-sc.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/call-signal-resume.exp b/gdb/testsuite/gdb.base/call-signal-resume.exp index 5ae193b4c79..a6b07cf72f0 100644 --- a/gdb/testsuite/gdb.base/call-signal-resume.exp +++ b/gdb/testsuite/gdb.base/call-signal-resume.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/call-strs.exp b/gdb/testsuite/gdb.base/call-strs.exp index 5d7fcb6e1c4..7a310d40911 100644 --- a/gdb/testsuite/gdb.base/call-strs.exp +++ b/gdb/testsuite/gdb.base/call-strs.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/callexit.exp b/gdb/testsuite/gdb.base/callexit.exp index 5a690ee7e1b..219c9a47ed1 100644 --- a/gdb/testsuite/gdb.base/callexit.exp +++ b/gdb/testsuite/gdb.base/callexit.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index fbe896c476f..1ec33d8958c 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 } diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp index ebf1f04eba4..43867ba9836 100644 --- a/gdb/testsuite/gdb.base/nodebug.exp +++ b/gdb/testsuite/gdb.base/nodebug.exp @@ -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). diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index d599a70e10c..7937fe7321a 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp index b64e189f449..dd610919d9f 100644 --- a/gdb/testsuite/gdb.base/ptype.exp +++ b/gdb/testsuite/gdb.base/ptype.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp index 280653ebed4..c5253402593 100644 --- a/gdb/testsuite/gdb.base/structs.exp +++ b/gdb/testsuite/gdb.base/structs.exp @@ -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 } diff --git a/gdb/testsuite/gdb.base/unwindonsignal.exp b/gdb/testsuite/gdb.base/unwindonsignal.exp index 6ff6b37d196..cf63c6dbd8e 100644 --- a/gdb/testsuite/gdb.base/unwindonsignal.exp +++ b/gdb/testsuite/gdb.base/unwindonsignal.exp @@ -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 } diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp index 4ce386f5307..0ce1a53768e 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -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 } diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp index 6fa154135a4..c503598e197 100644 --- a/gdb/testsuite/gdb.cp/templates.exp +++ b/gdb/testsuite/gdb.cp/templates.exp @@ -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 } diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp index 052c33d35d4..04fe5aa5e2b 100644 --- a/gdb/testsuite/gdb.cp/virtfunc.exp +++ b/gdb/testsuite/gdb.cp/virtfunc.exp @@ -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 } diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp index c11542069ca..67c2c8e2205 100644 --- a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp +++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp @@ -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 } diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp index 76a3d6794d3..556902c13f0 100644 --- a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp +++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp @@ -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 } diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp index 487e44cfa3e..1327c7e1931 100644 --- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp +++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp @@ -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 } -- 2.30.2