[17/46] Use require skip_ctf_tests

Message ID 20221217000818.3729389-18-tom@tromey.com
State Committed
Headers
Series Rewrite "require" test procedure and use it more often |

Commit Message

Tom Tromey Dec. 17, 2022, 12:07 a.m. UTC
  This changes some tests to use "require skip_ctf_tests".
---
 gdb/testsuite/gdb.base/ctf-constvars.exp  | 5 +----
 gdb/testsuite/gdb.base/ctf-ptype.exp      | 5 +----
 gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp | 5 +----
 gdb/testsuite/gdb.ctf/funcreturn.exp      | 5 +----
 gdb/testsuite/gdb.ctf/multi.exp           | 5 +----
 5 files changed, 5 insertions(+), 20 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.base/ctf-constvars.exp b/gdb/testsuite/gdb.base/ctf-constvars.exp
index cd0198da154..bd518f0171f 100644
--- a/gdb/testsuite/gdb.base/ctf-constvars.exp
+++ b/gdb/testsuite/gdb.base/ctf-constvars.exp
@@ -24,10 +24,7 @@ 
 #            const pointers to const vars
 # with mixed types.
 
-if [skip_ctf_tests] {
-    unsupported "no CTF debug format support, or CTF disabled in GDB"
-    return 0
-}
+require !skip_ctf_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/ctf-ptype.exp b/gdb/testsuite/gdb.base/ctf-ptype.exp
index 2e3b972ebe9..4302c53914e 100644
--- a/gdb/testsuite/gdb.base/ctf-ptype.exp
+++ b/gdb/testsuite/gdb.base/ctf-ptype.exp
@@ -15,10 +15,7 @@ 
 
 # This file is a subset of ptype.exp written by Rob Savoye. (rob@cygnus.com)
 
-if [skip_ctf_tests] {
-    unsupported "no CTF debug format support, or CTF disabled in GDB"
-    return 0
-}
+require !skip_ctf_tests
 
 # Some tests require GCC.
 set gcc_compiled [is_c_compiler_gcc]
diff --git a/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp b/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
index ca11b739ed8..b945a80c035 100644
--- a/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
+++ b/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
@@ -15,10 +15,7 @@ 
 
 # This file is a subset of ptype.exp written by Rob Savoye. (rob@cygnus.com)
 
-if [skip_ctf_tests] {
-    unsupported "no CTF debug format support, or CTF disabled in GDB"
-    return 0
-}
+require !skip_ctf_tests
 
 standard_testfile cross-tu-cyclic-1.c  cross-tu-cyclic-2.c \
 	cross-tu-cyclic-3.c  cross-tu-cyclic-4.c
diff --git a/gdb/testsuite/gdb.ctf/funcreturn.exp b/gdb/testsuite/gdb.ctf/funcreturn.exp
index ab4aa21fa32..660d87fc366 100644
--- a/gdb/testsuite/gdb.ctf/funcreturn.exp
+++ b/gdb/testsuite/gdb.ctf/funcreturn.exp
@@ -13,10 +13,7 @@ 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if [skip_ctf_tests] {
-    unsupported "no CTF debug format support, or CTF disabled in GDB"
-    return 0
-}
+require !skip_ctf_tests
 
 if [target_info exists no_long_long] {
     set exec_opts [list debug additional_flags=-DNO_LONG_LONG]
diff --git a/gdb/testsuite/gdb.ctf/multi.exp b/gdb/testsuite/gdb.ctf/multi.exp
index 93fcbb660a2..e8d24eda24c 100644
--- a/gdb/testsuite/gdb.ctf/multi.exp
+++ b/gdb/testsuite/gdb.ctf/multi.exp
@@ -15,10 +15,7 @@ 
 
 # This file is a subset of ptype.exp written by Rob Savoye. (rob@cygnus.com)
 
-if [skip_ctf_tests] {
-    unsupported "no CTF debug format support, or CTF disabled in GDB"
-    return 0
-}
+require !skip_ctf_tests
 
 standard_testfile ctf-a.c ctf-b.c ctf-c.c