public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 00/79] Rewrite "require" test procedure and use it more often
@ 2023-01-12  2:59 Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 01/79] Don't use ensure_gdb_index with require Tom Tromey
                   ` (80 more replies)
  0 siblings, 81 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches

Here's v2 of the series to change "require".

v1 was here:

    https://sourceware.org/pipermail/gdb-patches/2022-December/194843.html

... with some reviews in January.

This version addresses the "double negative" issue by renaming all
"skip_" procs that are used in "require" to be "allow_" procs instead.

While doing this, I tackled a couple other minor things.

I changed the checks for Python and Guile to check the output of "gdb
--configuration".  This lets these checks be done without a running
gdb, which IMO is a nicer way for them to work.  Then I added --config
output so that this same change could be done for the TUI.

I found one minor bug while working on this -- a hidden dependency,
see patch 49.

Regression tested on x86-64 Fedora 36.  This is the sort of patch that
has to be regression tested after each rebase, because other patches
may introduce new uses of the removed procs.  Also it perhaps should
be tested on other platforms.

While working on this, I got annoyed by load_lib being needed
everywhere.  I have another patch to introduce the use of Tcl
autoloading, but this proves to be tricky due to the code that saves
and restores global variables.  It can be done -- and I think it's
worth doing -- but this series is already too long.

Tom



^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 01/79] Don't use ensure_gdb_index with require
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 02/79] Change 'require' to accept a list of predicates Tom Tromey
                   ` (79 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This series changes 'require' to take a list of simple predicates.
This patch backs out the one use of 'require' that doesn't conform to
this -- calling ensure_gdb_index.
---
 gdb/testsuite/gdb.base/with-mf.exp                    | 5 ++++-
 gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp    | 5 ++++-
 gdb/testsuite/gdb.dwarf2/gdb-add-index.exp            | 5 ++++-
 gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp   | 5 ++++-
 gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp | 5 ++++-
 gdb/testsuite/gdb.rust/dwindex.exp                    | 5 ++++-
 6 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.base/with-mf.exp b/gdb/testsuite/gdb.base/with-mf.exp
index c16027b6f18..f26d48e1026 100644
--- a/gdb/testsuite/gdb.base/with-mf.exp
+++ b/gdb/testsuite/gdb.base/with-mf.exp
@@ -24,7 +24,10 @@ if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
     return -1
 }
 
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+    untested "error adding gdb index"
+    return -1
+}
 
 clean_restart $binfile
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
index e65cc88e427..d8ed180e31b 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
@@ -29,7 +29,10 @@ with_test_prefix non-symlink {
 	return -1
     }
 
-    require {ensure_gdb_index $binfile} != -1
+    if { [ensure_gdb_index $binfile] == -1 } {
+	untested "error adding gdb index"
+	return -1
+    }
 }
 
 # Regenerate exec without index.
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
index 12dc2c3d2d7..248bb28aabf 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
@@ -27,7 +27,10 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \
     return -1
 }
 
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+    untested "error adding gdb index"
+    return -1
+}
 
 # Ok, we have a copy of $binfile with an index.
 # Restart gdb and verify the index was used.
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
index fc85795b996..2c9f037a80e 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
@@ -24,7 +24,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
     return -1
 }
 
-require {ensure_gdb_index $binfile} == 1
+if { [ensure_gdb_index $binfile] != 1 } {
+    untested "error adding gdb index"
+    return -1
+}
 
 clean_restart ${binfile}
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
index 92573034b9b..09c26ebaaf5 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
@@ -74,7 +74,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
     return -1
 }
 
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+    untested "error adding gdb index"
+    return -1
+}
 
 clean_restart ${binfile}
 
diff --git a/gdb/testsuite/gdb.rust/dwindex.exp b/gdb/testsuite/gdb.rust/dwindex.exp
index 306a7e7b246..4f05cb9eca8 100644
--- a/gdb/testsuite/gdb.rust/dwindex.exp
+++ b/gdb/testsuite/gdb.rust/dwindex.exp
@@ -26,7 +26,10 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
     return -1
 }
 
-require {ensure_gdb_index $binfile -dwarf-5} != -1
+if {[ensure_gdb_index $binfile -dwarf-5] == -1} {
+    untested "error adding gdb index"
+    return -1
+}
 
 gdb_exit
 gdb_start
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 02/79] Change 'require' to accept a list of predicates
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 01/79] Don't use ensure_gdb_index with require Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 03/79] Use unsupported in 'require' Tom Tromey
                   ` (78 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes 'require' to accept a list of simple predicates.  For
now, each predicate is just the name of a proc, optionally prefixed
with "!" to indicate that the result should be inverted.

It's possible to make this fancier, but so far I haven't done so.  One
idea I had is to allow a predicate to have associated text to display
on failure.  Another is to convert the predicates that need a running
gdb (e.g., skip_python_tests) to start their own gdb, and then
'require' could enforce the rule that gdb not be running when it is
called.
---
 gdb/testsuite/gdb.base/valgrind-bt.exp        |  2 +-
 gdb/testsuite/gdb.base/valgrind-disp-step.exp |  2 +-
 gdb/testsuite/gdb.base/valgrind-infcall-2.exp |  2 +-
 gdb/testsuite/gdb.base/valgrind-infcall.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-lines.exp        |  2 +-
 .../gdb.dwarf2/dw2-symtab-includes-lookup.exp |  2 +-
 .../frame-inlined-in-outer-frame.exp          |  2 +-
 gdb/testsuite/gdb.mi/mi-async.exp             |  2 +-
 gdb/testsuite/gdb.reverse/insn-reverse.exp    |  2 +-
 gdb/testsuite/gdb.tui/tui-missing-src.exp     |  2 +-
 gdb/testsuite/lib/gdb.exp                     | 51 ++++++++-----------
 11 files changed, 30 insertions(+), 41 deletions(-)

diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.base/valgrind-bt.exp
index d139d374def..049b42f9b1e 100644
--- a/gdb/testsuite/gdb.base/valgrind-bt.exp
+++ b/gdb/testsuite/gdb.base/valgrind-bt.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Valgrind gdbserver requires gdb with xml support.
-require gdb_skip_xml_test 0
+require !gdb_skip_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.base/valgrind-disp-step.exp b/gdb/testsuite/gdb.base/valgrind-disp-step.exp
index 99ba29b8929..05d0d8d6951 100644
--- a/gdb/testsuite/gdb.base/valgrind-disp-step.exp
+++ b/gdb/testsuite/gdb.base/valgrind-disp-step.exp
@@ -19,7 +19,7 @@
 # automatically instead of getting stuck or crashing.
 
 # Valgrind gdbserver requires gdb with xml support.
-require gdb_skip_xml_test 0
+require !gdb_skip_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
index c85abd8d272..13d290079cc 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
@@ -30,7 +30,7 @@
 # Aborted (core dumped)
 
 # Valgrind gdbserver requires gdb with xml support.
-require gdb_skip_xml_test 0
+require !gdb_skip_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp
index 3f7f81d9c21..48b3bb2c6c1 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Valgrind gdbserver requires gdb with xml support.
-require gdb_skip_xml_test 0
+require !gdb_skip_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
index 198d752606c..658d1f69a18 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
@@ -18,7 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support 1
+require dwarf2_support
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
index 6ae2035b37c..d870275c3c6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
@@ -40,7 +40,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support 1
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
index fbce42b1a25..0915ee4de13 100644
--- a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
@@ -26,7 +26,7 @@
 # directives.
 
 # Check if starti command is supported.
-require use_gdb_stub 0
+require !use_gdb_stub
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp
index 0b8349913dd..880db6de68b 100644
--- a/gdb/testsuite/gdb.mi/mi-async.exp
+++ b/gdb/testsuite/gdb.mi/mi-async.exp
@@ -26,7 +26,7 @@ if {!([isnative] && [istarget *-linux*])} {
 }
 
 # Check if start command is supported.
-require use_gdb_stub 0
+require !use_gdb_stub
 
 # The plan is for async mode to become the default but toggle for now.
 set saved_gdbflags $GDBFLAGS
diff --git a/gdb/testsuite/gdb.reverse/insn-reverse.exp b/gdb/testsuite/gdb.reverse/insn-reverse.exp
index 9cefea93108..a7322067922 100644
--- a/gdb/testsuite/gdb.reverse/insn-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/insn-reverse.exp
@@ -18,7 +18,7 @@ if ![supports_reverse] {
 }
 
 # Check if start command is supported.
-require use_gdb_stub 0
+require !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.tui/tui-missing-src.exp b/gdb/testsuite/gdb.tui/tui-missing-src.exp
index b373aadadc3..7dd8324f277 100644
--- a/gdb/testsuite/gdb.tui/tui-missing-src.exp
+++ b/gdb/testsuite/gdb.tui/tui-missing-src.exp
@@ -26,7 +26,7 @@
 # 7. Going back to main() shall result in no contents again.
 
 # Check if start command is supported.
-require use_gdb_stub 0
+require !use_gdb_stub
 
 tuiterm_env
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 39dfa67c344..88dfdafb654 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -9061,41 +9061,30 @@ gdb_caching_proc have_avx {
     return $status
 }
 
-# Called as either:
-# - require EXPR VAL
-# - require EXPR OP VAL
-# In the first case, OP is ==.
-#
-# Require EXPR OP VAL, where EXPR is evaluated in caller context.  If not,
-# return in the caller's context.
-
-proc require { fn arg1 {arg2 ""} } {
-    if { $arg2 == "" } {
-	set op ==
-	set val $arg1
-    } else {
-	set op $arg1
-	set val $arg2
-    }
-    set res [uplevel 1 $fn]
-    if { [expr $res $op $val] } {
-	return
-    }
+# Called as
+# - require ARG...
+#
+# ARG can either be a name, or of the form !NAME.
+#
+# Each name is a proc to evaluate in the caller's context.  It returns
+# a boolean, and a "!" means to invert the result.  If this is
+# nonzero, all is well.  If it is zero, an "untested" is emitted and
+# this proc causes the caller to return.
 
-    switch "$fn $op $val" {
-	"gdb_skip_xml_test == 0" { set msg "missing xml support" }
-	"ensure_gdb_index $binfile != -1" -
-	"ensure_gdb_index $binfile -dwarf-5 != -1" {
-	    set msg "Couldn't ensure index in binfile"
+proc require { args } {
+    foreach arg $args {
+	if {[string index $arg 0] == "!"} {
+	    set ok 0
+	    set fn [string range $arg 1 end]
+	} else {
+	    set ok 1
+	    set fn $arg
 	}
-	"use_gdb_stub == 0" {
-	    set msg "Remote stub used"
+	if {$ok != !![uplevel 1 $fn]} {
+	    untested "require failed: $arg"
+	    return -code return 0
 	}
-	default { set msg "$fn != $val" }
     }
-
-    untested $msg
-    return -code return 0
 }
 
 # Wait up to ::TIMEOUT seconds for file PATH to exist on the target system.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 03/79] Use unsupported in 'require'
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 01/79] Don't use ensure_gdb_index with require Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 02/79] Change 'require' to accept a list of predicates Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 04/79] Use require supports_reverse Tom Tromey
                   ` (77 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes 'require' to use 'unsupported' rather than 'untested'.
The latter doesn't really seem to be correct according to the DejaGNU
documentation:

    Declares a test was not run.  `untested' writes in the log file a
    message beginning with _UNTESTED_, appending the `message' argument.
    For example, you might use this in a dummy test whose only role is to
    record that a test does not yet exist for some feature.

The example there, and some text elsewhere, is what makes me think
this isn't a great fit.  On the other hand, 'unsupported' says:

    Declares that a test case depends on some facility that does not exist
    in the testing environment.
---
 gdb/testsuite/lib/gdb.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 88dfdafb654..3d416f902b8 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -9081,7 +9081,7 @@ proc require { args } {
 	    set fn $arg
 	}
 	if {$ok != !![uplevel 1 $fn]} {
-	    untested "require failed: $arg"
+	    unsupported "require failed: $arg"
 	    return -code return 0
 	}
     }
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 04/79] Use require supports_reverse
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (2 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 03/79] Use unsupported in 'require' Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 05/79] Use require supports_process_record Tom Tromey
                   ` (76 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require supports_reverse".
---
 gdb/testsuite/gdb.mi/mi-reverse.exp                     | 4 +---
 gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp    | 4 +---
 gdb/testsuite/gdb.reverse/break-reverse.exp             | 4 +---
 gdb/testsuite/gdb.reverse/consecutive-reverse.exp       | 4 +---
 gdb/testsuite/gdb.reverse/finish-precsave.exp           | 4 +---
 gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp       | 4 +---
 gdb/testsuite/gdb.reverse/finish-reverse.exp            | 4 +---
 gdb/testsuite/gdb.reverse/fstatat-reverse.exp           | 4 +---
 gdb/testsuite/gdb.reverse/getrandom.exp                 | 4 +---
 gdb/testsuite/gdb.reverse/getresuid-reverse.exp         | 4 +---
 gdb/testsuite/gdb.reverse/i386-reverse.exp              | 5 +----
 gdb/testsuite/gdb.reverse/i386-sse-reverse.exp          | 5 +----
 gdb/testsuite/gdb.reverse/insn-reverse.exp              | 7 +------
 gdb/testsuite/gdb.reverse/machinestate.exp              | 4 +---
 gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp | 4 +---
 gdb/testsuite/gdb.reverse/pipe-reverse.exp              | 4 +---
 gdb/testsuite/gdb.reverse/readv-reverse.exp             | 4 +---
 gdb/testsuite/gdb.reverse/recvmsg-reverse.exp           | 4 +---
 gdb/testsuite/gdb.reverse/rerun-prec.exp                | 4 +---
 gdb/testsuite/gdb.reverse/s390-mvcle.exp                | 4 +---
 gdb/testsuite/gdb.reverse/sigall-precsave.exp           | 5 +----
 gdb/testsuite/gdb.reverse/sigall-reverse.exp            | 5 +----
 gdb/testsuite/gdb.reverse/singlejmp-reverse.exp         | 4 +---
 gdb/testsuite/gdb.reverse/solib-reverse.exp             | 7 +------
 gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp  | 5 +----
 gdb/testsuite/gdb.reverse/step-reverse.exp              | 4 +---
 gdb/testsuite/gdb.reverse/time-reverse.exp              | 4 +---
 gdb/testsuite/gdb.reverse/until-reverse.exp             | 4 +---
 gdb/testsuite/gdb.reverse/waitpid-reverse.exp           | 4 +---
 gdb/testsuite/gdb.reverse/watch-reverse.exp             | 4 +---
 30 files changed, 30 insertions(+), 101 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp
index d631beb17c8..020b6feb448 100644
--- a/gdb/testsuite/gdb.mi/mi-reverse.exp
+++ b/gdb/testsuite/gdb.mi/mi-reverse.exp
@@ -27,9 +27,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp b/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
index 52a87faabf7..dd6e4d2045f 100644
--- a/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
@@ -13,9 +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 ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 set opts {}
 standard_testfile .S
diff --git a/gdb/testsuite/gdb.reverse/break-reverse.exp b/gdb/testsuite/gdb.reverse/break-reverse.exp
index 2078898f8eb..03d90cdb847 100644
--- a/gdb/testsuite/gdb.reverse/break-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/break-reverse.exp
@@ -16,9 +16,7 @@
 # This file is part of the GDB testsuite.  It tests reverse debugging
 # with breakpoints.
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/consecutive-reverse.exp b/gdb/testsuite/gdb.reverse/consecutive-reverse.exp
index 3988097bc98..74ce0811776 100644
--- a/gdb/testsuite/gdb.reverse/consecutive-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/consecutive-reverse.exp
@@ -16,9 +16,7 @@
 # This file is part of the GDB testsuite.  It tests stepping over
 # consecutive instructions in reverse.
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/finish-precsave.exp b/gdb/testsuite/gdb.reverse/finish-precsave.exp
index 159ee353f50..5d8eaad246e 100644
--- a/gdb/testsuite/gdb.reverse/finish-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/finish-precsave.exp
@@ -16,9 +16,7 @@
 # This file is part of the GDB testsuite.  It tests 'finish' with
 # reverse debugging.
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile finish-reverse.c
 set precsave [standard_output_file finish.precsave]
diff --git a/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp b/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp
index 290ad24ee13..2e9fc34c7c2 100644
--- a/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp
+++ b/gdb/testsuite/gdb.reverse/finish-reverse-bkpt.exp
@@ -40,9 +40,7 @@
 # addition to non-PowerPC systems.  On non-PowerPC systems, the GEP and LEP
 # are the same.
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/finish-reverse.exp b/gdb/testsuite/gdb.reverse/finish-reverse.exp
index 01ba309420c..76ca8197d61 100644
--- a/gdb/testsuite/gdb.reverse/finish-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/finish-reverse.exp
@@ -16,9 +16,7 @@
 # This file is part of the GDB testsuite.  It tests 'finish' with
 # reverse debugging.
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/fstatat-reverse.exp b/gdb/testsuite/gdb.reverse/fstatat-reverse.exp
index dcbbed3c11c..2d1ae90a8fa 100644
--- a/gdb/testsuite/gdb.reverse/fstatat-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/fstatat-reverse.exp
@@ -19,9 +19,7 @@
 # This test tests fstatat syscall for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/getrandom.exp b/gdb/testsuite/gdb.reverse/getrandom.exp
index 1507bdb06f3..ef8899358f9 100644
--- a/gdb/testsuite/gdb.reverse/getrandom.exp
+++ b/gdb/testsuite/gdb.reverse/getrandom.exp
@@ -19,9 +19,7 @@
 # This test tests getrandom syscall for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/getresuid-reverse.exp b/gdb/testsuite/gdb.reverse/getresuid-reverse.exp
index 27a5fbfcc06..20306f03f48 100644
--- a/gdb/testsuite/gdb.reverse/getresuid-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/getresuid-reverse.exp
@@ -19,9 +19,7 @@
 # This test tests getresuid/getresgid syscalls for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/i386-reverse.exp b/gdb/testsuite/gdb.reverse/i386-reverse.exp
index aacb362af7a..5fa7237af53 100644
--- a/gdb/testsuite/gdb.reverse/i386-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i386-reverse.exp
@@ -19,10 +19,7 @@
 # This test tests some i386 general instructions for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
-
+require supports_reverse
 
 if {![is_x86_like_target]} {
     verbose "Skipping i386 reverse tests."
diff --git a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
index bc8f662b969..66a69770d56 100644
--- a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
@@ -19,10 +19,7 @@
 # This test tests some i386 general instructions for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
-
+require supports_reverse
 
 if {![istarget "*86*-*linux*"]} {
     verbose "Skipping i386 reverse tests."
diff --git a/gdb/testsuite/gdb.reverse/insn-reverse.exp b/gdb/testsuite/gdb.reverse/insn-reverse.exp
index a7322067922..1a575b2d43e 100644
--- a/gdb/testsuite/gdb.reverse/insn-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/insn-reverse.exp
@@ -13,12 +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 ![supports_reverse] {
-    return
-}
-
-# Check if start command is supported.
-require !use_gdb_stub
+require supports_reverse !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/machinestate.exp b/gdb/testsuite/gdb.reverse/machinestate.exp
index eb6f9debc4c..68412b47d3b 100644
--- a/gdb/testsuite/gdb.reverse/machinestate.exp
+++ b/gdb/testsuite/gdb.reverse/machinestate.exp
@@ -35,9 +35,7 @@
 #   Test forward replay
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile .c ms1.c
 
diff --git a/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp b/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp
index 5c0e1e2fab3..ee83c55f598 100644
--- a/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp
+++ b/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp
@@ -40,9 +40,7 @@
 # addition to non-PowerPC systems.  On non-PowerPC systems, the GEP and LEP
 # are the same.
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/pipe-reverse.exp b/gdb/testsuite/gdb.reverse/pipe-reverse.exp
index 2b59071b7b6..d03c2c89c40 100644
--- a/gdb/testsuite/gdb.reverse/pipe-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/pipe-reverse.exp
@@ -19,9 +19,7 @@
 # This test tests pipe syscall for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/readv-reverse.exp b/gdb/testsuite/gdb.reverse/readv-reverse.exp
index bd79a1fa9d8..565fbb791a3 100644
--- a/gdb/testsuite/gdb.reverse/readv-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/readv-reverse.exp
@@ -19,9 +19,7 @@
 # This test tests readv syscall for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/recvmsg-reverse.exp b/gdb/testsuite/gdb.reverse/recvmsg-reverse.exp
index 58130a6b541..598321faaed 100644
--- a/gdb/testsuite/gdb.reverse/recvmsg-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/recvmsg-reverse.exp
@@ -19,9 +19,7 @@
 # This test tests socketpair and recvmsg syscalls for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/rerun-prec.exp b/gdb/testsuite/gdb.reverse/rerun-prec.exp
index 6d6ce8abcb4..d2fcdbd4876 100644
--- a/gdb/testsuite/gdb.reverse/rerun-prec.exp
+++ b/gdb/testsuite/gdb.reverse/rerun-prec.exp
@@ -13,9 +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 {![supports_reverse] || ![supports_process_record]} {
-    return
-}
+require supports_reverse supports_process_record
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/s390-mvcle.exp b/gdb/testsuite/gdb.reverse/s390-mvcle.exp
index 0d2db70a597..b0890400bae 100644
--- a/gdb/testsuite/gdb.reverse/s390-mvcle.exp
+++ b/gdb/testsuite/gdb.reverse/s390-mvcle.exp
@@ -17,9 +17,7 @@
 # This test tests s390 MVCLE opcode for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 if { ! [istarget "s390*-*-*"] } {
     verbose "Skipping s390 MVCLE instruction recording tests."
diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp
index 9212fb01eea..df0e8228fb4 100644
--- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp
@@ -18,10 +18,7 @@ if [target_info exists gdb,nosignals] {
     return
 }
 
-if ![supports_reverse] {
-    return
-}
-
+require supports_reverse
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.reverse/sigall-reverse.exp b/gdb/testsuite/gdb.reverse/sigall-reverse.exp
index 487cf421402..7499d784b9b 100644
--- a/gdb/testsuite/gdb.reverse/sigall-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/sigall-reverse.exp
@@ -18,10 +18,7 @@ if [target_info exists gdb,nosignals] {
     return
 }
 
-if ![supports_reverse] {
-    return
-}
-
+require supports_reverse
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp b/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
index 1ca7c2ce559..bc7e6876bd2 100644
--- a/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
@@ -13,9 +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 ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile ".S" "${gdb_test_file_name}-nodebug.S"
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.reverse/solib-reverse.exp b/gdb/testsuite/gdb.reverse/solib-reverse.exp
index 3cefa6c6925..b562ac9fa12 100644
--- a/gdb/testsuite/gdb.reverse/solib-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/solib-reverse.exp
@@ -16,12 +16,7 @@
 # This file is part of the GDB testsuite.  It tests reverse debugging
 # with shared libraries.
 
-if ![supports_reverse] {
-    return
-}
-if {[skip_shlib_tests]} {
-    return
-}
+require supports_reverse !skip_shlib_tests
 
 standard_testfile
 set lib1file "shr1"
diff --git a/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp b/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp
index ad637899e5b..94292d5eb9b 100644
--- a/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp
+++ b/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.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 { ![supports_reverse] } {
-    untested "target does not support record"
-    return -1
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp
index 27e4b175274..2c3b95a2eae 100644
--- a/gdb/testsuite/gdb.reverse/step-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/step-reverse.exp
@@ -20,9 +20,7 @@
 # Test step and next in reverse
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/time-reverse.exp b/gdb/testsuite/gdb.reverse/time-reverse.exp
index 73648af992b..07d55b348e8 100644
--- a/gdb/testsuite/gdb.reverse/time-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/time-reverse.exp
@@ -19,9 +19,7 @@
 # This test tests time syscall for reverse execution.
 #
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/until-reverse.exp b/gdb/testsuite/gdb.reverse/until-reverse.exp
index 23fc881dbf2..c9d0c7ec7ad 100644
--- a/gdb/testsuite/gdb.reverse/until-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/until-reverse.exp
@@ -16,9 +16,7 @@
 # This file is part of the GDB testsuite.  It tests 'until' and 
 # 'advance' in reverse debugging.
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile .c ur1.c
 
diff --git a/gdb/testsuite/gdb.reverse/waitpid-reverse.exp b/gdb/testsuite/gdb.reverse/waitpid-reverse.exp
index eb7e90015a2..9c9b9d44a2e 100644
--- a/gdb/testsuite/gdb.reverse/waitpid-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/waitpid-reverse.exp
@@ -21,9 +21,7 @@
 # Also serves as regression test for gdb/19187 (recording across a
 # fork).
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/watch-reverse.exp b/gdb/testsuite/gdb.reverse/watch-reverse.exp
index c4144c12e5d..6b81a6fdf88 100644
--- a/gdb/testsuite/gdb.reverse/watch-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/watch-reverse.exp
@@ -18,9 +18,7 @@
 # with watchpoints.
 
 
-if ![supports_reverse] {
-    return
-}
+require supports_reverse
 
 standard_testfile
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 05/79] Use require supports_process_record
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (3 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 04/79] Use require supports_reverse Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 06/79] Use require dwarf2_support Tom Tromey
                   ` (75 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require supports_process_record".
---
 gdb/testsuite/gdb.mi/mi-record-changed.exp          |  4 +---
 gdb/testsuite/gdb.python/py-record-full.exp         |  5 +----
 gdb/testsuite/gdb.reverse/break-precsave.exp        | 10 +++-------
 gdb/testsuite/gdb.reverse/consecutive-precsave.exp  | 10 +++-------
 gdb/testsuite/gdb.reverse/i386-precsave.exp         | 10 +++-------
 gdb/testsuite/gdb.reverse/machinestate-precsave.exp | 10 +++-------
 gdb/testsuite/gdb.reverse/solib-precsave.exp        | 13 +++----------
 gdb/testsuite/gdb.reverse/step-precsave.exp         | 10 +++-------
 gdb/testsuite/gdb.reverse/until-precsave.exp        | 10 +++-------
 gdb/testsuite/gdb.reverse/watch-precsave.exp        | 10 +++-------
 10 files changed, 26 insertions(+), 66 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-record-changed.exp b/gdb/testsuite/gdb.mi/mi-record-changed.exp
index c324e8a31e7..c5fb6355a6c 100644
--- a/gdb/testsuite/gdb.mi/mi-record-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-record-changed.exp
@@ -13,9 +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 ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 standard_testfile basics.c
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp
index 07fa6a1d5c5..fe19d6b207c 100644
--- a/gdb/testsuite/gdb.python/py-record-full.exp
+++ b/gdb/testsuite/gdb.python/py-record-full.exp
@@ -17,10 +17,7 @@
 
 # Skip this test if target does not support recording.
 
-if { ![supports_process_record] } {
-    untested "skipping recording tests"
-    return -1
-}
+require supports_process_record
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.reverse/break-precsave.exp b/gdb/testsuite/gdb.reverse/break-precsave.exp
index b41c3621729..2f04cbe0057 100644
--- a/gdb/testsuite/gdb.reverse/break-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/break-precsave.exp
@@ -17,9 +17,7 @@
 # with breakpoints in a process record logfile.
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 standard_testfile break-reverse.c
 set precsave [standard_output_file break.precsave]
@@ -39,10 +37,8 @@ proc precsave_tests {} {
 
     runto_main
 
-    if [supports_process_record] {
-	# Activate process record/replay
-	gdb_test_no_output "record" "turn on process record"
-    }
+    # Activate process record/replay
+    gdb_test_no_output "record" "turn on process record"
 
     gdb_test "break $end_location" \
 	"Breakpoint $decimal at .*$srcfile, line $end_location\." \
diff --git a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp
index 3c8696df6de..a0a4ed0014f 100644
--- a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp
@@ -17,9 +17,7 @@
 # consecutive instructions in a process record logfile.
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 standard_testfile consecutive-reverse.c
 set precsave [standard_output_file consecutive.precsave]
@@ -30,10 +28,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
 
 runto_main
 
-if [supports_process_record] {
-    # Activate process record/replay
-    gdb_test_no_output "record" "turn on process record"
-}
+# Activate process record/replay
+gdb_test_no_output "record" "turn on process record"
 
 set is_stmt [is_stmt_addresses $srcfile]
 
diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp
index 7ab2f54a95a..301e3b60208 100644
--- a/gdb/testsuite/gdb.reverse/i386-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp
@@ -20,9 +20,7 @@
 #
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 
 if {![is_x86_like_target]} {
@@ -46,10 +44,8 @@ set end_of_inc_dec_tests [gdb_get_line_number " end inc_dec_tests "]
 
 runto_main
 
-if [supports_process_record] {
-    # Activate process record/replay
-    gdb_test_no_output "record" "turn on process record"
-}
+# Activate process record/replay
+gdb_test_no_output "record" "turn on process record"
 
 global hex
 global decimal
diff --git a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp
index 678aac8dc58..fd53806e467 100644
--- a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp
@@ -36,9 +36,7 @@
 #
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 standard_testfile machinestate.c ms1.c
 set precsave [standard_output_file machinestate.precsave]
@@ -57,10 +55,8 @@ set endmain   [gdb_get_line_number " end main "   $srcfile]
 
 runto_main
 
-if [supports_process_record] {
-    # Activate process record/replay
-    gdb_test_no_output "record" "turn on process record"
-}
+# Activate process record/replay
+gdb_test_no_output "record" "turn on process record"
 
 gdb_test "break $endmain" \
     "Breakpoint $decimal at .*$srcfile, line $endmain\." \
diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp
index 518a45b98dc..92d0a0d30a0 100644
--- a/gdb/testsuite/gdb.reverse/solib-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp
@@ -17,12 +17,7 @@
 # with shared libraries and a logfile.
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
-if {[skip_shlib_tests]} {
-    return
-}
+require supports_process_record !skip_shlib_tests
 
 standard_testfile solib-reverse.c
 set precsave [standard_output_file solib.precsave]
@@ -77,10 +72,8 @@ gdb_load_shlib $library2
 
 runto_main
 
-if [supports_process_record] {
-    # Activate process record/replay
-    gdb_test_no_output "record" "turn on process record"
-}
+# Activate process record/replay
+gdb_test_no_output "record" "turn on process record"
 
 set end_of_main [gdb_get_line_number "end of main" ]
 gdb_test "break $end_of_main" \
diff --git a/gdb/testsuite/gdb.reverse/step-precsave.exp b/gdb/testsuite/gdb.reverse/step-precsave.exp
index ec12389fc45..19cd5d9930e 100644
--- a/gdb/testsuite/gdb.reverse/step-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/step-precsave.exp
@@ -21,9 +21,7 @@
 #
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 standard_testfile step-reverse.c
 set precsave [standard_output_file step.precsave]
@@ -34,10 +32,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
 
 runto_main
 
-if [supports_process_record] {
-    # Activate process record/replay
-    gdb_test_no_output "record" "turn on process record"
-}
+# Activate process record/replay
+gdb_test_no_output "record" "turn on process record"
 
 set end_of_main [gdb_get_line_number "end of main" ]
 gdb_test "break $end_of_main" \
diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp
index 0c2d7537cd6..b5b2ba764d3 100644
--- a/gdb/testsuite/gdb.reverse/until-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/until-precsave.exp
@@ -17,9 +17,7 @@
 # 'advance' in precord logfile.
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 standard_testfile until-reverse.c ur1.c
 set precsave [standard_output_file until.precsave]
@@ -38,10 +36,8 @@ set bp_location21 [gdb_get_line_number "set breakpoint 21 here"]
 
 runto_main
 
-if [supports_process_record] {
-    # Activate process record/replay
-    gdb_test_no_output "record" "turn on process record"
-}
+# Activate process record/replay
+gdb_test_no_output "record" "turn on process record"
 
 set end_of_main [gdb_get_line_number "set breakpoint 10a here" ]
 gdb_test "break $end_of_main" \
diff --git a/gdb/testsuite/gdb.reverse/watch-precsave.exp b/gdb/testsuite/gdb.reverse/watch-precsave.exp
index bb8cab47afd..1f981393f0e 100644
--- a/gdb/testsuite/gdb.reverse/watch-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/watch-precsave.exp
@@ -18,9 +18,7 @@
 # debugging with watchpoints.
 
 # This test suitable only for process record-replay
-if ![supports_process_record] {
-    return
-}
+require supports_process_record
 
 standard_testfile watch-reverse.c
 set precsave [standard_output_file watch.precsave]
@@ -31,10 +29,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
 
 runto_main
 
-if [supports_process_record] {
-    # Activate process record/replay
-    gdb_test_no_output "record" "turn on process record"
-}
+# Activate process record/replay
+gdb_test_no_output "record" "turn on process record"
 
 set end_location  [gdb_get_line_number "end of main"  ]
 gdb_test "break $end_location" \
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 06/79] Use require dwarf2_support
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (4 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 05/79] Use require supports_process_record Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 07/79] Use require is_x86_like_target Tom Tromey
                   ` (74 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require dwarf2_support".
---
 gdb/testsuite/gdb.base/until-trailing-insns.exp            | 5 +----
 gdb/testsuite/gdb.compile/compile-ops.exp                  | 4 +---
 gdb/testsuite/gdb.cp/incomplete-type-overload.exp          | 2 +-
 gdb/testsuite/gdb.cp/namelessclass.exp                     | 4 +---
 gdb/testsuite/gdb.cp/nsalias.exp                           | 4 +---
 gdb/testsuite/gdb.dlang/circular.exp                       | 7 +------
 gdb/testsuite/gdb.dlang/watch-loc.exp                      | 7 +------
 gdb/testsuite/gdb.dwarf2/ada-cold-name.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/arr-stride.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/arr-subrange.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/atomic-type.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/bad-regnum.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp | 4 +---
 gdb/testsuite/gdb.dwarf2/callframecfa.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/calling-convention.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/clang-debug-names.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/clztest.exp                       | 4 +---
 gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp                | 4 +---
 gdb/testsuite/gdb.dwarf2/corrupt.exp                       | 4 +---
 gdb/testsuite/gdb.dwarf2/count.exp                         | 4 +---
 gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/data-loc.exp                      | 4 +---
 .../gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp  | 5 +----
 gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp      | 4 +---
 gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp      | 4 +---
 gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp  | 4 +---
 gdb/testsuite/gdb.dwarf2/debug-names.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/dup-psym.exp                      | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-align.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp     | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-basic.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-common-block.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-compressed.exp                | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-const.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp     | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp      | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp       | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-error.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-filename.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp                | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-icycle.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-intercu.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-intermix.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp          | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp       | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp   | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-noloc.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-op-call.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp   | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-param-error.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-producer.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp               | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp               | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp            | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp       | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp               | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges.exp                    | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-restrict.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp            | 4 +---
 .../gdb.dwarf2/dw2-single-line-discriminators.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp            | 4 +---
 .../gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp        | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-strp.exp                      | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp                | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp       | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp    | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp                | 5 +----
 gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dwz.exp                           | 4 +---
 gdb/testsuite/gdb.dwarf2/dwzbuildid.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/dwznolink.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/enum-type.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-base.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-loclists.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-mix.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/fission-reread.exp                | 4 +---
 gdb/testsuite/gdb.dwarf2/formdata16.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/fortran-var-string.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp  | 4 +---
 gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/gdb-add-index.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/gdb-index.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/implptr-64bit.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/implptr.exp                       | 4 +---
 gdb/testsuite/gdb.dwarf2/implptrconst.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/implptrpiece.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/implref-array.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/implref-const.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/implref-global.exp                | 4 +---
 gdb/testsuite/gdb.dwarf2/implref-struct.exp                | 4 +---
 .../gdb.dwarf2/imported-unit-abstract-const-value.exp      | 4 +---
 gdb/testsuite/gdb.dwarf2/imported-unit-c.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp      | 4 +---
 gdb/testsuite/gdb.dwarf2/imported-unit.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp     | 4 +---
 .../gdb.dwarf2/inlined_subroutine-inheritance.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/intbits.exp                       | 4 +---
 gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp                | 4 +---
 gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp  | 4 +---
 gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/loclists-start-end.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/mac-fileno.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/macro-source-path.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/main-subprogram.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/method-ptr.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/missing-sig-type.exp              | 4 +---
 .../gdb.dwarf2/missing-type-name-for-templates.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/missing-type-name.exp             | 4 +---
 gdb/testsuite/gdb.dwarf2/multidictionary.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp | 4 +---
 gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp              | 4 +---
 gdb/testsuite/gdb.dwarf2/nonvar-access.exp                 | 2 +-
 gdb/testsuite/gdb.dwarf2/nostaticblock.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp            | 4 +---
 gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp          | 4 +---
 gdb/testsuite/gdb.dwarf2/pieces.exp                        | 4 +---
 gdb/testsuite/gdb.dwarf2/pr11465.exp                       | 4 +---
 gdb/testsuite/gdb.dwarf2/pr13961.exp                       | 4 +---
 gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/shortpiece.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/staticvirtual.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/struct-decl.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/struct-with-sig.exp               | 4 +---
 gdb/testsuite/gdb.dwarf2/subrange-enum.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/subrange.exp                      | 4 +---
 gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp     | 4 +---
 gdb/testsuite/gdb.dwarf2/symtab-producer.exp               | 4 +---
 .../gdb.dwarf2/template-specification-full-name.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/trace-crash.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/typeddwarf.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/utf-rust.exp                      | 4 +---
 gdb/testsuite/gdb.dwarf2/valop.exp                         | 4 +---
 gdb/testsuite/gdb.dwarf2/var-access.exp                    | 4 +---
 gdb/testsuite/gdb.dwarf2/variant.exp                       | 4 +---
 gdb/testsuite/gdb.dwarf2/varval.exp                        | 4 +---
 gdb/testsuite/gdb.dwarf2/void-type.exp                     | 4 +---
 gdb/testsuite/gdb.dwarf2/watch-notconst.exp                | 4 +---
 gdb/testsuite/gdb.linespec/break-asm-file.exp              | 4 +---
 gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp             | 4 +---
 gdb/testsuite/gdb.mi/mi-reg-undefined.exp                  | 4 +---
 gdb/testsuite/gdb.trace/entry-values.exp                   | 4 +---
 gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp        | 4 +---
 215 files changed, 215 insertions(+), 661 deletions(-)

diff --git a/gdb/testsuite/gdb.base/until-trailing-insns.exp b/gdb/testsuite/gdb.base/until-trailing-insns.exp
index a68ea995125..00386923a28 100644
--- a/gdb/testsuite/gdb.base/until-trailing-insns.exp
+++ b/gdb/testsuite/gdb.base/until-trailing-insns.exp
@@ -79,10 +79,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    unsupported "dwarf2 support required for this test"
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp
index 0cc84112a3a..3935d472389 100644
--- a/gdb/testsuite/gdb.compile/compile-ops.exp
+++ b/gdb/testsuite/gdb.compile/compile-ops.exp
@@ -20,9 +20,7 @@ load_lib compile-support.exp
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dbg.S
 
diff --git a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
index db7b06eec6f..a2b60e5c3e1 100644
--- a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
+++ b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
@@ -22,7 +22,7 @@ load_lib dwarf.exp
 
 if { [skip_cplus_tests] } { return }
 
-if { ![dwarf2_support] } { return }
+require dwarf2_support
 
 standard_testfile .cc .S
 set asm_file [standard_output_file ${srcfile2}]
diff --git a/gdb/testsuite/gdb.cp/namelessclass.exp b/gdb/testsuite/gdb.cp/namelessclass.exp
index 40e71d0b19a..bf4748cd4d3 100644
--- a/gdb/testsuite/gdb.cp/namelessclass.exp
+++ b/gdb/testsuite/gdb.cp/namelessclass.exp
@@ -24,9 +24,7 @@ if {[skip_cplus_tests]} {
 }
 
 # This test can only be run on x86-like targets which support DWARF.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
     return 0
diff --git a/gdb/testsuite/gdb.cp/nsalias.exp b/gdb/testsuite/gdb.cp/nsalias.exp
index 18abdbe0511..19a36b87df5 100644
--- a/gdb/testsuite/gdb.cp/nsalias.exp
+++ b/gdb/testsuite/gdb.cp/nsalias.exp
@@ -18,9 +18,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 if {[skip_cplus_tests]} {
     return
diff --git a/gdb/testsuite/gdb.dlang/circular.exp b/gdb/testsuite/gdb.dlang/circular.exp
index 102e1b8469a..e2b0b8ad691 100644
--- a/gdb/testsuite/gdb.dlang/circular.exp
+++ b/gdb/testsuite/gdb.dlang/circular.exp
@@ -18,12 +18,7 @@
 load_lib "d-support.exp"
 load_lib "dwarf.exp"
 
-if { [skip_d_tests] } { continue }
-
-# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require !skip_d_tests dwarf2_support
 
 standard_testfile circular.c circular-dw.S
 
diff --git a/gdb/testsuite/gdb.dlang/watch-loc.exp b/gdb/testsuite/gdb.dlang/watch-loc.exp
index 8aaf79d04c1..4b240b13fcf 100644
--- a/gdb/testsuite/gdb.dlang/watch-loc.exp
+++ b/gdb/testsuite/gdb.dlang/watch-loc.exp
@@ -18,12 +18,7 @@
 load_lib "d-support.exp"
 load_lib "dwarf.exp"
 
-if { [skip_d_tests] } { return -1 }
-
-# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require !skip_d_tests dwarf2_support
 
 standard_testfile watch-loc.c watch-loc-dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
index 9ca63bad703..a01cdfec29f 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile ada-linkage-name.c -debug.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
index 18f732576ca..e8052205ccd 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -debug.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
index 729ade94a71..d340fa5fa16 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -debug.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
index cc4c903c331..89e1f76ec79 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.exp b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
index d572c03123e..ea036517477 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-stride.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
index 9f9abdc6c86..d5d9041fced 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/atomic-type.exp b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
index 10e962184b6..7e5a32a2642 100644
--- a/gdb/testsuite/gdb.dwarf2/atomic-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
index c564d486b98..de9905e304d 100644
--- a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
+++ b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
index df675c7c812..a1e4d974f72 100644
--- a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
index 85830a44ee2..4242e08a296 100644
--- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Test DW_OP_call_frame_cfa.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 # This test can only be run on x86 targets.
 if {![is_x86_like_target]} {
     return 0  
diff --git a/gdb/testsuite/gdb.dwarf2/calling-convention.exp b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
index 0002001906e..4a3c0a55d8c 100644
--- a/gdb/testsuite/gdb.dwarf2/calling-convention.exp
+++ b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
@@ -27,9 +27,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp b/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
index a83638a06f1..a24112ad841 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
@@ -23,9 +23,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp b/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
index 8a2a2bdad91..7bc46ce6531 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -debug.S -foo.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
index dde52e4b2cc..d6ee18b0898 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -debug.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp
index f089b94f344..75dfb15ec20 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.exp
+++ b/gdb/testsuite/gdb.dwarf2/clztest.exp
@@ -19,9 +19,7 @@ standard_testfile .S
 set test "clztest"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
index a19986a7a60..ba8c2728747 100644
--- a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
+++ b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
@@ -21,9 +21,7 @@ load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use
 # gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/corrupt.exp b/gdb/testsuite/gdb.dwarf2/corrupt.exp
index a7822f86cdd..5966cfbb831 100644
--- a/gdb/testsuite/gdb.dwarf2/corrupt.exp
+++ b/gdb/testsuite/gdb.dwarf2/corrupt.exp
@@ -18,9 +18,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/count.exp b/gdb/testsuite/gdb.dwarf2/count.exp
index ffff96bfc11..0f13fb350f3 100644
--- a/gdb/testsuite/gdb.dwarf2/count.exp
+++ b/gdb/testsuite/gdb.dwarf2/count.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # Only run on targets which support dwarf and gas.
-if { ![dwarf2_support] } {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
index cc207ecea9d..1caae93f232 100644
--- a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
@@ -21,9 +21,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -debug.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
index 0cdc9e04ec0..b2ce802a4b1 100644
--- a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
+++ b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
@@ -19,9 +19,7 @@
 load_lib "dwarf.exp"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c cu-no-addrs.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp
index 475de3184bd..4ab29ec3030 100644
--- a/gdb/testsuite/gdb.dwarf2/data-loc.exp
+++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp b/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
index 187eb57281c..4e8ce14defb 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
@@ -17,10 +17,7 @@ load_lib dwarf.exp
 # Test with two aranges entries referring to the same CU.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
index bdee91e1fc1..adb302ee33a 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile _start.c debug-names.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
index 0f26497933c..ca57ecbfc70 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile _start.c debug-names.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
index 90e1afb746a..5af32c8d6f2 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile _start.c debug-names.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp
index 7830e2f3fe2..d866a3c502b 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile _start.c debug-names.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names.exp b/gdb/testsuite/gdb.dwarf2/debug-names.exp
index e7a032e3b9b..f718de78f98 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile _start.c debug-names.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dup-psym.exp b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
index 4d470f36ea6..cf7892a3974 100644
--- a/gdb/testsuite/gdb.dwarf2/dup-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Minimal DWARF-2 unit test
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
index 397cb38ceef..2ec3d11d8ac 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
index 7d67f9c8a47..78a344398b6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-align.exp b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
index aa54d482c17..c3e1eddd8bb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-align.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index c4985e0a49c..96266867dd5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 if {[skip_cplus_tests]} { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
index 71cedcbebc1..50a229fcbe0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Minimal DWARF-2 unit test
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index cfc3cffe665..185d96c2816 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
@@ -30,9 +30,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -other.S -dwarf.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
index d8c60416d9f..802103da3fe 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
index 990a3771dd1..3d2c16459c5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
index 6b3b4a72e2e..f4a349dc6ca 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .c -2.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
index 9020e40a1e3..9f3a05e47a7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Minimal DWARF-2 unit test
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
index bb66fe754ee..79058cafe7f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
index c98ee2a15b5..97674effc49 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
index 3070c383c08..43dec8de2a8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .c -debug.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index b56c2794688..58e1eccf27c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
index 6012d0f342c..a68307a4ce6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
index dec6873a1e3..1e87f670d45 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Minimal DWARF-2 unit test
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.exp b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
index e8e16196e97..80eb5fff92d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
index 5c2ebde6503..f0baf76bf4e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -21,9 +21,7 @@ if { [skip_cplus_tests] } { continue }
 
 load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S -main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
index 23b66a7e2af..e559f52dc0a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
@@ -20,9 +20,7 @@ load_lib dwarf.exp
 # in the length of the CU.  */
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
index 977e541a1c9..2f37d4d7955 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 # This test has hard-wired assumptions that host and build filenames are
 # the same, and assumes POSIX pathname syntax.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index d931b28b690..5a92fdf16d0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -25,9 +25,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
index 37da078f5b5..58792e130f7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
index 3654dba1b9b..01c5d1ca1e5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 # introduced by GCC PR debug/40659.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
index 4e5a50c8a6d..ec7522df533 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
index f9b1abbbc18..262b9728527 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # This test can only be run on x86_64 targets.
 if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
index d9a51f369fd..99c6a0061aa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Test G++ 4.1 producing DW_TAG_namespace with DW_AT_name "::".
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
index 57b1567f7a1..d154a93ce48 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
index 187ad8ac893..72525029981 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } {
     return -1
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
index 93378929165..0980f43078f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
index 579b68d4462..3bdac4c1cb8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Note: Inspired from dw2-basic.exp.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
index b172ef5e103..28381791c76 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile dw2-fixed-point.c dw2-fixed-point-dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
index 357717d2d52..36925da5d6d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
 # This is GDB PR symtab/13277.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
index b07070f7141..5f719d40116 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
index cb84bc1f0c7..6529effd6f0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
index 2e246141e30..1c0ab5d0fcd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 # introduced by GCC PR debug/40659.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
index 53d905dfd4f..bdd7070dca2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # This test can only be run on x86_64 targets.
 if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index bc64c8a31fd..3293d6152c0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -53,9 +53,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index 7325ec6d97f..5caa9cc9469 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -48,9 +48,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index ca18231d9f7..b98d6003c96 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -37,9 +37,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 7c33f432291..9f5007765eb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -26,9 +26,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
index 886b9cb64a2..cf81c0fa95b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S -main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index 973118589df..c3120a28223 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -27,9 +27,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index addb6f36e77..87c70a4e1fc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -26,9 +26,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
index 14b2709737e..fb1c5605e9b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
@@ -20,9 +20,7 @@ load_lib dwarf.exp
 
 # This test can only be run on targets that support DWARF-2 and use
 # gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
index 2cea30fc926..f5e5f80aa26 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Minimal DWARF-2 unit test
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
index dae8ea391ba..03d18cc0cda 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Intermixed 32-bit and 64-bit DWARF format tests.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index 904befed535..7e9151da73f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -26,9 +26,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index dd949a9026f..74faf112594 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -26,9 +26,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
index e696b495f53..ac0f4d374b5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index 0f9d3df96ed..2b473776599 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -15,10 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index dec27901ac8..510631c0364 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -21,9 +21,7 @@ if { [skip_cplus_tests] } { continue }
 
 load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
index 1e22e25c048..317ea21574e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
@@ -19,10 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
index 4aedfc545c3..8e3f1517988 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 # This testfile has reproducibility only with cc-with-index.sh.
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
index 92353ca487e..8f8dac6f94f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
@@ -21,9 +21,7 @@ load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use
 # gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
index 3a1818da868..a76d9653bad 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
index c13e502d547..5ee799b73c9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
index e7769e08e33..b10050f59b0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [prepare_for_testing "failed to prepare" "dw2-noloc" {dw2-noloc-main.c dw2-noloc.S} {nodebug}] } {
     return -1
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
index 2589b76aa2b..dd461c33d38 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
index 500eb031400..c1de099317f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Test DW_OP_call2 and DW_OP_call4, PR gdb/10640.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0   
-}
+require dwarf2_support
 
 standard_testfile .S main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
index ce028349109..535e74d255d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 set test "dw2-op-out-param"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
index a3fcd6808ea..17ccb648de2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0   
-}
+require dwarf2_support
 
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
index 7298097ce6c..ae6c58f2434 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
@@ -24,9 +24,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index 03b1346660a..5e44badb179 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -19,10 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
index 683349d256e..3d1fe8909f0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S -main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
index 12944a81f0c..ad45bbd94b5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
index 3ab12cdcaf2..0cbdaa01cc5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index 58d62f9e588..6fd837c97df 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
 # DW_AT_high_pc but with DW_AT_ranges instead.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index 8aefbc9e0ee..7db7cd2e3f6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -17,10 +17,7 @@ load_lib dwarf.exp
 # Test DW_AT_ranges in the context of a subprogram scope.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    unsupported "dwarf2 support required for this test"
-    return 0
-}
+require dwarf2_support
 
 if ![is_c_compiler_gcc] {
     unsupported "gcc required for this test"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
index f6560509ffc..bb92d7e66d6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
@@ -22,10 +22,7 @@ load_lib dwarf.exp
 # instead.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
index 032e0c8db59..79da50db77c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
 # Check psymtabs addrmaps generated from DW_AT_ranges of functions.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    unsupported "dwarf2 support required for this test"
-    return 0
-}
+require dwarf2_support
 
 standard_testfile -main.c .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index d82f700c94c..e195969fd68 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
 # Test that psymbols are made when DW_AT_ranges is used.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    unsupported "dwarf2 support required for this test"
-    return 0
-}
+require dwarf2_support
 
 if ![is_c_compiler_gcc] {
     unsupported "gcc required for this test"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
index 2fff9adc5e8..de272c875fd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
 # DW_AT_high_pc but with DW_AT_ranges instead.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0  
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
index 5a722b7a249..d9a552a8c9d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S -func.c -main.c
 lassign [function_range func_nofb \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
index 1dfde9f2cd8..06dd4dc3723 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # This test can only be run on x86_64 targets.
 if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
index 574e4c42739..a5258821df0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 # in DWARF.  clang-3.5.0-9.fc22.x86_64 produced it inside DW_AT_location.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
index 93a38ad4a55..d51cb8e0b7a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
index 5dd4707b004..083c8026fd3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
index 0ecf22de0de..dfb531371eb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
index 7a1f3a401fc..966de06fe17 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
@@ -32,9 +32,7 @@ load_lib dwarf.exp
 # end of main                                         func_end
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index 7befe1c850b..a3b9dd075e1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index 11092f95934..5073611e230 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -28,10 +28,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
index a85378282c9..2bbd66444a1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 # are unreferenced in code, and whose contents appear in .debug_str.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
index cac6e14d874..9d81155b5b0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
index 0181a612eb6..e532c4cb8f2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 standard_testfile .S
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
index 95d76454236..9f6a4ac251b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
index a353395592e..5fa6ee544b2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -foo.c dwz.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
index 531ebcdd80f..b94f5c95fe0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
@@ -30,9 +30,7 @@ load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use
 # gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
index f11d5297462..e921c105d0d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
@@ -20,9 +20,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
index 64aacd8fd7c..2b4fd0e3995 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index 19aaea98a65..c5a59f04aa8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -15,10 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 # The .c files use __attribute__.
 if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
index 2cedd0257e1..63e75fb6343 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
@@ -23,9 +23,7 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
 }
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
index 6309360355c..733116f18e0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
@@ -19,10 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require dwarf2_support
 
 if {[skip_shlib_tests]} {
     return 0
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
index c6dc98e21f6..92df97e949b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dwz.exp b/gdb/testsuite/gdb.dwarf2/dwz.exp
index 26819b2cdba..f0cf51cfc47 100644
--- a/gdb/testsuite/gdb.dwarf2/dwz.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwz.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c dwz.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
index 0bb2325b1f7..48fc619f869 100644
--- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # No remote host testing either.
 if {[is_remote host]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dwznolink.exp b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
index cdd95f32a3e..a03bff29068 100644
--- a/gdb/testsuite/gdb.dwarf2/dwznolink.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # No remote host testing either.
 if {[is_remote host]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
index 49064eb953e..88fd331781d 100644
--- a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
+++ b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
@@ -34,9 +34,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
index 90f6478f528..6e4a331eca8 100644
--- a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
index 89aaf463e2e..658a9a4bb79 100644
--- a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-};
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type.exp b/gdb/testsuite/gdb.dwarf2/enum-type.exp
index b91aaa9adf7..4c14c556cda 100644
--- a/gdb/testsuite/gdb.dwarf2/enum-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/enum-type.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
index ddb407cd1b4..6f1d07de925 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
@@ -21,9 +21,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index 5f1d58b912b..c3338c2951d 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -21,9 +21,7 @@ if [is_remote host] {
 }
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
index 9ee16af6a0c..c13450da03d 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
@@ -26,9 +26,7 @@ if [is_remote host] {
 }
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index 5ac723f784d..31c7bcafbaf 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -21,9 +21,7 @@ if [is_remote host] {
 }
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-mix.exp b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
index 223eab90864..a396747714d 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-mix.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .c -2.c
 set objfile [standard_output_file ${testfile}.o]
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index 104aba1d4ba..7bdf6271f5a 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -24,9 +24,7 @@ if [is_remote host] {
 }
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # We place the entire source code for the test into a single .c file,
 # but we generate the DWARF in two separate .S files.  Each .S is
diff --git a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
index 22a5f479c50..b29495aec0b 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
index c66820857cd..0ef2b134ea0 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
@@ -21,9 +21,7 @@ if [is_remote host] {
 }
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp
index b6a475de839..23669644df7 100644
--- a/gdb/testsuite/gdb.dwarf2/formdata16.exp
+++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
index 9ba00009cb5..c733318f14e 100644
--- a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
+++ b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
index 0915ee4de13..95093c8529c 100644
--- a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
@@ -30,9 +30,7 @@ require !use_gdb_stub
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
index d8ed180e31b..b9d99c314dc 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
index 248bb28aabf..4ecf4408c38 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
index a3dcb443c9e..8a12e35f353 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
index ee71dd79173..4c40742f7cd 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
index 09241676c4f..e3a613d6fe9 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/implptr.exp b/gdb/testsuite/gdb.dwarf2/implptr.exp
index 9da6afecaa2..a309994ecff 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Test DW_OP_GNU_implicit_pointer.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set csrcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 24e1341b8bf..266fef4e836 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index d895c7e1fbe..b30cf2ec48c 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp
index 5ca94e9ad78..985d8f70e72 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-array.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-array.S.
 standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp
index db9f770ac87..fb1a95838f9 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-const.S.
 standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp
index 26778593313..1532d11f5d9 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-global.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-global.S.
 standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
index 0961f0a510d..455b38cf8cd 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-struct.S.
 standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
index 0c542423901..052f893f5da 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-};
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
index 14047ab8eb9..521ccc3a8c0 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
@@ -1,9 +1,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-};
+require dwarf2_support
 
 standard_testfile main-foo.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
index 09c26ebaaf5..dea3f3fe461 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-};
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
index c7d3741dfb0..4806ae19a39 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
@@ -29,9 +29,7 @@ if [skip_cplus_tests] {
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-};
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
index 6f244d16abd..a23edc82849 100644
--- a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
index 85d8f0d0f1d..28b0e1d3237 100644
--- a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
@@ -21,9 +21,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/intbits.exp b/gdb/testsuite/gdb.dwarf2/intbits.exp
index c9b2a6d7437..c52e709316b 100644
--- a/gdb/testsuite/gdb.dwarf2/intbits.exp
+++ b/gdb/testsuite/gdb.dwarf2/intbits.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
index 02c0deba5cc..efb335ec35d 100644
--- a/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
@@ -18,9 +18,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Test with 32-bit and 64-bit DWARF.
 foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index e2ec8aa8e2a..f58be5dd2ec 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -56,9 +56,7 @@ if [skip_shlib_tests] {
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # gdb_test_file_name is the name of this file without the .exp
 # extension.  Use it to form basenames for the main program
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
index 7fe632fe5b6..ad03cae953a 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
@@ -26,9 +26,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Test with 32-bit and 64-bit DWARF.
 foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
index dbc94314534..9c007304e09 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
@@ -18,9 +18,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Test with 32-bit and 64-bit DWARF.
 foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp b/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
index 9c8d1a30f7c..0bcdffcdca6 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
@@ -17,9 +17,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Test with 32-bit and 64-bit DWARF.
 foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
index c86dce30384..db82bb529af 100644
--- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
+++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 # bogus file numbers.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp
index d73b5171820..c4e8a20cb61 100644
--- a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp
+++ b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp
@@ -20,9 +20,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
index 075022a8a93..d52250c9328 100644
--- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
+++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-4 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 if { [use_gdb_stub] } {
     unsupported "test requires running"
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index 7436ad4476c..34dd1b361d4 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index 800218cc821..f69f7ae9d0e 100644
--- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index 80877091d4e..9ecca831b68 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
index d89b6756ec2..115982248ca 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
@@ -21,9 +21,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .cc .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
index 2fb1f5d4232..5e95ac5ee1c 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
@@ -33,9 +33,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile void-type.c void-type.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
index edc1b4589ef..bcb21b0ee4a 100644
--- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp
+++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
index 895a0058951..17ee1a1dcff 100644
--- a/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
@@ -22,9 +22,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if { ![dwarf2_support] } {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
index 6902c9169fe..871a1867308 100644
--- a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
+++ b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # No remote host testing either.
 if {[is_remote host]} {
diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
index 18be85ffeed..7106f41e6bf 100644
--- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
@@ -19,7 +19,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} { return 0 }
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
index 0ff541a84b9..f732410e494 100644
--- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
+++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
index 683d12cbd64..28994f998c3 100644
--- a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -1.S -2.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
index 2ed7ac8e2bc..90acd39cb08 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
@@ -16,9 +16,7 @@ load_lib dwarf.exp
 # Test some DWARF piece operators.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 # This test can only be run on x86 targets.
 if {![is_x86_like_target]} {
     return 0  
diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp
index 3c0d45f6528..e6666b853aa 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces.exp
@@ -16,9 +16,7 @@ load_lib dwarf.exp
 # Test some DWARF piece operators.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 # This test can only be run on x86 targets.
 if {![is_x86_like_target]} {
     return 0  
diff --git a/gdb/testsuite/gdb.dwarf2/pr11465.exp b/gdb/testsuite/gdb.dwarf2/pr11465.exp
index 00bfb2a67ca..94d534430f4 100644
--- a/gdb/testsuite/gdb.dwarf2/pr11465.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr11465.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/pr13961.exp b/gdb/testsuite/gdb.dwarf2/pr13961.exp
index 5dcdb16238e..63c25954b7a 100644
--- a/gdb/testsuite/gdb.dwarf2/pr13961.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr13961.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp b/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
index 2cdc1873448..a8794192002 100644
--- a/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
+++ b/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
@@ -26,9 +26,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Test with 32-bit and 64-bit DWARF.
 foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
index 9c1becf8d37..7e7a610a809 100644
--- a/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
@@ -18,9 +18,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 foreach_with_prefix is_64 {false true} {
     if { $is_64 } {
diff --git a/gdb/testsuite/gdb.dwarf2/shortpiece.exp b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
index f16506adc44..dec219e95a8 100644
--- a/gdb/testsuite/gdb.dwarf2/shortpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index bead98e396b..243ce2f7f79 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/struct-decl.exp b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
index b6a12024599..83e14a6e6b7 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-decl.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
@@ -19,9 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -debug.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
index a229697c3c5..8c83c5dc781 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main-foo.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
index 1b8c19f2760..b67db8efeb2 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index f1291a5a99d..6ee27055045 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 if { [skip_cplus_tests] } { continue }
 
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
index c0fc5c47a52..cb9826e90df 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
@@ -23,9 +23,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Choose suitable integer registers for the test.
 
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
index 1087bc687b6..0e6ee6112ea 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
@@ -23,9 +23,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Choose suitable integer registers for the test.
 
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index ca71c592c84..50cb428dae5 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 load_lib gdb-python.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # This test can also only be run when we have python support in gdb,
 # but that test can only be done after gdb has started, below.
diff --git a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
index c88bf6bebd6..7e73fd0316a 100644
--- a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
@@ -22,9 +22,7 @@
 
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/trace-crash.exp b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
index 6a9fa33be9d..06c0c67a35e 100644
--- a/gdb/testsuite/gdb.dwarf2/trace-crash.exp
+++ b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 load_lib trace-support.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
index 998e0290e20..0b89741e361 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 set test "typeddwarf"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86 and amd64 targets (and not x32).
 if { [is_x86_like_target] } {
diff --git a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
index cb2b4195f96..8e5a1ab0111 100644
--- a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
+++ b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
@@ -20,9 +20,7 @@ load_lib dwarf.exp
 load_lib gdb-python.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile void-type.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/utf-rust.exp b/gdb/testsuite/gdb.dwarf2/utf-rust.exp
index fe4480ef759..9586d804f82 100644
--- a/gdb/testsuite/gdb.dwarf2/utf-rust.exp
+++ b/gdb/testsuite/gdb.dwarf2/utf-rust.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use
 # gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp
index 068e9a36116..848a19de60a 100644
--- a/gdb/testsuite/gdb.dwarf2/valop.exp
+++ b/gdb/testsuite/gdb.dwarf2/valop.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Test DW_OP_stack_value and DW_OP_implicit_value.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0  
-}
+require dwarf2_support
 # This test can only be run on x86 targets.
 if {![is_x86_like_target]} {
     return 0  
diff --git a/gdb/testsuite/gdb.dwarf2/var-access.exp b/gdb/testsuite/gdb.dwarf2/var-access.exp
index 4dbc96011a3..1cac2e56e52 100644
--- a/gdb/testsuite/gdb.dwarf2/var-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/var-access.exp
@@ -20,9 +20,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # Choose suitable integer registers for the test.
 
diff --git a/gdb/testsuite/gdb.dwarf2/variant.exp b/gdb/testsuite/gdb.dwarf2/variant.exp
index 400a5f83b27..3faeec1b371 100644
--- a/gdb/testsuite/gdb.dwarf2/variant.exp
+++ b/gdb/testsuite/gdb.dwarf2/variant.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use
 # gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/varval.exp b/gdb/testsuite/gdb.dwarf2/varval.exp
index 76657a7fcba..b27bf547add 100644
--- a/gdb/testsuite/gdb.dwarf2/varval.exp
+++ b/gdb/testsuite/gdb.dwarf2/varval.exp
@@ -18,9 +18,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0
-}
+require dwarf2_support
 
 # We'll place the output of Dwarf::assemble in varval.S.
 standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/void-type.exp b/gdb/testsuite/gdb.dwarf2/void-type.exp
index 38a491d6c80..369cd6e39c7 100644
--- a/gdb/testsuite/gdb.dwarf2/void-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/void-type.exp
@@ -27,9 +27,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
index 1ca8250ab4e..d7786bbf1b6 100644
--- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 set test "watch-notconst"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
-    return 0  
-}
+require dwarf2_support
 
 # This test can only be run on x86 targets.
 if { ![is_x86_like_target] } {
diff --git a/gdb/testsuite/gdb.linespec/break-asm-file.exp b/gdb/testsuite/gdb.linespec/break-asm-file.exp
index 1287f517308..d5694c48d72 100644
--- a/gdb/testsuite/gdb.linespec/break-asm-file.exp
+++ b/gdb/testsuite/gdb.linespec/break-asm-file.exp
@@ -24,9 +24,7 @@ set asm_file1 break-asm-file1.s
 set asm_file0 break-asm-file0.s
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 if  {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
 	  object {debug nowarnings optimize=-O0}] != ""} {
diff --git a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
index 369485feaae..336290ee1e1 100644
--- a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c
 set objsfile [standard_output_file ${testfile}.o]
diff --git a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
index 316909d1654..94db94289e2 100644
--- a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
+++ b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
@@ -17,9 +17,7 @@ load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 # This test can only be run on x86_64 targets.
 if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index 9a461ae7420..d7e5a89f281 100644
--- a/gdb/testsuite/gdb.trace/entry-values.exp
+++ b/gdb/testsuite/gdb.trace/entry-values.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c entry-values-dw.S
 
diff --git a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
index 2e88e4eb551..c000bb1d34e 100644
--- a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
+++ b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
@@ -16,9 +16,7 @@
 load_lib "trace-support.exp"
 load_lib dwarf.exp
 
-if {![dwarf2_support]} {
-    return 0
-}
+require dwarf2_support
 
 standard_testfile .c -dbg.S
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 07/79] Use require is_x86_like_target
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (5 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 06/79] Use require dwarf2_support Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 08/79] Use require skip_cplus_tests Tom Tromey
                   ` (73 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require is_x86_like_target".
---
 gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp     | 4 +---
 gdb/testsuite/gdb.arch/i386-disp-step.exp          | 5 +----
 gdb/testsuite/gdb.arch/i386-gnu-cfi.exp            | 5 +----
 gdb/testsuite/gdb.arch/i386-prologue.exp           | 5 +----
 gdb/testsuite/gdb.arch/i386-size-overlap.exp       | 5 +----
 gdb/testsuite/gdb.arch/i386-size.exp               | 5 +----
 gdb/testsuite/gdb.arch/i386-sse-stack-align.exp    | 5 +----
 gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp | 5 +----
 gdb/testsuite/gdb.arch/i386-unwind.exp             | 5 +----
 gdb/testsuite/gdb.dwarf2/callframecfa.exp          | 5 +----
 gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp  | 5 +----
 gdb/testsuite/gdb.dwarf2/pieces.exp                | 5 +----
 gdb/testsuite/gdb.dwarf2/valop.exp                 | 5 +----
 gdb/testsuite/gdb.dwarf2/watch-notconst.exp        | 6 +-----
 gdb/testsuite/gdb.reverse/i386-precsave.exp        | 8 +-------
 gdb/testsuite/gdb.reverse/i386-reverse.exp         | 7 +------
 gdb/testsuite/gdb.reverse/i387-env-reverse.exp     | 5 +----
 gdb/testsuite/gdb.reverse/i387-stack-reverse.exp   | 5 +----
 18 files changed, 18 insertions(+), 77 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
index cc19250e17f..9412b0a6418 100644
--- a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
+++ b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
@@ -16,9 +16,7 @@
 # [RFA] DWARF frame unwinder executes one too many rows
 # http://sourceware.org/ml/gdb-patches/2012-07/msg00650.html
 
-if { ![is_x86_like_target] } {
-    return 0
-}
+require is_x86_like_target
 
 set testfile "i386-cfi-notcurrent"
 set srcfile ${testfile}.S
diff --git a/gdb/testsuite/gdb.arch/i386-disp-step.exp b/gdb/testsuite/gdb.arch/i386-disp-step.exp
index 264544db0e2..02f74136507 100644
--- a/gdb/testsuite/gdb.arch/i386-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/i386-disp-step.exp
@@ -18,10 +18,7 @@
 # Test i386 displaced stepping.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping x86 displaced stepping tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
index 884b3b6cad2..56a4eee32a6 100644
--- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
+++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
@@ -23,10 +23,7 @@
 # Test i386 unwinder.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-gnu-cfi"
 set srcfilec ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index f522f864e9c..8e24b879fd1 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -21,10 +21,7 @@
 # Test i386 prologue analyzer.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 prologue tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-prologue"
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
index a3c62d63106..a5517b836f3 100644
--- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp
+++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
@@ -17,10 +17,7 @@
 
 # Test that GDB can handle overlapping sizes of symbols.
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp
index 9fcd7ba734c..0b616f68893 100644
--- a/gdb/testsuite/gdb.arch/i386-size.exp
+++ b/gdb/testsuite/gdb.arch/i386-size.exp
@@ -20,10 +20,7 @@
 
 # Test that GDB can see the sizes of symbols.
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-size"
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
index 009140f7067..7b931a6d2dd 100644
--- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.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 ![is_x86_like_target] {
-    verbose "Skipping x86 SSE stack alignment tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-sse-stack-align"
 set srcfile ${testfile}.S
diff --git a/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp b/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp
index d62a2408294..2b7bfbff76c 100644
--- a/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp
+++ b/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp
@@ -16,10 +16,7 @@
 standard_testfile ".S"
 
 # We can only test this if the target is i686 or x86_64 with -m32
-if { ![is_x86_like_target] } {
-    verbose "Skipping $testfile.exp"
-    return
-}
+require is_x86_like_target
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
index 2c6ba331561..04ef77132eb 100644
--- a/gdb/testsuite/gdb.arch/i386-unwind.exp
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -21,10 +21,7 @@
 # Test i386 unwinder.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
index 4242e08a296..9554a0f89a0 100644
--- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
@@ -17,11 +17,8 @@ load_lib dwarf.exp
 # Test DW_OP_call_frame_cfa.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
index 90acd39cb08..b0e01afd06e 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
@@ -16,11 +16,8 @@ load_lib dwarf.exp
 # Test some DWARF piece operators.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 set csrcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp
index e6666b853aa..9464f3f835f 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces.exp
@@ -16,11 +16,8 @@ load_lib dwarf.exp
 # Test some DWARF piece operators.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 set csrcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp
index 848a19de60a..1a58d26281e 100644
--- a/gdb/testsuite/gdb.dwarf2/valop.exp
+++ b/gdb/testsuite/gdb.dwarf2/valop.exp
@@ -17,11 +17,8 @@ load_lib dwarf.exp
 # Test DW_OP_stack_value and DW_OP_implicit_value.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
index d7786bbf1b6..0cf086b2ab8 100644
--- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
@@ -17,12 +17,8 @@ load_lib dwarf.exp
 set test "watch-notconst"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # This test can only be run on x86 targets.
-if { ![is_x86_like_target] } {
-    return 0
-}
+require dwarf2_support is_x86_like_target
 
 if { [prepare_for_testing "failed to prepare" "${test}" \
       {watch-notconst.c watch-notconst2.S} {nodebug}] } {
diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp
index 301e3b60208..3e9a402e5b6 100644
--- a/gdb/testsuite/gdb.reverse/i386-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp
@@ -20,13 +20,7 @@
 #
 
 # This test suitable only for process record-replay
-require supports_process_record
-
-
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 reverse tests."
-    return
-}
+require supports_process_record is_x86_like_target
 
 standard_testfile i386-reverse.c
 set precsave [standard_output_file i386.precsave]
diff --git a/gdb/testsuite/gdb.reverse/i386-reverse.exp b/gdb/testsuite/gdb.reverse/i386-reverse.exp
index 5fa7237af53..42ad28d44ea 100644
--- a/gdb/testsuite/gdb.reverse/i386-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i386-reverse.exp
@@ -19,12 +19,7 @@
 # This test tests some i386 general instructions for reverse execution.
 #
 
-require supports_reverse
-
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 reverse tests."
-    return
-}
+require supports_reverse is_x86_like_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
index 0decbfc2481..7bb17f70640 100644
--- a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
@@ -16,10 +16,7 @@
 # This file is part of the gdb testsuite.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i387 reverse float tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
index cdb481519ec..ee6507af74e 100644
--- a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp
@@ -16,10 +16,7 @@
 # This file is part of the gdb testsuite.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i387 reverse float tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 08/79] Use require skip_cplus_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (6 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 07/79] Use require is_x86_like_target Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  3:56   ` Kevin Buettner
  2023-01-12  2:59 ` [PATCH v2 09/79] Use require skip_shlib_tests Tom Tromey
                   ` (72 subsequent siblings)
  80 siblings, 1 reply; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_cplus_tests".
---
 gdb/testsuite/gdb.base/advance-until-multiple-locations.exp | 2 +-
 gdb/testsuite/gdb.base/align-c++.exp                        | 4 +---
 gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp     | 2 +-
 gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp       | 4 +---
 gdb/testsuite/gdb.base/info-types-c++.exp                   | 4 +---
 gdb/testsuite/gdb.base/max-depth-c++.exp                    | 4 +---
 gdb/testsuite/gdb.base/prologue.exp                         | 2 +-
 gdb/testsuite/gdb.base/psymtab.exp                          | 2 +-
 gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp       | 5 +----
 gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp     | 5 +----
 gdb/testsuite/gdb.compile/compile-cplus-inherit.exp         | 5 +----
 gdb/testsuite/gdb.compile/compile-cplus-member.exp          | 5 +----
 gdb/testsuite/gdb.compile/compile-cplus-method.exp          | 5 +----
 gdb/testsuite/gdb.compile/compile-cplus-namespace.exp       | 5 +----
 gdb/testsuite/gdb.compile/compile-cplus-nested.exp          | 5 +----
 gdb/testsuite/gdb.compile/compile-cplus-virtual.exp         | 5 +----
 gdb/testsuite/gdb.cp/align.exp                              | 2 +-
 gdb/testsuite/gdb.cp/ambiguous.exp                          | 2 +-
 gdb/testsuite/gdb.cp/annota2.exp                            | 2 +-
 gdb/testsuite/gdb.cp/annota3.exp                            | 2 +-
 gdb/testsuite/gdb.cp/anon-ns.exp                            | 2 +-
 gdb/testsuite/gdb.cp/anon-union.exp                         | 2 +-
 gdb/testsuite/gdb.cp/arg-reference.exp                      | 2 +-
 gdb/testsuite/gdb.cp/array-indices.exp                      | 2 +-
 gdb/testsuite/gdb.cp/array-repeat.exp                       | 2 +-
 gdb/testsuite/gdb.cp/bool.exp                               | 2 +-
 gdb/testsuite/gdb.cp/break-f-std-string.exp                 | 2 +-
 gdb/testsuite/gdb.cp/breakpoint-locs.exp                    | 2 +-
 gdb/testsuite/gdb.cp/breakpoint.exp                         | 2 +-
 gdb/testsuite/gdb.cp/call-c.exp                             | 2 +-
 gdb/testsuite/gdb.cp/call-method-register.exp               | 2 +-
 gdb/testsuite/gdb.cp/casts.exp                              | 2 +-
 gdb/testsuite/gdb.cp/chained-calls.exp                      | 2 +-
 gdb/testsuite/gdb.cp/class2.exp                             | 2 +-
 gdb/testsuite/gdb.cp/classes.exp                            | 2 +-
 gdb/testsuite/gdb.cp/cmpd-minsyms.exp                       | 2 +-
 gdb/testsuite/gdb.cp/constexpr-field.exp                    | 2 +-
 gdb/testsuite/gdb.cp/cp-relocate.exp                        | 2 +-
 gdb/testsuite/gdb.cp/cpcompletion.exp                       | 2 +-
 gdb/testsuite/gdb.cp/cplabel.exp                            | 2 +-
 gdb/testsuite/gdb.cp/cplusfuncs.exp                         | 2 +-
 gdb/testsuite/gdb.cp/cpsizeof.exp                           | 2 +-
 gdb/testsuite/gdb.cp/ctti.exp                               | 2 +-
 gdb/testsuite/gdb.cp/debug-expr.exp                         | 2 +-
 gdb/testsuite/gdb.cp/demangle.exp                           | 2 +-
 gdb/testsuite/gdb.cp/derivation.exp                         | 2 +-
 gdb/testsuite/gdb.cp/disasm-func-name.exp                   | 2 +-
 gdb/testsuite/gdb.cp/dispcxx.exp                            | 2 +-
 gdb/testsuite/gdb.cp/ena-dis-br-range.exp                   | 2 +-
 gdb/testsuite/gdb.cp/enum-class.exp                         | 2 +-
 gdb/testsuite/gdb.cp/exceptprint.exp                        | 4 +---
 gdb/testsuite/gdb.cp/expand-sals.exp                        | 2 +-
 gdb/testsuite/gdb.cp/extern-c.exp                           | 2 +-
 gdb/testsuite/gdb.cp/filename.exp                           | 2 +-
 gdb/testsuite/gdb.cp/formatted-ref.exp                      | 2 +-
 gdb/testsuite/gdb.cp/gdb1355.exp                            | 2 +-
 gdb/testsuite/gdb.cp/gdb2384.exp                            | 3 +--
 gdb/testsuite/gdb.cp/gdb2495.exp                            | 2 +-
 gdb/testsuite/gdb.cp/hang.exp                               | 2 +-
 gdb/testsuite/gdb.cp/impl-this.exp                          | 2 +-
 gdb/testsuite/gdb.cp/incomplete-type-overload.exp           | 4 +---
 gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp             | 4 +---
 gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp             | 4 +---
 gdb/testsuite/gdb.cp/inherit.exp                            | 2 +-
 gdb/testsuite/gdb.cp/iostream.exp                           | 2 +-
 gdb/testsuite/gdb.cp/local.exp                              | 2 +-
 gdb/testsuite/gdb.cp/m-data.exp                             | 2 +-
 gdb/testsuite/gdb.cp/m-static.exp                           | 2 +-
 gdb/testsuite/gdb.cp/many-args.exp                          | 2 +-
 gdb/testsuite/gdb.cp/mb-ctor.exp                            | 2 +-
 gdb/testsuite/gdb.cp/mb-inline.exp                          | 2 +-
 gdb/testsuite/gdb.cp/member-name.exp                        | 2 +-
 gdb/testsuite/gdb.cp/member-ptr.exp                         | 2 +-
 gdb/testsuite/gdb.cp/meth-typedefs.exp                      | 2 +-
 gdb/testsuite/gdb.cp/method.exp                             | 2 +-
 gdb/testsuite/gdb.cp/method2.exp                            | 2 +-
 gdb/testsuite/gdb.cp/misc.exp                               | 2 +-
 gdb/testsuite/gdb.cp/namelessclass.exp                      | 6 +-----
 gdb/testsuite/gdb.cp/namespace.exp                          | 2 +-
 gdb/testsuite/gdb.cp/nested-class-func-class.exp            | 2 +-
 gdb/testsuite/gdb.cp/nested-types.exp                       | 2 +-
 gdb/testsuite/gdb.cp/nextoverthrow.exp                      | 2 +-
 gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp                 | 4 +---
 gdb/testsuite/gdb.cp/non-trivial-retval.exp                 | 2 +-
 gdb/testsuite/gdb.cp/nsalias.exp                            | 6 +-----
 gdb/testsuite/gdb.cp/overload-const.exp                     | 2 +-
 gdb/testsuite/gdb.cp/overload.exp                           | 2 +-
 gdb/testsuite/gdb.cp/ovldbreak.exp                          | 2 +-
 gdb/testsuite/gdb.cp/ovsrch.exp                             | 2 +-
 gdb/testsuite/gdb.cp/pass-by-ref-2.exp                      | 5 +----
 gdb/testsuite/gdb.cp/pass-by-ref.exp                        | 5 +----
 gdb/testsuite/gdb.cp/pointer-to-member.exp                  | 2 +-
 gdb/testsuite/gdb.cp/pr-1023.exp                            | 2 +-
 gdb/testsuite/gdb.cp/pr-1210.exp                            | 2 +-
 gdb/testsuite/gdb.cp/pr-574.exp                             | 2 +-
 gdb/testsuite/gdb.cp/pr10728.exp                            | 2 +-
 gdb/testsuite/gdb.cp/pr17132.exp                            | 2 +-
 gdb/testsuite/gdb.cp/pr17494.exp                            | 2 +-
 gdb/testsuite/gdb.cp/pr9067.exp                             | 2 +-
 gdb/testsuite/gdb.cp/pr9631.exp                             | 2 +-
 gdb/testsuite/gdb.cp/print-demangle.exp                     | 2 +-
 gdb/testsuite/gdb.cp/print-method-args.exp                  | 2 +-
 gdb/testsuite/gdb.cp/printmethod.exp                        | 2 +-
 gdb/testsuite/gdb.cp/psmang.exp                             | 2 +-
 gdb/testsuite/gdb.cp/psymtab-parameter.exp                  | 2 +-
 gdb/testsuite/gdb.cp/ptype-cv-cp.exp                        | 2 +-
 gdb/testsuite/gdb.cp/ptype-flags.exp                        | 2 +-
 gdb/testsuite/gdb.cp/punctuator.exp                         | 2 +-
 gdb/testsuite/gdb.cp/re-set-overloaded.exp                  | 3 +--
 gdb/testsuite/gdb.cp/ref-params.exp                         | 2 +-
 gdb/testsuite/gdb.cp/ref-types.exp                          | 2 +-
 gdb/testsuite/gdb.cp/rtti.exp                               | 2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-casts.exp                   | 2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-overload.exp                | 2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-params.exp                  | 2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp                  | 2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-types.exp                   | 2 +-
 gdb/testsuite/gdb.cp/scope-err.exp                          | 4 +---
 gdb/testsuite/gdb.cp/static-method.exp                      | 2 +-
 gdb/testsuite/gdb.cp/static-print-quit.exp                  | 2 +-
 gdb/testsuite/gdb.cp/static-typedef-print.exp               | 2 +-
 gdb/testsuite/gdb.cp/stub-array-size.exp                    | 2 +-
 gdb/testsuite/gdb.cp/subtypes.exp                           | 2 +-
 gdb/testsuite/gdb.cp/temargs.exp                            | 4 +---
 gdb/testsuite/gdb.cp/templates.exp                          | 2 +-
 gdb/testsuite/gdb.cp/typed-enum.exp                         | 2 +-
 gdb/testsuite/gdb.cp/typedef-base.exp                       | 2 +-
 gdb/testsuite/gdb.cp/typedef-operator.exp                   | 2 +-
 gdb/testsuite/gdb.cp/typeid.exp                             | 4 +---
 gdb/testsuite/gdb.cp/var-tag.exp                            | 2 +-
 gdb/testsuite/gdb.cp/virtbase.exp                           | 2 +-
 gdb/testsuite/gdb.cp/virtbase2.exp                          | 2 +-
 gdb/testsuite/gdb.cp/virtfunc.exp                           | 2 +-
 gdb/testsuite/gdb.cp/virtfunc2.exp                          | 2 +-
 gdb/testsuite/gdb.cp/watch-cp.exp                           | 2 +-
 gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp                     | 2 +-
 gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp                  | 2 +-
 gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp      | 2 +-
 gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp         | 2 +-
 gdb/testsuite/gdb.dwarf2/implptrconst.exp                   | 2 +-
 gdb/testsuite/gdb.dwarf2/implptrpiece.exp                   | 2 +-
 gdb/testsuite/gdb.dwarf2/implref-array.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/implref-const.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/implref-global.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/implref-struct.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/imported-unit.exp                  | 4 +---
 gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp          | 2 +-
 gdb/testsuite/gdb.dwarf2/method-ptr.exp                     | 2 +-
 gdb/testsuite/gdb.dwarf2/missing-sig-type.exp               | 2 +-
 gdb/testsuite/gdb.dwarf2/nostaticblock.exp                  | 2 +-
 gdb/testsuite/gdb.dwarf2/nullptr_t.exp                      | 2 +-
 gdb/testsuite/gdb.dwarf2/staticvirtual.exp                  | 2 +-
 gdb/testsuite/gdb.dwarf2/subrange.exp                       | 2 +-
 gdb/testsuite/gdb.guile/scm-value-cc.exp                    | 2 +-
 gdb/testsuite/gdb.linespec/break-ask.exp                    | 5 +----
 gdb/testsuite/gdb.linespec/cpexplicit.exp                   | 5 +----
 gdb/testsuite/gdb.linespec/linespec.exp                     | 5 +----
 gdb/testsuite/gdb.linespec/ls-dollar.exp                    | 5 +----
 gdb/testsuite/gdb.linespec/skip-two.exp                     | 5 +----
 gdb/testsuite/gdb.mi/gdb792.exp                             | 2 +-
 gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp            | 2 +-
 gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp        | 2 +-
 gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp                 | 4 +---
 gdb/testsuite/gdb.mi/mi-var-cp.exp                          | 2 +-
 gdb/testsuite/gdb.mi/mi-var-rtti.exp                        | 2 +-
 gdb/testsuite/gdb.python/py-explore-cc.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp         | 2 +-
 gdb/testsuite/gdb.python/py-template.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-typeprint.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-value-cc.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-xmethods.exp                    | 5 +----
 171 files changed, 171 insertions(+), 265 deletions(-)

diff --git a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
index 181ab334be5..ef60fc67951 100644
--- a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
+++ b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
@@ -18,7 +18,7 @@
 
 standard_testfile .cc
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 	  {debug c++}] } {
diff --git a/gdb/testsuite/gdb.base/align-c++.exp b/gdb/testsuite/gdb.base/align-c++.exp
index c017501bde9..cb9504ab546 100644
--- a/gdb/testsuite/gdb.base/align-c++.exp
+++ b/gdb/testsuite/gdb.base/align-c++.exp
@@ -19,9 +19,7 @@
 # compiler.
 
 # Only test C++ if we are able.
-if { [skip_cplus_tests] } {
-    return -1
-}
+require !skip_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/align.exp.tcl
diff --git a/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp b/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
index 0a902c86637..a4d168db0fa 100644
--- a/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
+++ b/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
@@ -23,7 +23,7 @@
 #
 # test running programs
 #
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp b/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp
index 6d7f373a0d3..9b0be13f3f7 100644
--- a/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp
+++ b/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp
@@ -16,9 +16,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.
-if { [skip_cplus_tests] } {
-    return -1
-}
+require !skip_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/infcall-nested-structs.exp.tcl
diff --git a/gdb/testsuite/gdb.base/info-types-c++.exp b/gdb/testsuite/gdb.base/info-types-c++.exp
index a6bc43e14d9..4b1049b3e59 100644
--- a/gdb/testsuite/gdb.base/info-types-c++.exp
+++ b/gdb/testsuite/gdb.base/info-types-c++.exp
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.
-if { [skip_cplus_tests] } {
-    return -1
-}
+require !skip_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/info-types.exp.tcl
diff --git a/gdb/testsuite/gdb.base/max-depth-c++.exp b/gdb/testsuite/gdb.base/max-depth-c++.exp
index 52c4a41c749..a959b81b639 100644
--- a/gdb/testsuite/gdb.base/max-depth-c++.exp
+++ b/gdb/testsuite/gdb.base/max-depth-c++.exp
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.
-if { [skip_cplus_tests] } {
-    return -1
-}
+require !skip_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/max-depth.exp.tcl
diff --git a/gdb/testsuite/gdb.base/prologue.exp b/gdb/testsuite/gdb.base/prologue.exp
index e1872d4d499..adee2573cee 100644
--- a/gdb/testsuite/gdb.base/prologue.exp
+++ b/gdb/testsuite/gdb.base/prologue.exp
@@ -14,7 +14,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_cplus_tests] } {  return }
+require !skip_cplus_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/psymtab.exp b/gdb/testsuite/gdb.base/psymtab.exp
index 27ab21c4428..99f233ffb6b 100644
--- a/gdb/testsuite/gdb.base/psymtab.exp
+++ b/gdb/testsuite/gdb.base/psymtab.exp
@@ -24,7 +24,7 @@
 #
 
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile psymtab1.c psymtab2.c
 
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp
index 85c123c4965..912deabd9b7 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp
index 48ed04ecaca..a1baccdbc5b 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++ additional_flags=-std=c++11}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp
index 605dfb68022..78501c6a5f4 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-member.exp b/gdb/testsuite/gdb.compile/compile-cplus-member.exp
index dbc92e235d7..356d39f5008 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-member.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-member.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-method.exp b/gdb/testsuite/gdb.compile/compile-cplus-method.exp
index c23ac26db45..8261a14ac8f 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-method.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-method.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp
index c99b2e4fdc3..ffc13332809 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp
index def6596d45b..c827dcebe54 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp
index 4ea80d961b3..33fec029257 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp
@@ -19,10 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.cp/align.exp b/gdb/testsuite/gdb.cp/align.exp
index f1c8f5fd19d..b75024dec6b 100644
--- a/gdb/testsuite/gdb.cp/align.exp
+++ b/gdb/testsuite/gdb.cp/align.exp
@@ -18,7 +18,7 @@
 # This tests that C++ alignof works in gdb, and that it agrees with
 # the compiler.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 # The types we're going to test.
 
diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp
index 966d99ae595..e132e73d80b 100644
--- a/gdb/testsuite/gdb.cp/ambiguous.exp
+++ b/gdb/testsuite/gdb.cp/ambiguous.exp
@@ -19,7 +19,7 @@
 # about the field or baseclass being ambiguous is emitted at the right
 # times.
 
-if { [skip_cplus_tests] } {  return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 51cf92ae1a1..160d26903d8 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index b728c4e4708..5a5f3ff38a4 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/anon-ns.exp b/gdb/testsuite/gdb.cp/anon-ns.exp
index a0d1245d3f4..d9017533a44 100644
--- a/gdb/testsuite/gdb.cp/anon-ns.exp
+++ b/gdb/testsuite/gdb.cp/anon-ns.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 standard_testfile .cc anon-ns2.cc
 
diff --git a/gdb/testsuite/gdb.cp/anon-union.exp b/gdb/testsuite/gdb.cp/anon-union.exp
index 521ee4e187c..f5ec03d49ec 100644
--- a/gdb/testsuite/gdb.cp/anon-union.exp
+++ b/gdb/testsuite/gdb.cp/anon-union.exp
@@ -23,7 +23,7 @@
 #
 
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/arg-reference.exp b/gdb/testsuite/gdb.cp/arg-reference.exp
index c72196ef086..21a89bde85f 100644
--- a/gdb/testsuite/gdb.cp/arg-reference.exp
+++ b/gdb/testsuite/gdb.cp/arg-reference.exp
@@ -21,7 +21,7 @@
 # Test G++ has compiled debuginfo without a C++ '&' reference where it should
 # not be.  GCC Bug 33537.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/array-indices.exp b/gdb/testsuite/gdb.cp/array-indices.exp
index e9723d953b6..8f88f947549 100644
--- a/gdb/testsuite/gdb.cp/array-indices.exp
+++ b/gdb/testsuite/gdb.cp/array-indices.exp
@@ -15,7 +15,7 @@
 
 # Test the printing of element indices in C++ arrays.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 set lang c++
 
diff --git a/gdb/testsuite/gdb.cp/array-repeat.exp b/gdb/testsuite/gdb.cp/array-repeat.exp
index dac0c68a4e9..8c71149c922 100644
--- a/gdb/testsuite/gdb.cp/array-repeat.exp
+++ b/gdb/testsuite/gdb.cp/array-repeat.exp
@@ -15,7 +15,7 @@
 
 # Test the detection and printing of repeated elements in C++ arrays.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 set lang c++
 
diff --git a/gdb/testsuite/gdb.cp/bool.exp b/gdb/testsuite/gdb.cp/bool.exp
index 350c6549855..27f35322035 100644
--- a/gdb/testsuite/gdb.cp/bool.exp
+++ b/gdb/testsuite/gdb.cp/bool.exp
@@ -20,7 +20,7 @@
 
 # Test returning bool.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/break-f-std-string.exp b/gdb/testsuite/gdb.cp/break-f-std-string.exp
index f687416dbf6..57006f059b8 100644
--- a/gdb/testsuite/gdb.cp/break-f-std-string.exp
+++ b/gdb/testsuite/gdb.cp/break-f-std-string.exp
@@ -58,7 +58,7 @@
 
 standard_testfile .cc
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 # CXX11_ABI specifies the value to define _GLIBCXX_USE_CXX11_ABI as.
 
diff --git a/gdb/testsuite/gdb.cp/breakpoint-locs.exp b/gdb/testsuite/gdb.cp/breakpoint-locs.exp
index 18b03a0df7f..af1711ccbdb 100644
--- a/gdb/testsuite/gdb.cp/breakpoint-locs.exp
+++ b/gdb/testsuite/gdb.cp/breakpoint-locs.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc breakpoint-locs-2.cc
 
diff --git a/gdb/testsuite/gdb.cp/breakpoint.exp b/gdb/testsuite/gdb.cp/breakpoint.exp
index 2d1040d69c2..46762fc8b1c 100644
--- a/gdb/testsuite/gdb.cp/breakpoint.exp
+++ b/gdb/testsuite/gdb.cp/breakpoint.exp
@@ -17,7 +17,7 @@
 
 # This contains tests for breakpoints in C++.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/call-c.exp b/gdb/testsuite/gdb.cp/call-c.exp
index 15c136099cc..9fdbd00537e 100644
--- a/gdb/testsuite/gdb.cp/call-c.exp
+++ b/gdb/testsuite/gdb.cp/call-c.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc call-c-1.c
 set objfilec [standard_output_file ${testfile}-1.o]
diff --git a/gdb/testsuite/gdb.cp/call-method-register.exp b/gdb/testsuite/gdb.cp/call-method-register.exp
index 627403fc8e3..6f0f5214fe3 100644
--- a/gdb/testsuite/gdb.cp/call-method-register.exp
+++ b/gdb/testsuite/gdb.cp/call-method-register.exp
@@ -16,7 +16,7 @@
 # Test callling a method on a variable that has been put in a
 # register.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 load_lib dwarf.exp
diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp
index a13f662ba6b..35305d75ff1 100644
--- a/gdb/testsuite/gdb.cp/casts.exp
+++ b/gdb/testsuite/gdb.cp/casts.exp
@@ -25,7 +25,7 @@
 #
 
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc casts03.cc
 
diff --git a/gdb/testsuite/gdb.cp/chained-calls.exp b/gdb/testsuite/gdb.cp/chained-calls.exp
index d131345dc6b..f147b365776 100644
--- a/gdb/testsuite/gdb.cp/chained-calls.exp
+++ b/gdb/testsuite/gdb.cp/chained-calls.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.exp
index 6270be47c13..ea7cdf16a04 100644
--- a/gdb/testsuite/gdb.cp/class2.exp
+++ b/gdb/testsuite/gdb.cp/class2.exp
@@ -13,7 +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_cplus_tests] } { return }
+require !skip_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index d23c7d347ad..de7fa2eb14b 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -18,7 +18,7 @@
 
 set nl "\[\r\n\]+"
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp
index 6433ccb8cfe..70779cecfa4 100644
--- a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp
+++ b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 # Tests for c++/12273, breakpoint/12803
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/constexpr-field.exp b/gdb/testsuite/gdb.cp/constexpr-field.exp
index 14801d3bfb9..387636fd45c 100644
--- a/gdb/testsuite/gdb.cp/constexpr-field.exp
+++ b/gdb/testsuite/gdb.cp/constexpr-field.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/cp-relocate.exp b/gdb/testsuite/gdb.cp/cp-relocate.exp
index d46bf767d82..3846aa2aebc 100644
--- a/gdb/testsuite/gdb.cp/cp-relocate.exp
+++ b/gdb/testsuite/gdb.cp/cp-relocate.exp
@@ -18,7 +18,7 @@
 standard_testfile .cc
 append binfile .o
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {c++ debug}] != "" } {
      untested "failed to compile"
diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp
index 931f376a23d..9d93d598430 100644
--- a/gdb/testsuite/gdb.cp/cpcompletion.exp
+++ b/gdb/testsuite/gdb.cp/cpcompletion.exp
@@ -51,7 +51,7 @@ proc test_class_complete {class expr name matches} {
     }
 }
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile pr9594.cc
 
diff --git a/gdb/testsuite/gdb.cp/cplabel.exp b/gdb/testsuite/gdb.cp/cplabel.exp
index 4c67cde8665..c29b47cdf4c 100644
--- a/gdb/testsuite/gdb.cp/cplabel.exp
+++ b/gdb/testsuite/gdb.cp/cplabel.exp
@@ -15,7 +15,7 @@
 
 # Tests for breakpoint on labels in methods.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp
index b3d798bbd67..f197e1148e7 100644
--- a/gdb/testsuite/gdb.cp/cplusfuncs.exp
+++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp
@@ -16,7 +16,7 @@
 # This file was written by Fred Fish. (fnf@cygnus.com)
 # Adapted for g++ 3.0 ABI by Michael Chastain. (chastain@redhat.com)
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/cpsizeof.exp b/gdb/testsuite/gdb.cp/cpsizeof.exp
index c452b57163c..d235528878b 100644
--- a/gdb/testsuite/gdb.cp/cpsizeof.exp
+++ b/gdb/testsuite/gdb.cp/cpsizeof.exp
@@ -16,7 +16,7 @@
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] } {
      return -1
diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp
index 966c7490b57..a7cb9885258 100644
--- a/gdb/testsuite/gdb.cp/ctti.exp
+++ b/gdb/testsuite/gdb.cp/ctti.exp
@@ -21,7 +21,7 @@
 
 # Call to template instantiations.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile cttiadd.cc cttiadd1.cc cttiadd2.cc cttiadd3.cc
 
diff --git a/gdb/testsuite/gdb.cp/debug-expr.exp b/gdb/testsuite/gdb.cp/debug-expr.exp
index a7938a42a14..300818e1d87 100644
--- a/gdb/testsuite/gdb.cp/debug-expr.exp
+++ b/gdb/testsuite/gdb.cp/debug-expr.exp
@@ -15,7 +15,7 @@
 
 # Test "set debug expr 1" on c++ expressions.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 gdb_start
 gdb_test_no_output "set language c++"
diff --git a/gdb/testsuite/gdb.cp/demangle.exp b/gdb/testsuite/gdb.cp/demangle.exp
index 3093640cde0..28a0fe85ee1 100644
--- a/gdb/testsuite/gdb.cp/demangle.exp
+++ b/gdb/testsuite/gdb.cp/demangle.exp
@@ -15,7 +15,7 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 ### The demangling style we last sent to GDB.
 set current_demangling_style none
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index 2f7dd4c946d..bb482e69e9f 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -28,7 +28,7 @@ set nl "\[\r\n\]+"
 # Start program.
 
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/disasm-func-name.exp b/gdb/testsuite/gdb.cp/disasm-func-name.exp
index ba4296d27b2..3b8773fbf74 100644
--- a/gdb/testsuite/gdb.cp/disasm-func-name.exp
+++ b/gdb/testsuite/gdb.cp/disasm-func-name.exp
@@ -18,7 +18,7 @@
 # Test that the disassembler correctly demangles C++ function names in
 # it's header line.
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/dispcxx.exp b/gdb/testsuite/gdb.cp/dispcxx.exp
index 5ae2a223443..c079b0cd6a2 100644
--- a/gdb/testsuite/gdb.cp/dispcxx.exp
+++ b/gdb/testsuite/gdb.cp/dispcxx.exp
@@ -13,7 +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_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp
index 94f94e64a59..a8042c44b02 100644
--- a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp
+++ b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp
@@ -21,7 +21,7 @@
 # multiple locations and breakpoints are found in
 # gdb.base/ena-dis-br.exp.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/enum-class.exp b/gdb/testsuite/gdb.cp/enum-class.exp
index 67e8656616f..badc2dc2051 100644
--- a/gdb/testsuite/gdb.cp/enum-class.exp
+++ b/gdb/testsuite/gdb.cp/enum-class.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/exceptprint.exp b/gdb/testsuite/gdb.cp/exceptprint.exp
index 49fe02f9857..7e19d42561e 100644
--- a/gdb/testsuite/gdb.cp/exceptprint.exp
+++ b/gdb/testsuite/gdb.cp/exceptprint.exp
@@ -15,9 +15,7 @@
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    return -1
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
diff --git a/gdb/testsuite/gdb.cp/expand-sals.exp b/gdb/testsuite/gdb.cp/expand-sals.exp
index 0d74571e3b9..deb9c94cc8e 100644
--- a/gdb/testsuite/gdb.cp/expand-sals.exp
+++ b/gdb/testsuite/gdb.cp/expand-sals.exp
@@ -13,7 +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_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 set srcfile expand-sals.cc
 if { [prepare_for_testing "failed to prepare" expand-sals $srcfile {debug c++}] } {
diff --git a/gdb/testsuite/gdb.cp/extern-c.exp b/gdb/testsuite/gdb.cp/extern-c.exp
index bdc869725d2..f380e90ace8 100644
--- a/gdb/testsuite/gdb.cp/extern-c.exp
+++ b/gdb/testsuite/gdb.cp/extern-c.exp
@@ -15,7 +15,7 @@
 
 # Test breakpoints on extern "C" functions implemented in C++.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filename.exp
index 54cf4d114b1..f34f162456f 100644
--- a/gdb/testsuite/gdb.cp/filename.exp
+++ b/gdb/testsuite/gdb.cp/filename.exp
@@ -13,7 +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_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/formatted-ref.exp b/gdb/testsuite/gdb.cp/formatted-ref.exp
index a9494d83f5e..07939637d68 100644
--- a/gdb/testsuite/gdb.cp/formatted-ref.exp
+++ b/gdb/testsuite/gdb.cp/formatted-ref.exp
@@ -28,7 +28,7 @@
 # operand.
 
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/gdb1355.exp b/gdb/testsuite/gdb.cp/gdb1355.exp
index 724a25180eb..1dda4c99ac9 100644
--- a/gdb/testsuite/gdb.cp/gdb1355.exp
+++ b/gdb/testsuite/gdb.cp/gdb1355.exp
@@ -21,7 +21,7 @@
 set ws "\[\r\n\t \]*"
 set nl "\[\r\n\]+"
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp
index 3e43d1d0366..6eb6292272b 100644
--- a/gdb/testsuite/gdb.cp/gdb2384.exp
+++ b/gdb/testsuite/gdb.cp/gdb2384.exp
@@ -21,8 +21,7 @@
 #
 # PR c++/9489.
 
-if { [skip_cplus_tests] } { continue }
-if { [skip_shlib_tests] } { continue }
+require !skip_cplus_tests !skip_shlib_tests
 
 standard_testfile .cc gdb2384-base.cc
 
diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp
index 639cee32e23..5d9cedbde9f 100644
--- a/gdb/testsuite/gdb.cp/gdb2495.exp
+++ b/gdb/testsuite/gdb.cp/gdb2495.exp
@@ -31,7 +31,7 @@
 
 # This test is largely based of gdb.base/callfuncs.exp.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 if [target_info exists gdb,nosignals] {
     verbose "Skipping gdb2495.exp because of nosignals."
diff --git a/gdb/testsuite/gdb.cp/hang.exp b/gdb/testsuite/gdb.cp/hang.exp
index e4ff996a285..95a0424d652 100644
--- a/gdb/testsuite/gdb.cp/hang.exp
+++ b/gdb/testsuite/gdb.cp/hang.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile hang1.cc hang2.cc hang3.cc
 
diff --git a/gdb/testsuite/gdb.cp/impl-this.exp b/gdb/testsuite/gdb.cp/impl-this.exp
index a37a8c6d104..14c3cb4b331 100644
--- a/gdb/testsuite/gdb.cp/impl-this.exp
+++ b/gdb/testsuite/gdb.cp/impl-this.exp
@@ -18,7 +18,7 @@
 # Test expressions which assume an implicit "this" with a qualified
 # name.
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
index a2b60e5c3e1..5dfd671592c 100644
--- a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
+++ b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
@@ -20,9 +20,7 @@
 
 load_lib dwarf.exp
 
-if { [skip_cplus_tests] } { return }
-
-require dwarf2_support
+require dwarf2_support !skip_cplus_tests
 
 standard_testfile .cc .S
 set asm_file [standard_output_file ${srcfile2}]
diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
index c4636a79b77..6d1d3309768 100644
--- a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
+++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
@@ -15,9 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.  Always use C.
-if { [skip_cplus_tests] } {
-    return -1
-}
+require !skip_cplus_tests
 set lang {c++}
 
 set debug nodebug
diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp
index 5313e95ef14..baf05594401 100644
--- a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp
+++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp
@@ -15,9 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.  Always use C.
-if { [skip_cplus_tests] } {
-    return -1
-}
+require !skip_cplus_tests
 set lang {c++}
 
 set debug debug
diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp
index 55c96444606..1846125066e 100644
--- a/gdb/testsuite/gdb.cp/inherit.exp
+++ b/gdb/testsuite/gdb.cp/inherit.exp
@@ -20,7 +20,7 @@ set ws  "\[\r\n\t \]+"
 set nl  "\[\r\n\]+"
 set vhn "\\$\[0-9\]+"
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/iostream.exp b/gdb/testsuite/gdb.cp/iostream.exp
index 38fd5832feb..afd54d116f9 100644
--- a/gdb/testsuite/gdb.cp/iostream.exp
+++ b/gdb/testsuite/gdb.cp/iostream.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.
 # It tests various aspects of iostream that have caused problems for gdb.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp
index 11801544a33..a281019bb3d 100644
--- a/gdb/testsuite/gdb.cp/local.exp
+++ b/gdb/testsuite/gdb.cp/local.exp
@@ -27,7 +27,7 @@ set nl "\[\r\n\]+"
 # test running programs
 #
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/m-data.exp b/gdb/testsuite/gdb.cp/m-data.exp
index 3f3706dc7fa..1578b6f0ec1 100644
--- a/gdb/testsuite/gdb.cp/m-data.exp
+++ b/gdb/testsuite/gdb.cp/m-data.exp
@@ -18,7 +18,7 @@
 
 # This file is part of the gdb testsuite
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 97a5645b53a..6dbb1716a02 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -19,7 +19,7 @@
 
 # This file is part of the gdb testsuite
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/many-args.exp b/gdb/testsuite/gdb.cp/many-args.exp
index 5c4a6bbbca9..2751c0064bc 100644
--- a/gdb/testsuite/gdb.cp/many-args.exp
+++ b/gdb/testsuite/gdb.cp/many-args.exp
@@ -19,7 +19,7 @@
 # passed in registers.  This test passes so many structures it is
 # hoped that some will need to be placed onto the stack.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-ctor.exp
index be6297c8c0b..2f86c80d8fd 100644
--- a/gdb/testsuite/gdb.cp/mb-ctor.exp
+++ b/gdb/testsuite/gdb.cp/mb-ctor.exp
@@ -16,7 +16,7 @@
 # Test that breakpoints on C++ constructors work, despite the
 # fact that gcc generates several versions of constructor function.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/mb-inline.exp b/gdb/testsuite/gdb.cp/mb-inline.exp
index eb54db88c97..cf139354dd7 100644
--- a/gdb/testsuite/gdb.cp/mb-inline.exp
+++ b/gdb/testsuite/gdb.cp/mb-inline.exp
@@ -18,7 +18,7 @@
 # This test verifies that setting breakpoint on line in inline
 # function will fire in all instantiations of that function.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile mb-inline1.cc mb-inline2.cc
 set hdrfile "${testfile}.h"
diff --git a/gdb/testsuite/gdb.cp/member-name.exp b/gdb/testsuite/gdb.cp/member-name.exp
index 2940342842a..90fa0971314 100644
--- a/gdb/testsuite/gdb.cp/member-name.exp
+++ b/gdb/testsuite/gdb.cp/member-name.exp
@@ -13,7 +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_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp
index ad703e0e3cf..0807627e3bc 100644
--- a/gdb/testsuite/gdb.cp/member-ptr.exp
+++ b/gdb/testsuite/gdb.cp/member-ptr.exp
@@ -21,7 +21,7 @@
 
 set vhn "\\$\[0-9\]+"
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/meth-typedefs.exp b/gdb/testsuite/gdb.cp/meth-typedefs.exp
index 5ae29f5f5f4..174f89b5d68 100644
--- a/gdb/testsuite/gdb.cp/meth-typedefs.exp
+++ b/gdb/testsuite/gdb.cp/meth-typedefs.exp
@@ -30,7 +30,7 @@ proc add {var name params expected {kind {func}}} {
     lappend result [list "${method_name}($params)" $expect]
 }
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 # Tests for c++/12266 et al
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.exp
index bf65ce72a31..d4bb6fbb82d 100644
--- a/gdb/testsuite/gdb.cp/method.exp
+++ b/gdb/testsuite/gdb.cp/method.exp
@@ -32,7 +32,7 @@
 # test running programs
 #
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/method2.exp b/gdb/testsuite/gdb.cp/method2.exp
index 36a5662257d..04a064bb65b 100644
--- a/gdb/testsuite/gdb.cp/method2.exp
+++ b/gdb/testsuite/gdb.cp/method2.exp
@@ -18,7 +18,7 @@
 # This tests setting a break in an ambiguous c++ method with
 # current_language set to c.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp
index 350061ebd6b..8f14d489c0d 100644
--- a/gdb/testsuite/gdb.cp/misc.exp
+++ b/gdb/testsuite/gdb.cp/misc.exp
@@ -15,7 +15,7 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/namelessclass.exp b/gdb/testsuite/gdb.cp/namelessclass.exp
index bf4748cd4d3..6f6f7d20304 100644
--- a/gdb/testsuite/gdb.cp/namelessclass.exp
+++ b/gdb/testsuite/gdb.cp/namelessclass.exp
@@ -19,12 +19,8 @@
 load_lib dwarf.exp
 
 # Do not run in environments which do not support C++.
-if {[skip_cplus_tests]} {
-    return
-}
-
 # This test can only be run on x86-like targets which support DWARF.
-require dwarf2_support
+require dwarf2_support !skip_cplus_tests
 
 if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
     return 0
diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp
index acdbc99d922..ed7943f4e69 100644
--- a/gdb/testsuite/gdb.cp/namespace.exp
+++ b/gdb/testsuite/gdb.cp/namespace.exp
@@ -25,7 +25,7 @@
 
 
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc namespace1.cc
 
diff --git a/gdb/testsuite/gdb.cp/nested-class-func-class.exp b/gdb/testsuite/gdb.cp/nested-class-func-class.exp
index 91a8d51aa06..1b83f7b3e02 100644
--- a/gdb/testsuite/gdb.cp/nested-class-func-class.exp
+++ b/gdb/testsuite/gdb.cp/nested-class-func-class.exp
@@ -15,7 +15,7 @@
 
 # Regression test for type printing of private nested classes.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/nested-types.exp b/gdb/testsuite/gdb.cp/nested-types.exp
index 3901ec98d48..889d6d7e68c 100644
--- a/gdb/testsuite/gdb.cp/nested-types.exp
+++ b/gdb/testsuite/gdb.cp/nested-types.exp
@@ -19,7 +19,7 @@
 # the corresponding source file.  It then walks the nodes of this tree
 # to construct input suitable for passing to cp_test_ptype_class.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/nextoverthrow.exp b/gdb/testsuite/gdb.cp/nextoverthrow.exp
index 9139671c4a7..e6565addafa 100644
--- a/gdb/testsuite/gdb.cp/nextoverthrow.exp
+++ b/gdb/testsuite/gdb.cp/nextoverthrow.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp b/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp
index 5e3a3702f41..3d7ef3a8090 100644
--- a/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp
+++ b/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp
@@ -15,9 +15,7 @@
 
 standard_testfile exceptprint.cc
 
-if {[skip_cplus_tests]} {
-    return -1
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
diff --git a/gdb/testsuite/gdb.cp/non-trivial-retval.exp b/gdb/testsuite/gdb.cp/non-trivial-retval.exp
index 74427c0c42e..9b8c5b1c460 100644
--- a/gdb/testsuite/gdb.cp/non-trivial-retval.exp
+++ b/gdb/testsuite/gdb.cp/non-trivial-retval.exp
@@ -17,7 +17,7 @@
 
 set additional_flags ""
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/nsalias.exp b/gdb/testsuite/gdb.cp/nsalias.exp
index 19a36b87df5..3c2f5e5703f 100644
--- a/gdb/testsuite/gdb.cp/nsalias.exp
+++ b/gdb/testsuite/gdb.cp/nsalias.exp
@@ -18,11 +18,7 @@
 
 load_lib dwarf.exp
 
-require dwarf2_support
-
-if {[skip_cplus_tests]} {
-    return
-}
+require dwarf2_support !skip_cplus_tests
 
 standard_testfile .cc nsalias-dw.S
 
diff --git a/gdb/testsuite/gdb.cp/overload-const.exp b/gdb/testsuite/gdb.cp/overload-const.exp
index 120945c28a2..8ed9c689a5b 100644
--- a/gdb/testsuite/gdb.cp/overload-const.exp
+++ b/gdb/testsuite/gdb.cp/overload-const.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp
index 8c0ecb5551b..ed265fbc306 100644
--- a/gdb/testsuite/gdb.cp/overload.exp
+++ b/gdb/testsuite/gdb.cp/overload.exp
@@ -24,7 +24,7 @@ set ws "\[\r\n\t \]+"
 set nl "\[\r\n\]+"
 
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp
index 12a67229654..a6714995f43 100644
--- a/gdb/testsuite/gdb.cp/ovldbreak.exp
+++ b/gdb/testsuite/gdb.cp/ovldbreak.exp
@@ -28,7 +28,7 @@ set timeout 15
 # test running programs
 #
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ovsrch.exp b/gdb/testsuite/gdb.cp/ovsrch.exp
index 454c0202384..f13c2ee97ff 100644
--- a/gdb/testsuite/gdb.cp/ovsrch.exp
+++ b/gdb/testsuite/gdb.cp/ovsrch.exp
@@ -52,7 +52,7 @@ proc test_class {class} {
     gdb_test "break ${class}::hibob if (a_param == 3)" "Breakpoint (\[0-9\]).*"
 }
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 # Test for c++/11734
 standard_testfile ovsrch1.cc ovsrch2.cc ovsrch3.cc ovsrch4.cc
diff --git a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
index e45d556c8ba..62ae6b77689 100644
--- a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
+++ b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
@@ -25,10 +25,7 @@
 # - have inlined copy ctor
 # - have deleted destructor
 
-if {[skip_cplus_tests]} {
-    untested "c++ test skipped"
-    return
-}
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pass-by-ref.exp b/gdb/testsuite/gdb.cp/pass-by-ref.exp
index ecf5899fa86..5424bcefc2a 100644
--- a/gdb/testsuite/gdb.cp/pass-by-ref.exp
+++ b/gdb/testsuite/gdb.cp/pass-by-ref.exp
@@ -68,10 +68,7 @@
 # The companion test file pass-by-ref-2.exp also contains
 # manually-written cases.
 
-if {[skip_cplus_tests]} {
-    untested "c++ test skipped"
-    return
-}
+require !skip_cplus_tests
 
 # The program source is generated in the output directory.
 # We use standard_testfile here to set convenience variables.
diff --git a/gdb/testsuite/gdb.cp/pointer-to-member.exp b/gdb/testsuite/gdb.cp/pointer-to-member.exp
index 56dedca6be5..b69edb1d74f 100644
--- a/gdb/testsuite/gdb.cp/pointer-to-member.exp
+++ b/gdb/testsuite/gdb.cp/pointer-to-member.exp
@@ -17,7 +17,7 @@
 
 # Test printing c++ pointer-to-member.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pr-1023.exp b/gdb/testsuite/gdb.cp/pr-1023.exp
index 87af3ffd46e..3ed8f319469 100644
--- a/gdb/testsuite/gdb.cp/pr-1023.exp
+++ b/gdb/testsuite/gdb.cp/pr-1023.exp
@@ -18,7 +18,7 @@
 
 # This file is part of the gdb testsuite.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/pr-1210.exp b/gdb/testsuite/gdb.cp/pr-1210.exp
index 84fb1cc1a0d..021710fae68 100644
--- a/gdb/testsuite/gdb.cp/pr-1210.exp
+++ b/gdb/testsuite/gdb.cp/pr-1210.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/pr-574.exp b/gdb/testsuite/gdb.cp/pr-574.exp
index ad8b296cde3..2ea821011a3 100644
--- a/gdb/testsuite/gdb.cp/pr-574.exp
+++ b/gdb/testsuite/gdb.cp/pr-574.exp
@@ -20,7 +20,7 @@
 
 # This file is part of the gdb testsuite
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/pr10728.exp b/gdb/testsuite/gdb.cp/pr10728.exp
index 07570ac1e30..5fbbace53f6 100644
--- a/gdb/testsuite/gdb.cp/pr10728.exp
+++ b/gdb/testsuite/gdb.cp/pr10728.exp
@@ -17,7 +17,7 @@
 
 set nl		"\[\r\n\]+"
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/pr17132.exp b/gdb/testsuite/gdb.cp/pr17132.exp
index fb4f8729789..fb9e739a547 100644
--- a/gdb/testsuite/gdb.cp/pr17132.exp
+++ b/gdb/testsuite/gdb.cp/pr17132.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pr17494.exp b/gdb/testsuite/gdb.cp/pr17494.exp
index 103cff64173..48a5c2b7a2c 100644
--- a/gdb/testsuite/gdb.cp/pr17494.exp
+++ b/gdb/testsuite/gdb.cp/pr17494.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pr9067.exp b/gdb/testsuite/gdb.cp/pr9067.exp
index 5635b0dda14..cde7b20e41a 100644
--- a/gdb/testsuite/gdb.cp/pr9067.exp
+++ b/gdb/testsuite/gdb.cp/pr9067.exp
@@ -15,7 +15,7 @@
 
 set nl		"\[\r\n\]+"
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/pr9631.exp b/gdb/testsuite/gdb.cp/pr9631.exp
index 888eef54f7b..3a9e0af4db3 100644
--- a/gdb/testsuite/gdb.cp/pr9631.exp
+++ b/gdb/testsuite/gdb.cp/pr9631.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/print-demangle.exp b/gdb/testsuite/gdb.cp/print-demangle.exp
index fbfbb953f59..733cd4e360a 100644
--- a/gdb/testsuite/gdb.cp/print-demangle.exp
+++ b/gdb/testsuite/gdb.cp/print-demangle.exp
@@ -13,7 +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_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile bool.cc
 
diff --git a/gdb/testsuite/gdb.cp/print-method-args.exp b/gdb/testsuite/gdb.cp/print-method-args.exp
index 8e711e0d35d..8c5d5e2ef3e 100644
--- a/gdb/testsuite/gdb.cp/print-method-args.exp
+++ b/gdb/testsuite/gdb.cp/print-method-args.exp
@@ -17,7 +17,7 @@
 
 # This test checks that a constructor and destructor are printed the same.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/printmethod.exp b/gdb/testsuite/gdb.cp/printmethod.exp
index a7cf305975f..0cdb271b85e 100644
--- a/gdb/testsuite/gdb.cp/printmethod.exp
+++ b/gdb/testsuite/gdb.cp/printmethod.exp
@@ -19,7 +19,7 @@
 
 # This file is part of the gdb testsuite
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/psmang.exp b/gdb/testsuite/gdb.cp/psmang.exp
index a27a3f4a5c5..ba3e75666d9 100644
--- a/gdb/testsuite/gdb.cp/psmang.exp
+++ b/gdb/testsuite/gdb.cp/psmang.exp
@@ -176,7 +176,7 @@
 #
 
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile psmang1.cc psmang2.cc
 
diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.exp b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
index 9910d882bf7..ad64df6d0b9 100644
--- a/gdb/testsuite/gdb.cp/psymtab-parameter.exp
+++ b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
@@ -13,7 +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_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
index 5865d985433..4f0a6d98be0 100644
--- a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
+++ b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ptype-flags.exp b/gdb/testsuite/gdb.cp/ptype-flags.exp
index 02eff4ac59d..e09447ed515 100644
--- a/gdb/testsuite/gdb.cp/ptype-flags.exp
+++ b/gdb/testsuite/gdb.cp/ptype-flags.exp
@@ -15,7 +15,7 @@
 
 set nl		"\[\r\n\]+"
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/punctuator.exp b/gdb/testsuite/gdb.cp/punctuator.exp
index 4157182349e..62433721893 100644
--- a/gdb/testsuite/gdb.cp/punctuator.exp
+++ b/gdb/testsuite/gdb.cp/punctuator.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.cp/re-set-overloaded.exp b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
index d083b410316..d309c46694b 100644
--- a/gdb/testsuite/gdb.cp/re-set-overloaded.exp
+++ b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
@@ -13,8 +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_cplus_tests] } { continue }
-if { [skip_shlib_tests] } { continue }
+require !skip_cplus_tests !skip_shlib_tests
 
 standard_testfile bool.cc .cc
 
diff --git a/gdb/testsuite/gdb.cp/ref-params.exp b/gdb/testsuite/gdb.cp/ref-params.exp
index 7d728bd2bca..b4c6cee8914 100644
--- a/gdb/testsuite/gdb.cp/ref-params.exp
+++ b/gdb/testsuite/gdb.cp/ref-params.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp
index 05b3f68b445..c1b9866cf67 100644
--- a/gdb/testsuite/gdb.cp/ref-types.exp
+++ b/gdb/testsuite/gdb.cp/ref-types.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
index 8955cd60b13..08320536895 100644
--- a/gdb/testsuite/gdb.cp/rtti.exp
+++ b/gdb/testsuite/gdb.cp/rtti.exp
@@ -26,7 +26,7 @@
 # (involving templates, in particular) where this problem triggers
 # because GDB and GCC have different ideas what a class is called.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp b/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp
index 40be1b9955c..f1399ef1657 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp
@@ -17,7 +17,7 @@
 
 # C++11 rvalue reference type casting tests, based on gdb.cp/casts.exp.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
index 86e14a8a6e9..94ac3841eb6 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
@@ -18,7 +18,7 @@
 # Tests for overloaded member functions with rvalue reference parameters,
 # based on gdb.cp/overload.exp.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
index f83d01b77d1..46c32cebf9a 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
@@ -16,7 +16,7 @@
 # Tests for rvalue reference parameters of types and their subtypes in GDB,
 # based on gdb.cp/ref-params.exp.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp b/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp
index 118cc1625f6..52e8c682ef7 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp
@@ -18,7 +18,7 @@
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 if {[prepare_for_testing ${testfile}.exp $testfile $srcfile \
     {debug c++ additional_flags="-std=gnu++11"}] } {
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp
index 3f94b7925fd..f2963be0c52 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp
@@ -16,7 +16,7 @@
 # Tests for reference types with short type variables in GDB, based on
 # gdb.cp/ref-types.exp.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/scope-err.exp b/gdb/testsuite/gdb.cp/scope-err.exp
index 1ec8d60d752..e2dec7326a4 100644
--- a/gdb/testsuite/gdb.cp/scope-err.exp
+++ b/gdb/testsuite/gdb.cp/scope-err.exp
@@ -16,9 +16,7 @@
 # Tests for linespec errors with C++.
 # Derived from gdb.linespec/ls-errs.exp.
 
-if {[skip_cplus_tests]} {
-    return
-}
+require !skip_cplus_tests
 
 standard_testfile .cc
 set exefile $testfile
diff --git a/gdb/testsuite/gdb.cp/static-method.exp b/gdb/testsuite/gdb.cp/static-method.exp
index 3180e289779..282b5b7ce0d 100644
--- a/gdb/testsuite/gdb.cp/static-method.exp
+++ b/gdb/testsuite/gdb.cp/static-method.exp
@@ -37,7 +37,7 @@ proc test_breakpoint {func result} {
     }
 }
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 # Tests for c++/12750
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/static-print-quit.exp b/gdb/testsuite/gdb.cp/static-print-quit.exp
index ba8e35bee99..f7f3ec095eb 100644
--- a/gdb/testsuite/gdb.cp/static-print-quit.exp
+++ b/gdb/testsuite/gdb.cp/static-print-quit.exp
@@ -13,7 +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_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/static-typedef-print.exp b/gdb/testsuite/gdb.cp/static-typedef-print.exp
index f72314df442..91fa658c437 100644
--- a/gdb/testsuite/gdb.cp/static-typedef-print.exp
+++ b/gdb/testsuite/gdb.cp/static-typedef-print.exp
@@ -13,7 +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_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/stub-array-size.exp b/gdb/testsuite/gdb.cp/stub-array-size.exp
index f78308d3e31..9492c47a72c 100644
--- a/gdb/testsuite/gdb.cp/stub-array-size.exp
+++ b/gdb/testsuite/gdb.cp/stub-array-size.exp
@@ -18,7 +18,7 @@
 # Test size of arrays of stubbed types (structures where the full definition
 # is not immediately available).
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc stub-array-size2.cc
 
diff --git a/gdb/testsuite/gdb.cp/subtypes.exp b/gdb/testsuite/gdb.cp/subtypes.exp
index 7dfec3e2440..67372c59a65 100644
--- a/gdb/testsuite/gdb.cp/subtypes.exp
+++ b/gdb/testsuite/gdb.cp/subtypes.exp
@@ -16,7 +16,7 @@
 # Test for subtype definitions, i.e., types defined in classes, functions,
 # etc.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/temargs.exp b/gdb/testsuite/gdb.cp/temargs.exp
index 7459d50f15f..4d7677ea725 100644
--- a/gdb/testsuite/gdb.cp/temargs.exp
+++ b/gdb/testsuite/gdb.cp/temargs.exp
@@ -17,9 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-if {[skip_cplus_tests]} {
-    return
-}
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp
index e461b946d94..41709b503e3 100644
--- a/gdb/testsuite/gdb.cp/templates.exp
+++ b/gdb/testsuite/gdb.cp/templates.exp
@@ -17,7 +17,7 @@
 
 set ws "\[\r\n\t \]+"
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/typed-enum.exp b/gdb/testsuite/gdb.cp/typed-enum.exp
index 424c70a848e..ad6aa29d2aa 100644
--- a/gdb/testsuite/gdb.cp/typed-enum.exp
+++ b/gdb/testsuite/gdb.cp/typed-enum.exp
@@ -15,7 +15,7 @@
 #
 # Check if unsigned typedef are handled correctly with typed enums.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/typedef-base.exp b/gdb/testsuite/gdb.cp/typedef-base.exp
index ef6f83b8641..7a0d5f237d8 100644
--- a/gdb/testsuite/gdb.cp/typedef-base.exp
+++ b/gdb/testsuite/gdb.cp/typedef-base.exp
@@ -15,7 +15,7 @@
 #
 # Make sure that inheritance through a typedef is well handled.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/typedef-operator.exp b/gdb/testsuite/gdb.cp/typedef-operator.exp
index 96fd9f133bd..f0cfc4b011d 100644
--- a/gdb/testsuite/gdb.cp/typedef-operator.exp
+++ b/gdb/testsuite/gdb.cp/typedef-operator.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/typeid.exp b/gdb/testsuite/gdb.cp/typeid.exp
index 66e345a5a06..b4766d003dc 100644
--- a/gdb/testsuite/gdb.cp/typeid.exp
+++ b/gdb/testsuite/gdb.cp/typeid.exp
@@ -15,9 +15,7 @@
 
 standard_testfile .cc
 
-if {[skip_cplus_tests]} {
-    return -1
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp
index 0ddfd1aabdd..aa615986ee2 100644
--- a/gdb/testsuite/gdb.cp/var-tag.exp
+++ b/gdb/testsuite/gdb.cp/var-tag.exp
@@ -17,7 +17,7 @@
 
 # Test expressions in which variable names shadow tag names.
 
-if {[skip_cplus_tests]} { return }
+require !skip_cplus_tests
 
 standard_testfile var-tag.cc var-tag-2.cc var-tag-3.cc var-tag-4.cc
 
diff --git a/gdb/testsuite/gdb.cp/virtbase.exp b/gdb/testsuite/gdb.cp/virtbase.exp
index 4cc79946b62..8408235d507 100644
--- a/gdb/testsuite/gdb.cp/virtbase.exp
+++ b/gdb/testsuite/gdb.cp/virtbase.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/virtbase2.exp b/gdb/testsuite/gdb.cp/virtbase2.exp
index d15e009f25e..9b18f599703 100644
--- a/gdb/testsuite/gdb.cp/virtbase2.exp
+++ b/gdb/testsuite/gdb.cp/virtbase2.exp
@@ -15,7 +15,7 @@
 
 # Make sure printing virtual base class data member works correctly (PR16841)
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index 7ca24cba353..89c5b6da7a5 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -18,7 +18,7 @@
 
 set nl		"\[\r\n\]+"
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/virtfunc2.exp b/gdb/testsuite/gdb.cp/virtfunc2.exp
index 5e724540f7f..de9ed11b9f8 100644
--- a/gdb/testsuite/gdb.cp/virtfunc2.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc2.exp
@@ -18,7 +18,7 @@
 
 set nl		"\[\r\n\]+"
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/watch-cp.exp b/gdb/testsuite/gdb.cp/watch-cp.exp
index 64694c628d6..62429f76041 100644
--- a/gdb/testsuite/gdb.cp/watch-cp.exp
+++ b/gdb/testsuite/gdb.cp/watch-cp.exp
@@ -13,7 +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_cplus_tests] || [skip_hw_watchpoint_tests]} { return }
+require !skip_cplus_tests !skip_hw_watchpoint_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
index 4af74adccc1..715152829eb 100644
--- a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
+++ b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
@@ -13,7 +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_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index 96266867dd5..422e3f8559d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
@@ -18,7 +18,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
index f0baf76bf4e..867cd1b6a6c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -17,7 +17,7 @@
 # type containing a static member of the same type.
 
 # Still no C++ compiler is used.
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index 510631c0364..4fd54825718 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -17,7 +17,7 @@
 # type containing a static member of the same type.
 
 # Still no C++ compiler is used.
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 266fef4e836..9199f3c7a5b 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -18,7 +18,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index b30cf2ec48c..6102a96d988 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -18,7 +18,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp
index 985d8f70e72..bcff7bb7729 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-array.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp
@@ -16,9 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global array whose location is a DW_OP_addr.
 
-if [skip_cplus_tests] {
-    return
-}
+require !skip_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp
index fb1a95838f9..13608eaa8ff 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp
@@ -16,9 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a DW_AT_const_value.
 
-if [skip_cplus_tests] {
-    return
-}
+require !skip_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp
index 1532d11f5d9..e01aeafc84b 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-global.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp
@@ -16,9 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global variable whose location is a DW_OP_addr.
 
-if [skip_cplus_tests] {
-    return
-}
+require !skip_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
index 455b38cf8cd..822256bea38 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
@@ -16,9 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global struct whose location is a DW_OP_addr.
 
-if [skip_cplus_tests] {
-    return
-}
+require !skip_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
index 4806ae19a39..f1dfed83e6a 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
@@ -22,9 +22,7 @@
 # on specific compiler versions or use of optimization switches, in
 # this case -flto.
 
-if [skip_cplus_tests] {
-    return
-}
+require !skip_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index 34dd1b361d4..1abc4141041 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index f69f7ae9d0e..c3a75c35c4a 100644
--- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index 9ecca831b68..22784554014 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile main.c -dw4.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
index f732410e494..f0bea26faba 100644
--- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
+++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
index a02ebbf109e..f77a136de1f 100644
--- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
+++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
@@ -13,7 +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_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index 243ce2f7f79..f35f0af5368 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index 6ee27055045..253295d6538 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile method-ptr.cc -dw.S
 
diff --git a/gdb/testsuite/gdb.guile/scm-value-cc.exp b/gdb/testsuite/gdb.guile/scm-value-cc.exp
index 0b314ff7d5a..3e68707ddbc 100644
--- a/gdb/testsuite/gdb.guile/scm-value-cc.exp
+++ b/gdb/testsuite/gdb.guile/scm-value-cc.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-guile.exp
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.linespec/break-ask.exp b/gdb/testsuite/gdb.linespec/break-ask.exp
index 91dc5d59038..1895a509c25 100644
--- a/gdb/testsuite/gdb.linespec/break-ask.exp
+++ b/gdb/testsuite/gdb.linespec/break-ask.exp
@@ -15,10 +15,7 @@
 
 standard_testfile lspec.cc
 
-if {[skip_cplus_tests]} {
-    unsupported "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 set opts {debug c++}
 set objfile1 [standard_output_file ${testfile}one.o]
diff --git a/gdb/testsuite/gdb.linespec/cpexplicit.exp b/gdb/testsuite/gdb.linespec/cpexplicit.exp
index 9d2c7c922b0..959e399663c 100644
--- a/gdb/testsuite/gdb.linespec/cpexplicit.exp
+++ b/gdb/testsuite/gdb.linespec/cpexplicit.exp
@@ -15,10 +15,7 @@
 
 # Tests for explicit linespecs
 
-if {[skip_cplus_tests]} {
-    unsupported "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 standard_testfile .cc
 set exefile $testfile
diff --git a/gdb/testsuite/gdb.linespec/linespec.exp b/gdb/testsuite/gdb.linespec/linespec.exp
index f770ac802dd..1a819cab9b4 100644
--- a/gdb/testsuite/gdb.linespec/linespec.exp
+++ b/gdb/testsuite/gdb.linespec/linespec.exp
@@ -22,10 +22,7 @@ set exefile $testfile
 set baseone base/one/thefile.cc
 set basetwo base/two/thefile.cc
 
-if {[skip_cplus_tests]} {
-    unsupported "skipping c++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $exefile \
 	 [list $srcfile $baseone $basetwo] \
diff --git a/gdb/testsuite/gdb.linespec/ls-dollar.exp b/gdb/testsuite/gdb.linespec/ls-dollar.exp
index 7d826776d69..4ce57572050 100644
--- a/gdb/testsuite/gdb.linespec/ls-dollar.exp
+++ b/gdb/testsuite/gdb.linespec/ls-dollar.exp
@@ -18,10 +18,7 @@
 standard_testfile .cc
 set exefile $testfile
 
-if {[skip_cplus_tests]} {
-    unsupported "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $exefile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.linespec/skip-two.exp b/gdb/testsuite/gdb.linespec/skip-two.exp
index b936d700adc..30dd7cb0641 100644
--- a/gdb/testsuite/gdb.linespec/skip-two.exp
+++ b/gdb/testsuite/gdb.linespec/skip-two.exp
@@ -20,10 +20,7 @@ set execfile $testfile
 set baseone base/one/thefile.cc
 set basetwo base/two/thefile.cc
 
-if {[skip_cplus_tests]} {
-    unsupported "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $execfile \
 	 [list $srcfile $baseone $basetwo] \
diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp
index 14cf3b610c0..65279de1dce 100644
--- a/gdb/testsuite/gdb.mi/gdb792.exp
+++ b/gdb/testsuite/gdb.mi/gdb792.exp
@@ -16,7 +16,7 @@
 # Test that children of classes are properly reported.  Regression
 # test for gdb/792.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp
index bcb9c7e5c35..a130acc193a 100644
--- a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp
+++ b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp
@@ -15,7 +15,7 @@
 
 # Test the -catch-throw, -catch-rethrow, and -catch-catch MI commands.
 
-if { [skip_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
index f4e45fd9b64..7af5d3393f5 100644
--- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
+++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
@@ -13,7 +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_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp b/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
index 1571934d48e..645cbefca80 100644
--- a/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
+++ b/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
@@ -17,9 +17,7 @@
 # errors is generated when setting a breakpoint in a non-existent
 # file with a Windows-style logical drive names and C++.
 
-if {[skip_cplus_tests]} {
-    return
-}
+require !skip_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.exp b/gdb/testsuite/gdb.mi/mi-var-cp.exp
index 4589a5ddbaf..cc683ad0584 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cp.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.exp
@@ -13,7 +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_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-rtti.exp
index 42673f9d4e9..6ae6760ba99 100644
--- a/gdb/testsuite/gdb.mi/mi-var-rtti.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-rtti.exp
@@ -13,7 +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_cplus_tests] } { return }
+require !skip_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp
index bbad5359a4d..bb42b56b5a8 100644
--- a/gdb/testsuite/gdb.python/py-explore-cc.exp
+++ b/gdb/testsuite/gdb.python/py-explore-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile py-explore.cc
 
diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
index 5bfb100e68f..98eb94f5d2c 100644
--- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
@@ -17,7 +17,7 @@
 # exposing rvalue reference values to Python.  It is based on
 # gdb.python/py-value-cc.exp.
 
-if {[skip_cplus_tests]} { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp
index da2054cd43c..1383e3a1089 100644
--- a/gdb/testsuite/gdb.python/py-template.exp
+++ b/gdb/testsuite/gdb.python/py-template.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index 1709e00ead0..abf95e5c486 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -13,7 +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_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 load_lib gdb-python.exp
 load_lib cp-support.exp
diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp
index 49fa8989a7a..f62c1df4aa5 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-value-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-if { [skip_cplus_tests] } { continue }
+require !skip_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index 50d7bbe64eb..8db5c39080b 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -18,10 +18,7 @@
 
 load_lib gdb-python.exp
 
-if { [skip_cplus_tests] } {
-    untested "skipping C++ tests"
-    return
-}
+require !skip_cplus_tests
 
 standard_testfile py-xmethods.cc
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 09/79] Use require skip_shlib_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (7 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 08/79] Use require skip_cplus_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 10/79] Use require skip_dlmopen_tests Tom Tromey
                   ` (71 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_shlib_tests".
---
 gdb/testsuite/gdb.ada/catch_ex_std.exp                 |  4 +---
 gdb/testsuite/gdb.base/bfd-errors.exp                  |  4 +---
 gdb/testsuite/gdb.base/break-probes.exp                |  4 +---
 gdb/testsuite/gdb.base/catch-load.exp                  |  5 +----
 gdb/testsuite/gdb.base/ctxobj.exp                      |  4 +---
 gdb/testsuite/gdb.base/dprintf-pending.exp             |  4 +---
 gdb/testsuite/gdb.base/dso2dso.exp                     |  4 +---
 gdb/testsuite/gdb.base/fixsection.exp                  |  4 +---
 .../gdb.base/fork-no-detach-follow-child-dlopen.exp    |  4 +---
 gdb/testsuite/gdb.base/gcore-relro.exp                 |  4 +---
 gdb/testsuite/gdb.base/gdb1555.exp                     |  4 +---
 gdb/testsuite/gdb.base/global-var-nested-by-dso.exp    |  4 +---
 gdb/testsuite/gdb.base/gnu-ifunc.exp                   |  4 +---
 gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp   |  4 +---
 gdb/testsuite/gdb.base/info-shared.exp                 |  4 +---
 gdb/testsuite/gdb.base/info_sources_2.exp              |  4 +---
 gdb/testsuite/gdb.base/jit-bfd-name.exp                |  5 +----
 gdb/testsuite/gdb.base/jit-elf-fork.exp                |  5 +----
 gdb/testsuite/gdb.base/jit-elf-so.exp                  |  5 +----
 gdb/testsuite/gdb.base/jit-elf.exp                     |  5 +----
 gdb/testsuite/gdb.base/jit-reader-simple.exp           |  5 +----
 gdb/testsuite/gdb.base/jit-reader.exp                  |  4 +---
 gdb/testsuite/gdb.base/msym-bp-shl.exp                 |  4 +---
 gdb/testsuite/gdb.base/pending.exp                     |  4 +---
 gdb/testsuite/gdb.base/print-file-var.exp              |  4 +---
 gdb/testsuite/gdb.base/print-symbol-loading.exp        |  4 +---
 gdb/testsuite/gdb.base/shlib-call.exp                  |  4 +---
 gdb/testsuite/gdb.base/shreloc.exp                     |  4 +---
 gdb/testsuite/gdb.base/signed-builtin-types.exp        |  4 +---
 gdb/testsuite/gdb.base/so-impl-ld.exp                  |  4 +---
 gdb/testsuite/gdb.base/solib-corrupted.exp             |  4 +---
 gdb/testsuite/gdb.base/solib-disc.exp                  |  4 +---
 gdb/testsuite/gdb.base/solib-display.exp               |  4 +---
 gdb/testsuite/gdb.base/solib-nodir.exp                 |  4 +---
 gdb/testsuite/gdb.base/solib-overlap.exp               |  4 +---
 gdb/testsuite/gdb.base/solib-symbol.exp                |  4 +---
 gdb/testsuite/gdb.base/solib-vanish.exp                |  4 +---
 gdb/testsuite/gdb.base/solib-weak.exp                  |  4 +---
 gdb/testsuite/gdb.base/sym-file.exp                    |  4 +---
 gdb/testsuite/gdb.base/symtab-search-order.exp         |  4 +---
 gdb/testsuite/gdb.base/type-opaque.exp                 |  4 +---
 gdb/testsuite/gdb.base/unload.exp                      |  4 +---
 gdb/testsuite/gdb.base/watchpoint-solib.exp            |  4 +---
 gdb/testsuite/gdb.btrace/dlopen.exp                    | 10 +---------
 gdb/testsuite/gdb.compile/compile.exp                  |  5 +----
 gdb/testsuite/gdb.cp/except-multi-location.exp         |  4 +---
 gdb/testsuite/gdb.cp/infcall-dlopen.exp                |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp            |  6 +-----
 .../gdb.dwarf2/locexpr-data-member-location.exp        |  4 +---
 gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp         |  4 +---
 gdb/testsuite/gdb.mi/mi-catch-load.exp                 |  4 +---
 gdb/testsuite/gdb.mi/mi-dprintf-pending.exp            |  4 +---
 gdb/testsuite/gdb.mi/mi-pending.exp                    |  4 +---
 gdb/testsuite/gdb.mi/mi-solib.exp                      |  5 +----
 gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp       |  4 +---
 gdb/testsuite/gdb.opt/solib-intra-step.exp             |  4 +---
 gdb/testsuite/gdb.python/py-event-load.exp             |  5 +----
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp      |  5 +----
 gdb/testsuite/gdb.python/py-shared.exp                 |  4 +---
 gdb/testsuite/gdb.server/server-exec-info.exp          |  4 +---
 gdb/testsuite/gdb.server/solib-list.exp                |  4 +---
 gdb/testsuite/gdb.threads/dlopen-libpthread.exp        |  3 ++-
 gdb/testsuite/gdb.trace/change-loc.exp                 |  4 +---
 gdb/testsuite/gdb.trace/ftrace-lock.exp                |  4 +---
 gdb/testsuite/gdb.trace/ftrace.exp                     |  4 +---
 gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp      |  4 +---
 gdb/testsuite/gdb.trace/pending.exp                    |  4 +---
 gdb/testsuite/gdb.trace/range-stepping.exp             |  4 +---
 gdb/testsuite/gdb.trace/strace.exp                     |  4 +---
 gdb/testsuite/gdb.trace/trace-break.exp                |  4 +---
 gdb/testsuite/gdb.trace/trace-condition.exp            |  4 +---
 gdb/testsuite/gdb.trace/trace-enable-disable.exp       |  4 +---
 gdb/testsuite/gdb.trace/trace-mt.exp                   |  4 +---
 gdb/testsuite/gdb.trace/tspeed.exp                     |  4 +---
 74 files changed, 75 insertions(+), 238 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index ba8d0d9b590..30d19e1f27b 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -13,9 +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_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 load_lib "ada.exp"
 
diff --git a/gdb/testsuite/gdb.base/bfd-errors.exp b/gdb/testsuite/gdb.base/bfd-errors.exp
index 6d1a4c64b21..f55fd296d4b 100644
--- a/gdb/testsuite/gdb.base/bfd-errors.exp
+++ b/gdb/testsuite/gdb.base/bfd-errors.exp
@@ -46,9 +46,7 @@
 
 # This test can't be run on targets lacking shared library support
 # or for non-ELF targets.
-if { [skip_shlib_tests] || ![is_elf_target] } {
-    return 0
-}
+require !skip_shlib_tests is_elf_target
 
 # Library file names and flags:
 set lib_basename ${::gdb_test_file_name}-lib
diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp
index ca33fba97b2..d0a3786e2c2 100644
--- a/gdb/testsuite/gdb.base/break-probes.exp
+++ b/gdb/testsuite/gdb.base/break-probes.exp
@@ -13,9 +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_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/catch-load.exp b/gdb/testsuite/gdb.base/catch-load.exp
index 3cbea0fa43f..f53e162a35e 100644
--- a/gdb/testsuite/gdb.base/catch-load.exp
+++ b/gdb/testsuite/gdb.base/catch-load.exp
@@ -13,10 +13,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-if {[skip_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 standard_testfile .c
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
diff --git a/gdb/testsuite/gdb.base/ctxobj.exp b/gdb/testsuite/gdb.base/ctxobj.exp
index cd66c6c1ade..4d54ed90de4 100644
--- a/gdb/testsuite/gdb.base/ctxobj.exp
+++ b/gdb/testsuite/gdb.base/ctxobj.exp
@@ -13,9 +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_shlib_tests]} {
-    return -1
-}
+require !skip_shlib_tests
 
 set executable ctxobj-m
 
diff --git a/gdb/testsuite/gdb.base/dprintf-pending.exp b/gdb/testsuite/gdb.base/dprintf-pending.exp
index 810433c18c4..bb30ce5528d 100644
--- a/gdb/testsuite/gdb.base/dprintf-pending.exp
+++ b/gdb/testsuite/gdb.base/dprintf-pending.exp
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 set libfile "dprintf-pendshr"
diff --git a/gdb/testsuite/gdb.base/dso2dso.exp b/gdb/testsuite/gdb.base/dso2dso.exp
index 52afbdb297e..5615254588a 100644
--- a/gdb/testsuite/gdb.base/dso2dso.exp
+++ b/gdb/testsuite/gdb.base/dso2dso.exp
@@ -23,9 +23,7 @@
 # also happens to exercise an issue with displaced stepping on amd64
 # when libdso1 is mapped at an address greater than 0xffffffff.
 
-if { [skip_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/fixsection.exp b/gdb/testsuite/gdb.base/fixsection.exp
index 5c42e9af8b7..ec2d7931161 100644
--- a/gdb/testsuite/gdb.base/fixsection.exp
+++ b/gdb/testsuite/gdb.base/fixsection.exp
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
index 4bad7e55904..5e907c2a43d 100644
--- a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
+++ b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
@@ -23,9 +23,7 @@
 # in the source of the shlib, and "list" should display the source where
 # the program stopped.
 
-if { [skip_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile .c -shlib.c
 set shlib_path [standard_output_file ${testfile}-lib.so]
diff --git a/gdb/testsuite/gdb.base/gcore-relro.exp b/gdb/testsuite/gdb.base/gcore-relro.exp
index 49a4be4de32..efae85a2eb0 100644
--- a/gdb/testsuite/gdb.base/gcore-relro.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro.exp
@@ -13,9 +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_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile gcore-relro-main.c
 set libfile gcore-relro-lib
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
index 246108e0652..6cf1c71d1b0 100644
--- a/gdb/testsuite/gdb.base/gdb1555.exp
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -17,9 +17,7 @@
 # a shared library (PR gdb/1555, was PR shlib/1280, shlib/1237).
 # Tested on ppc-yellowdog-linux (Yellow Dog Linux 3.0 3.2.2-2a)
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile gdb1555-main.c gdb1555.c
 
diff --git a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
index a4507a8066d..37e3c9e1112 100644
--- a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
+++ b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
@@ -13,9 +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_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 783b123e87a..fd5eaa1233b 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -13,9 +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_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 if {[skip_ifunc_tests]} {
     return 0
diff --git a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
index 5c20e9f2dc5..f5e608eb1c3 100644
--- a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
+++ b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
@@ -17,9 +17,7 @@
 # when the target doesn't support hw breakpoints doesn't silently
 # error out without informing the user.
 
-if {[skip_shlib_tests]} {
-    return -1
-}
+require !skip_shlib_tests
 
 set main_src hbreak-in-shr-unsupported.c
 set lib_src hbreak-in-shr-unsupported-shr.c
diff --git a/gdb/testsuite/gdb.base/info-shared.exp b/gdb/testsuite/gdb.base/info-shared.exp
index 1f8bb76a722..29f77ceb479 100644
--- a/gdb/testsuite/gdb.base/info-shared.exp
+++ b/gdb/testsuite/gdb.base/info-shared.exp
@@ -13,9 +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_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/info_sources_2.exp b/gdb/testsuite/gdb.base/info_sources_2.exp
index 6c3b685e00e..58dfbe4c2eb 100644
--- a/gdb/testsuite/gdb.base/info_sources_2.exp
+++ b/gdb/testsuite/gdb.base/info_sources_2.exp
@@ -16,9 +16,7 @@
 # Test 'info sources' when the test file makes use of a shared
 # library.
 
-if { [skip_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 set is_remote_target [is_remote target]
 
diff --git a/gdb/testsuite/gdb.base/jit-bfd-name.exp b/gdb/testsuite/gdb.base/jit-bfd-name.exp
index 640840f6ddc..cd7056df252 100644
--- a/gdb/testsuite/gdb.base/jit-bfd-name.exp
+++ b/gdb/testsuite/gdb.base/jit-bfd-name.exp
@@ -20,10 +20,7 @@
 # Additionally, check that GDB cau use 'dump binary memory' to write
 # out the in-memory JIT files.
 
-if {[skip_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-elf-fork.exp b/gdb/testsuite/gdb.base/jit-elf-fork.exp
index 8c3347f659d..51f68cd75cd 100644
--- a/gdb/testsuite/gdb.base/jit-elf-fork.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-fork.exp
@@ -15,10 +15,7 @@
 
 # Test fork handling of an inferior that has JIT-ed objfiles.
 
-if {[skip_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-elf-so.exp b/gdb/testsuite/gdb.base/jit-elf-so.exp
index f76228290a7..148a0fc3b6f 100644
--- a/gdb/testsuite/gdb.base/jit-elf-so.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-so.exp
@@ -16,10 +16,7 @@
 # The same tests as in jit.exp, but loading JITer itself from a shared
 # library.
 
-if {[skip_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-elf.exp b/gdb/testsuite/gdb.base/jit-elf.exp
index aef1a963a30..42c5339eb76 100644
--- a/gdb/testsuite/gdb.base/jit-elf.exp
+++ b/gdb/testsuite/gdb.base/jit-elf.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_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp
index 999e8f0b943..e46628d6ae2 100644
--- a/gdb/testsuite/gdb.base/jit-reader-simple.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp
@@ -24,10 +24,7 @@
 # For completeness, also test when the JIT descriptor does not change
 # address between runs.
 
-if {[skip_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 5f8b6b0343c..1d02233406e 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -22,9 +22,7 @@ if { (![istarget x86_64-*-*] && ![istarget i?86-*-*]) || ![is_lp64_target] } {
     return -1;
 }
 
-if {[skip_shlib_tests]} {
-    return -1
-}
+require !skip_shlib_tests
 
 if { ![isnative] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/msym-bp-shl.exp b/gdb/testsuite/gdb.base/msym-bp-shl.exp
index 45ff5c8ff83..05587580962 100644
--- a/gdb/testsuite/gdb.base/msym-bp-shl.exp
+++ b/gdb/testsuite/gdb.base/msym-bp-shl.exp
@@ -18,9 +18,7 @@
 # static function named "foo" exists in the shared library.  Tests
 # both with and without debug info.
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile msym-bp-shl-main.c msym-bp-shl-main-2.c msym-bp-shl-lib.c
 set srcfile ${srcdir}/${subdir}/${srcfile}
diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp
index bcd822a0a69..c1fbe77d8ee 100644
--- a/gdb/testsuite/gdb.base/pending.exp
+++ b/gdb/testsuite/gdb.base/pending.exp
@@ -19,9 +19,7 @@
 # test running programs
 #
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile .c
 set libfile "pendshr"
diff --git a/gdb/testsuite/gdb.base/print-file-var.exp b/gdb/testsuite/gdb.base/print-file-var.exp
index a0fb4b8a6ea..00105a8f5cd 100644
--- a/gdb/testsuite/gdb.base/print-file-var.exp
+++ b/gdb/testsuite/gdb.base/print-file-var.exp
@@ -13,9 +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_shlib_tests]} {
-    return -1
-}
+require !skip_shlib_tests
 
 proc test {hidden dlopen version_id_main lang} {
     global srcdir subdir
diff --git a/gdb/testsuite/gdb.base/print-symbol-loading.exp b/gdb/testsuite/gdb.base/print-symbol-loading.exp
index a23af854f8d..e91fea9e5d8 100644
--- a/gdb/testsuite/gdb.base/print-symbol-loading.exp
+++ b/gdb/testsuite/gdb.base/print-symbol-loading.exp
@@ -15,9 +15,7 @@
 
 # Test the "print symbol-loading" option.
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile print-symbol-loading-main.c
 set libfile print-symbol-loading-lib
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index 735b8fd5ba6..4dadb256b31 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -29,9 +29,7 @@
 #prop lib shr2.sl
 
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 if { [is_remote host] } {
     gdb_remote_download host $srcdir/$subdir/ss.h
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
index f2ef03a38e4..d1d99ae42c9 100644
--- a/gdb/testsuite/gdb.base/shreloc.exp
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -19,9 +19,7 @@
 # them gets relocated at load-time. Check that gdb gets the right
 # values for the debugging and minimal symbols.
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 #
 # This file uses shreloc.c, shreloc1.c and shreloc2.c
diff --git a/gdb/testsuite/gdb.base/signed-builtin-types.exp b/gdb/testsuite/gdb.base/signed-builtin-types.exp
index c4afc621cee..94f73f97854 100644
--- a/gdb/testsuite/gdb.base/signed-builtin-types.exp
+++ b/gdb/testsuite/gdb.base/signed-builtin-types.exp
@@ -13,9 +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_shlib_tests]} {
-    return -1
-}
+require !skip_shlib_tests
 
 standard_testfile .c -lib.c
 
diff --git a/gdb/testsuite/gdb.base/so-impl-ld.exp b/gdb/testsuite/gdb.base/so-impl-ld.exp
index b33d301f11d..f8516b741a3 100644
--- a/gdb/testsuite/gdb.base/so-impl-ld.exp
+++ b/gdb/testsuite/gdb.base/so-impl-ld.exp
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile .c
 set libfile "solib1"
diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp
index 4d0ae5ac309..068a0188110 100644
--- a/gdb/testsuite/gdb.base/solib-corrupted.exp
+++ b/gdb/testsuite/gdb.base/solib-corrupted.exp
@@ -13,9 +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_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 if {[is_remote target]} {
     # gdbserver prints the warning message but expect is parsing only the GDB
diff --git a/gdb/testsuite/gdb.base/solib-disc.exp b/gdb/testsuite/gdb.base/solib-disc.exp
index d06ee144a0b..84f6d928e79 100644
--- a/gdb/testsuite/gdb.base/solib-disc.exp
+++ b/gdb/testsuite/gdb.base/solib-disc.exp
@@ -15,9 +15,7 @@
 
 # Test connecting and disconnecting at shared library events.
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 set gdbserver_reconnect_p 1
 if { [info proc gdb_reconnect] == "" } {
diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
index 11bc200eb2c..d75b6f89df3 100644
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -28,9 +28,7 @@
 # (and thus aren't affected by shared library unloading) are not
 # disabled prematurely.
 
-if { [skip_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 # This test is currently not supported for stub targets, because it uses the
 # start command (through gdb_start_cmd).  In theory, it could be changed to
diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp
index 125b72e9d83..62075cb3235 100644
--- a/gdb/testsuite/gdb.base/solib-nodir.exp
+++ b/gdb/testsuite/gdb.base/solib-nodir.exp
@@ -13,9 +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_shlib_tests] {
-    return
-}
+require !skip_shlib_tests
 
 # The testcase assumes the target can access the OBJDIR.
 if [is_remote target] {
diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp
index 0c3dd440397..084047b709f 100644
--- a/gdb/testsuite/gdb.base/solib-overlap.exp
+++ b/gdb/testsuite/gdb.base/solib-overlap.exp
@@ -27,9 +27,7 @@
 #   difference appears to be caused by prelink, adjusting expectations
 # In such case both disk libraries will be loaded at VMAs starting at zero.
 
-if [skip_shlib_tests] {
-    return 0
-}
+require !skip_shlib_tests
 
 if {![can_spawn_for_attach]} {
     return 0
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
index d10f86f8fa1..da6812884c3 100644
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
@@ -15,9 +15,7 @@
 # Contributed by Markus Deuling <deuling@de.ibm.com>.
 #
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 # Library file.
 set libname "solib-symbol-lib"
diff --git a/gdb/testsuite/gdb.base/solib-vanish.exp b/gdb/testsuite/gdb.base/solib-vanish.exp
index e2280b99771..5e6b9cb2517 100644
--- a/gdb/testsuite/gdb.base/solib-vanish.exp
+++ b/gdb/testsuite/gdb.base/solib-vanish.exp
@@ -53,9 +53,7 @@
 # 1) GDB does not segfault when stepping
 # 2) The stack frame is printed
 
-if { [skip_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 # Library 2
 set lib2name "solib-vanish-lib2"
diff --git a/gdb/testsuite/gdb.base/solib-weak.exp b/gdb/testsuite/gdb.base/solib-weak.exp
index f92640fcb0e..655cf087838 100644
--- a/gdb/testsuite/gdb.base/solib-weak.exp
+++ b/gdb/testsuite/gdb.base/solib-weak.exp
@@ -17,9 +17,7 @@
 # than one shared library, when one of the implementations is a "weak"
 # symbol.  GDB should set a breakpoint at the first copy it finds.
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 # These targets have shared libraries, but weak symbols are not meaningful.
 if {([istarget *-*-mingw*]
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index 78948f53246..666bf96d38e 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -33,9 +33,7 @@ if {![is_elf_target]} {
     return 0
 }
 
-if [skip_shlib_tests] {
-    return 0
-}
+require !skip_shlib_tests
 
 set target_size TARGET_UNKNOWN
 if {[is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.base/symtab-search-order.exp b/gdb/testsuite/gdb.base/symtab-search-order.exp
index 77888f06a6b..06b03c01dc0 100644
--- a/gdb/testsuite/gdb.base/symtab-search-order.exp
+++ b/gdb/testsuite/gdb.base/symtab-search-order.exp
@@ -13,9 +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_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile .c symtab-search-order-1.c symtab-search-order-shlib-1.c
 set srcfile  $srcdir/$subdir/$srcfile
diff --git a/gdb/testsuite/gdb.base/type-opaque.exp b/gdb/testsuite/gdb.base/type-opaque.exp
index 40a0df68b08..e602f341322 100644
--- a/gdb/testsuite/gdb.base/type-opaque.exp
+++ b/gdb/testsuite/gdb.base/type-opaque.exp
@@ -15,9 +15,7 @@
 
 # Test resolving of an opaque type from the loaded shared library.
 
-if {[skip_shlib_tests]} {
-    return -1
-}
+require !skip_shlib_tests
 
 standard_testfile type-opaque-main.c
 
diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp
index 2bd8d21e621..3f74e45b499 100644
--- a/gdb/testsuite/gdb.base/unload.exp
+++ b/gdb/testsuite/gdb.base/unload.exp
@@ -19,9 +19,7 @@
 # test running programs
 #
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 set testfile "unload"
 set libfile "unloadshr"
diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.exp b/gdb/testsuite/gdb.base/watchpoint-solib.exp
index 0f7c8937af6..559d77c82be 100644
--- a/gdb/testsuite/gdb.base/watchpoint-solib.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-solib.exp
@@ -26,9 +26,7 @@ set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
 #
 
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 set testfile "watchpoint-solib"
 set libfile "watchpoint-solib-shr"
diff --git a/gdb/testsuite/gdb.btrace/dlopen.exp b/gdb/testsuite/gdb.btrace/dlopen.exp
index 5d4d768dac4..b742cfa86bd 100644
--- a/gdb/testsuite/gdb.btrace/dlopen.exp
+++ b/gdb/testsuite/gdb.btrace/dlopen.exp
@@ -15,15 +15,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
-
-if { [skip_shlib_tests]  } {
-    unsupported "target does not support shared library tests"
-    return -1
-}
+require !skip_btrace_tests !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index 36b504f1cab..d5f71d952a3 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -366,10 +366,7 @@ if { $srcfile3 != "" } {
 
 # Shared library tests.
 
-if {[skip_shlib_tests]} {
-    untested "skipping shlib tests"
-    return;
-}
+require !skip_shlib_tests
 
 set libbin [standard_output_file ${testfile}-shlib.so]
 set binfile [standard_output_file ${testfile}-shlib]
diff --git a/gdb/testsuite/gdb.cp/except-multi-location.exp b/gdb/testsuite/gdb.cp/except-multi-location.exp
index 4c8eefa5e7a..3730d468000 100644
--- a/gdb/testsuite/gdb.cp/except-multi-location.exp
+++ b/gdb/testsuite/gdb.cp/except-multi-location.exp
@@ -19,9 +19,7 @@
 # on the libstc++.so DSO (which is how GDB was built and revealed the
 # bug), and vice versa.
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 # STATIC_BIN indicates whether to build the main binary with
 # -static-libgcc/-static-libstdc++.  STATIC_LIB is the same, but for
diff --git a/gdb/testsuite/gdb.cp/infcall-dlopen.exp b/gdb/testsuite/gdb.cp/infcall-dlopen.exp
index 6f662d744c3..bd66213daaf 100644
--- a/gdb/testsuite/gdb.cp/infcall-dlopen.exp
+++ b/gdb/testsuite/gdb.cp/infcall-dlopen.exp
@@ -13,9 +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_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile .cc infcall-dlopen-lib.cc
 set libfile [standard_output_file ${testfile}.so]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
index 733116f18e0..06cf8daa5d6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
@@ -19,11 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-if {[skip_shlib_tests]} {
-    return 0
-}
+require dwarf2_support !skip_shlib_tests
 
 standard_testfile .c -shlib.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index f58be5dd2ec..4b1334bb6c3 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -49,9 +49,7 @@
 # which is then used by a shared object.
 
 # This test can't be run on targets lacking shared library support.
-if [skip_shlib_tests] {
-    return 0
-}
+require !skip_shlib_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
index 5646c6f71e6..e2d9172495d 100644
--- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
@@ -13,9 +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_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 load_lib mi-support.exp
 
diff --git a/gdb/testsuite/gdb.mi/mi-catch-load.exp b/gdb/testsuite/gdb.mi/mi-catch-load.exp
index fa848ed8acd..f182e380770 100644
--- a/gdb/testsuite/gdb.mi/mi-catch-load.exp
+++ b/gdb/testsuite/gdb.mi/mi-catch-load.exp
@@ -14,9 +14,7 @@
 #
 load_lib mi-support.exp
 
-if {[skip_shlib_tests]} {
-    return -1
-}
+require !skip_shlib_tests
 
 standard_testfile mi-catch-load.c
 
diff --git a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
index 9eb671ac701..54b9ca53bcd 100644
--- a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
@@ -19,9 +19,7 @@
 
 load_lib mi-support.exp
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile mi-dprintf-pending.c
 
diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp
index 950b17d5473..c19f3c33852 100644
--- a/gdb/testsuite/gdb.mi/mi-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-pending.exp
@@ -20,9 +20,7 @@ set MIFLAGS "-i=mi"
 # test running programs
 #
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile mi-pending.c
 
diff --git a/gdb/testsuite/gdb.mi/mi-solib.exp b/gdb/testsuite/gdb.mi/mi-solib.exp
index 39b67ef21eb..0a5650d83bf 100644
--- a/gdb/testsuite/gdb.mi/mi-solib.exp
+++ b/gdb/testsuite/gdb.mi/mi-solib.exp
@@ -16,10 +16,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
-if {[skip_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp b/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp
index bbbf898af92..9e738fb1fb5 100644
--- a/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp
@@ -20,9 +20,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-if { [skip_shlib_tests] } {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile .c -lib.c
 set shlib_path [standard_output_file ${testfile}-lib.so]
diff --git a/gdb/testsuite/gdb.opt/solib-intra-step.exp b/gdb/testsuite/gdb.opt/solib-intra-step.exp
index 854ae45a520..c0e9cba0051 100644
--- a/gdb/testsuite/gdb.opt/solib-intra-step.exp
+++ b/gdb/testsuite/gdb.opt/solib-intra-step.exp
@@ -15,9 +15,7 @@
 
 standard_testfile
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 # Library file.
 set libname "${testfile}-lib"
diff --git a/gdb/testsuite/gdb.python/py-event-load.exp b/gdb/testsuite/gdb.python/py-event-load.exp
index c3667b858b2..8dce6f19e5a 100644
--- a/gdb/testsuite/gdb.python/py-event-load.exp
+++ b/gdb/testsuite/gdb.python/py-event-load.exp
@@ -18,10 +18,7 @@
 
 load_lib gdb-python.exp
 
-if {[skip_shlib_tests]} {
-    untested "skipping shared library tests"
-    return -1
-}
+require !skip_shlib_tests
 
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index 31ff68ba1de..7cc2c40a299 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -16,10 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-if {[skip_shlib_tests]} {
-	untested "skipping shared library tests"
-    return 0
-}
+require !skip_shlib_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp
index 2d869abb6fd..ac68e2cbd07 100644
--- a/gdb/testsuite/gdb.python/py-shared.exp
+++ b/gdb/testsuite/gdb.python/py-shared.exp
@@ -17,9 +17,7 @@
 
 load_lib gdb-python.exp
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.server/server-exec-info.exp b/gdb/testsuite/gdb.server/server-exec-info.exp
index 28b295a95eb..a80c0f96480 100644
--- a/gdb/testsuite/gdb.server/server-exec-info.exp
+++ b/gdb/testsuite/gdb.server/server-exec-info.exp
@@ -18,9 +18,7 @@ load_lib gdbserver-support.exp
 # We test for skip_shlib_tests in this test because without a main
 # exec file we only have the exec target loaded if shared libraries
 # are present.
-if {[skip_gdbserver_tests] || [skip_shlib_tests]} {
-    return
-}
+require !skip_gdbserver_tests !skip_shlib_tests
 
 standard_testfile server.c
 if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp
index 1a117c9efaa..f22ec8956c4 100644
--- a/gdb/testsuite/gdb.server/solib-list.exp
+++ b/gdb/testsuite/gdb.server/solib-list.exp
@@ -23,9 +23,7 @@
 load_lib gdbserver-support.exp
 load_lib prelink-support.exp
 
-if {[skip_gdbserver_tests] || [skip_shlib_tests]} {
-    return
-}
+require !skip_gdbserver_tests !skip_shlib_tests
 
 standard_testfile solib-list-main.c
 set srclibfile ${testfile}-lib.c
diff --git a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
index c97e0284475..7ab61bfa890 100644
--- a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
@@ -13,7 +13,8 @@
 # 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 {![isnative] || ![istarget *-linux*] || [skip_shlib_tests]} {
+require isnative !skip_shlib_tests
+if {![istarget *-linux*]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp
index fced0a4f992..75d381db3e9 100644
--- a/gdb/testsuite/gdb.trace/change-loc.exp
+++ b/gdb/testsuite/gdb.trace/change-loc.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 if ![gdb_trace_common_supports_arch] {
     unsupported "no trace-common.h support for arch"
diff --git a/gdb/testsuite/gdb.trace/ftrace-lock.exp b/gdb/testsuite/gdb.trace/ftrace-lock.exp
index 47d40832eb2..e5e8638b306 100644
--- a/gdb/testsuite/gdb.trace/ftrace-lock.exp
+++ b/gdb/testsuite/gdb.trace/ftrace-lock.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
index 2061e793ca0..bab97cbe605 100644
--- a/gdb/testsuite/gdb.trace/ftrace.exp
+++ b/gdb/testsuite/gdb.trace/ftrace.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
index 034683d1cae..1ea8e728fb9 100644
--- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
+++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
@@ -15,9 +15,7 @@
 
 load_lib trace-support.exp
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 if ![gdb_trace_common_supports_arch] {
     unsupported "no trace-common.h support for arch"
     return -1
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index e53ea6211cd..deaaeef1926 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 if ![gdb_trace_common_supports_arch] {
     unsupported "no trace-common.h support for arch"
diff --git a/gdb/testsuite/gdb.trace/range-stepping.exp b/gdb/testsuite/gdb.trace/range-stepping.exp
index 83e364558a5..cf0758e745f 100644
--- a/gdb/testsuite/gdb.trace/range-stepping.exp
+++ b/gdb/testsuite/gdb.trace/range-stepping.exp
@@ -65,9 +65,7 @@ proc range_stepping_with_tracepoint { type } {
 
 range_stepping_with_tracepoint "trace"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp
index 1df56b8c159..f3904c21189 100644
--- a/gdb/testsuite/gdb.trace/strace.exp
+++ b/gdb/testsuite/gdb.trace/strace.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp
index 2f63346bed7..3630aae9d69 100644
--- a/gdb/testsuite/gdb.trace/trace-break.exp
+++ b/gdb/testsuite/gdb.trace/trace-break.exp
@@ -345,9 +345,7 @@ foreach at_first_loc { "1" "0" } {
 break_trace_same_addr_6 "trace" "enable" "trace" "disable"
 break_trace_same_addr_6 "trace" "disable" "trace" "enable"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
index b683b2ae413..d6f7fc0302a 100644
--- a/gdb/testsuite/gdb.trace/trace-condition.exp
+++ b/gdb/testsuite/gdb.trace/trace-condition.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/trace-enable-disable.exp b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
index ec28d5c2c1f..e42f6f75225 100644
--- a/gdb/testsuite/gdb.trace/trace-enable-disable.exp
+++ b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp
index 80188e8dde1..e57cad8090c 100644
--- a/gdb/testsuite/gdb.trace/trace-mt.exp
+++ b/gdb/testsuite/gdb.trace/trace-mt.exp
@@ -108,9 +108,7 @@ foreach break_always_inserted { "on" "off" } {
 
 step_over_tracepoint "trace"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp
index 2449598d058..cbb958ae41b 100644
--- a/gdb/testsuite/gdb.trace/tspeed.exp
+++ b/gdb/testsuite/gdb.trace/tspeed.exp
@@ -15,9 +15,7 @@
 
 load_lib "trace-support.exp"
 
-if {[skip_shlib_tests]} {
-    return 0
-}
+require !skip_shlib_tests
 
 # Do not run if gdbsever debug is enabled - the output file is many Gb.
 if [gdbserver_debug_enabled] {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 10/79] Use require skip_dlmopen_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (8 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 09/79] Use require skip_shlib_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 11/79] Use require skip_stl_tests Tom Tromey
                   ` (70 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_dlmopen_tests".
---
 gdb/testsuite/gdb.base/dlmopen.exp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.base/dlmopen.exp b/gdb/testsuite/gdb.base/dlmopen.exp
index 6243f6e7071..4bbe37eb39d 100644
--- a/gdb/testsuite/gdb.base/dlmopen.exp
+++ b/gdb/testsuite/gdb.base/dlmopen.exp
@@ -21,10 +21,7 @@
 # We test that GDB shows the correct number of instances of the libraries
 # the test loaded while unloading them one-by-one.
 
-if { [skip_dlmopen_tests] } {
-    unsupported "target does not support dlmopen debugging"
-    return -1
-}
+require !skip_dlmopen_tests
 
 standard_testfile
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 11/79] Use require skip_stl_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (9 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 10/79] Use require skip_dlmopen_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 12/79] Use require skip_rust_tests Tom Tromey
                   ` (69 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_stl_tests".
---
 gdb/testsuite/gdb.cp/bs15503.exp      | 2 +-
 gdb/testsuite/gdb.cp/exception.exp    | 2 +-
 gdb/testsuite/gdb.cp/mb-templates.exp | 2 +-
 gdb/testsuite/gdb.cp/try_catch.exp    | 2 +-
 gdb/testsuite/gdb.cp/userdef.exp      | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.cp/bs15503.exp b/gdb/testsuite/gdb.cp/bs15503.exp
index 9e80e9b74c0..870d36d29b4 100644
--- a/gdb/testsuite/gdb.cp/bs15503.exp
+++ b/gdb/testsuite/gdb.cp/bs15503.exp
@@ -17,7 +17,7 @@
 # This file was written by Sue Kimura (sue_kimura@hp.com)
 # Rewritten by Michael Chastain (mec.gnu@mindspring.com)
 
-if { [skip_stl_tests] } { return }
+require !skip_stl_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp
index 3df6e7bce43..3b47143277e 100644
--- a/gdb/testsuite/gdb.cp/exception.exp
+++ b/gdb/testsuite/gdb.cp/exception.exp
@@ -33,7 +33,7 @@
 set ws	"\[\r\n\t \]+"
 set nl	"\[\r\n\]+"
 
-if { [skip_stl_tests] } { return }
+require !skip_stl_tests
 
 standard_testfile .cc
  
diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp
index d4e7d3925ba..17f9e8102cd 100644
--- a/gdb/testsuite/gdb.cp/mb-templates.exp
+++ b/gdb/testsuite/gdb.cp/mb-templates.exp
@@ -16,7 +16,7 @@
 # This test verifies that setting breakpoint on line in template
 # function will fire in all instantiations of that template.
 
-if { [skip_stl_tests] } { continue }
+require !skip_stl_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/try_catch.exp b/gdb/testsuite/gdb.cp/try_catch.exp
index f1d372b0b69..9dd7eecbfe3 100644
--- a/gdb/testsuite/gdb.cp/try_catch.exp
+++ b/gdb/testsuite/gdb.cp/try_catch.exp
@@ -18,7 +18,7 @@
 
 # This file is part of the gdb testsuite
 
-if { [skip_stl_tests] } { return }
+require !skip_stl_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/userdef.exp b/gdb/testsuite/gdb.cp/userdef.exp
index fbe1bc7d3f9..1ab609bd480 100644
--- a/gdb/testsuite/gdb.cp/userdef.exp
+++ b/gdb/testsuite/gdb.cp/userdef.exp
@@ -19,7 +19,7 @@
 # source file "userdef.cc"
 #
 
-if { [skip_stl_tests] } { return }
+require !skip_stl_tests
 
 standard_testfile .cc
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 12/79] Use require skip_rust_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (10 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 11/79] Use require skip_stl_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 13/79] Use require skip_fortran_tests Tom Tromey
                   ` (68 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_rust_tests".
---
 gdb/testsuite/gdb.rust/dwindex.exp    | 4 +---
 gdb/testsuite/gdb.rust/expr.exp       | 2 +-
 gdb/testsuite/gdb.rust/fnfield.exp    | 4 +---
 gdb/testsuite/gdb.rust/generics.exp   | 4 +---
 gdb/testsuite/gdb.rust/methods.exp    | 4 +---
 gdb/testsuite/gdb.rust/modules.exp    | 4 +---
 gdb/testsuite/gdb.rust/pp.exp         | 4 +---
 gdb/testsuite/gdb.rust/rawids.exp     | 4 +---
 gdb/testsuite/gdb.rust/rust-style.exp | 4 +---
 gdb/testsuite/gdb.rust/simple.exp     | 4 +---
 gdb/testsuite/gdb.rust/traits.exp     | 4 +---
 gdb/testsuite/gdb.rust/unicode.exp    | 4 +---
 gdb/testsuite/gdb.rust/union.exp      | 4 +---
 gdb/testsuite/gdb.rust/unsized.exp    | 4 +---
 gdb/testsuite/gdb.rust/watch.exp      | 4 +---
 15 files changed, 15 insertions(+), 43 deletions(-)

diff --git a/gdb/testsuite/gdb.rust/dwindex.exp b/gdb/testsuite/gdb.rust/dwindex.exp
index 4f05cb9eca8..a617457571f 100644
--- a/gdb/testsuite/gdb.rust/dwindex.exp
+++ b/gdb/testsuite/gdb.rust/dwindex.exp
@@ -16,9 +16,7 @@
 # Test that a rustc-produced .debug_aranges can be read.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 
diff --git a/gdb/testsuite/gdb.rust/expr.exp b/gdb/testsuite/gdb.rust/expr.exp
index d67199eae68..8fd6b23023f 100644
--- a/gdb/testsuite/gdb.rust/expr.exp
+++ b/gdb/testsuite/gdb.rust/expr.exp
@@ -17,7 +17,7 @@
 # Rust compiler.  This serves as a smoke test.
 
 load_lib "rust-support.exp"
-if {[skip_rust_tests]} { return }
+require !skip_rust_tests
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.rust/fnfield.exp b/gdb/testsuite/gdb.rust/fnfield.exp
index 21f0facd4c3..2f6ddd74828 100644
--- a/gdb/testsuite/gdb.rust/fnfield.exp
+++ b/gdb/testsuite/gdb.rust/fnfield.exp
@@ -16,9 +16,7 @@
 # Test trait object printing.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/generics.exp b/gdb/testsuite/gdb.rust/generics.exp
index fa0f7b9f813..5c0c105abe5 100644
--- a/gdb/testsuite/gdb.rust/generics.exp
+++ b/gdb/testsuite/gdb.rust/generics.exp
@@ -16,9 +16,7 @@
 # Test expressions involving generics.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/methods.exp b/gdb/testsuite/gdb.rust/methods.exp
index e57ef2fe21b..dfbebd6bc38 100644
--- a/gdb/testsuite/gdb.rust/methods.exp
+++ b/gdb/testsuite/gdb.rust/methods.exp
@@ -16,9 +16,7 @@
 # Test method calls.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/modules.exp b/gdb/testsuite/gdb.rust/modules.exp
index 983fbd1f0a3..9ab758b5d30 100644
--- a/gdb/testsuite/gdb.rust/modules.exp
+++ b/gdb/testsuite/gdb.rust/modules.exp
@@ -16,9 +16,7 @@
 # Test name lookup.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/pp.exp b/gdb/testsuite/gdb.rust/pp.exp
index b077c76a3ef..a456afc1b35 100644
--- a/gdb/testsuite/gdb.rust/pp.exp
+++ b/gdb/testsuite/gdb.rust/pp.exp
@@ -17,9 +17,7 @@
 
 load_lib gdb-python.exp
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/rawids.exp b/gdb/testsuite/gdb.rust/rawids.exp
index 0570697fa6e..234b4329f91 100644
--- a/gdb/testsuite/gdb.rust/rawids.exp
+++ b/gdb/testsuite/gdb.rust/rawids.exp
@@ -16,9 +16,7 @@
 # Test raw identifiers.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 set v [split [rust_compiler_version] .]
 if {[lindex $v 0] == 1 && [lindex $v 1] < 30} {
diff --git a/gdb/testsuite/gdb.rust/rust-style.exp b/gdb/testsuite/gdb.rust/rust-style.exp
index 0a5ff5ecfb4..ed76fbf9760 100644
--- a/gdb/testsuite/gdb.rust/rust-style.exp
+++ b/gdb/testsuite/gdb.rust/rust-style.exp
@@ -16,9 +16,7 @@
 # Test CLI output styling for Rust.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 save_vars { env(TERM) } {
     # We need an ANSI-capable terminal to get the output.
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 3f698f12dcd..7314aab395c 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -16,9 +16,7 @@
 # Test expression parsing and evaluation that requires Rust compiler.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/traits.exp b/gdb/testsuite/gdb.rust/traits.exp
index c3d1b524d7f..63a6df451f8 100644
--- a/gdb/testsuite/gdb.rust/traits.exp
+++ b/gdb/testsuite/gdb.rust/traits.exp
@@ -16,9 +16,7 @@
 # Test trait object printing.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/unicode.exp b/gdb/testsuite/gdb.rust/unicode.exp
index 63ed8d1250c..aa1ace0608a 100644
--- a/gdb/testsuite/gdb.rust/unicode.exp
+++ b/gdb/testsuite/gdb.rust/unicode.exp
@@ -16,9 +16,7 @@
 # Test raw identifiers.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 # Non-ASCII identifiers were allowed starting in 1.53.
 set v [split [rust_compiler_version] .]
diff --git a/gdb/testsuite/gdb.rust/union.exp b/gdb/testsuite/gdb.rust/union.exp
index baf47d2651f..28b787b38da 100644
--- a/gdb/testsuite/gdb.rust/union.exp
+++ b/gdb/testsuite/gdb.rust/union.exp
@@ -16,9 +16,7 @@
 # Test of "union" for Rust.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/unsized.exp b/gdb/testsuite/gdb.rust/unsized.exp
index ca45914444c..ac46b2eefac 100644
--- a/gdb/testsuite/gdb.rust/unsized.exp
+++ b/gdb/testsuite/gdb.rust/unsized.exp
@@ -16,9 +16,7 @@
 # Test expression parsing and evaluation that requires Rust compiler.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/watch.exp b/gdb/testsuite/gdb.rust/watch.exp
index b709c00e394..2c0e57db427 100644
--- a/gdb/testsuite/gdb.rust/watch.exp
+++ b/gdb/testsuite/gdb.rust/watch.exp
@@ -16,9 +16,7 @@
 # Test watch -location with Rust.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 13/79] Use require skip_fortran_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (11 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 12/79] Use require skip_rust_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 14/79] Use require skip_ada_tests Tom Tromey
                   ` (67 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_fortran_tests".
---
 gdb/testsuite/gdb.dwarf2/dw2-common-block.exp             | 4 +---
 gdb/testsuite/gdb.fortran/allocated.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/array-bounds-high.exp           | 2 +-
 gdb/testsuite/gdb.fortran/array-bounds.exp                | 2 +-
 gdb/testsuite/gdb.fortran/array-element.exp               | 2 +-
 gdb/testsuite/gdb.fortran/array-indices.exp               | 2 +-
 gdb/testsuite/gdb.fortran/array-no-bounds.exp             | 2 +-
 gdb/testsuite/gdb.fortran/array-repeat.exp                | 2 +-
 gdb/testsuite/gdb.fortran/array-slices-bad.exp            | 2 +-
 gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp     | 2 +-
 gdb/testsuite/gdb.fortran/array-slices.exp                | 2 +-
 gdb/testsuite/gdb.fortran/associated.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/assumedrank.exp                 | 2 +-
 gdb/testsuite/gdb.fortran/block-data.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/call-no-debug.exp               | 2 +-
 gdb/testsuite/gdb.fortran/charset.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/class-allocatable-array.exp     | 2 +-
 gdb/testsuite/gdb.fortran/common-block.exp                | 4 +---
 gdb/testsuite/gdb.fortran/completion.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/complex.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/debug-expr.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/derived-type-function.exp       | 2 +-
 gdb/testsuite/gdb.fortran/derived-type-striding.exp       | 2 +-
 gdb/testsuite/gdb.fortran/derived-type.exp                | 2 +-
 gdb/testsuite/gdb.fortran/dot-ops.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp        | 2 +-
 gdb/testsuite/gdb.fortran/empty-string.exp                | 2 +-
 gdb/testsuite/gdb.fortran/exprs.exp                       | 2 +-
 gdb/testsuite/gdb.fortran/function-calls.exp              | 2 +-
 gdb/testsuite/gdb.fortran/info-modules.exp                | 2 +-
 gdb/testsuite/gdb.fortran/info-types.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/intrinsics.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/lbound-ubound.exp               | 2 +-
 gdb/testsuite/gdb.fortran/library-module.exp              | 2 +-
 gdb/testsuite/gdb.fortran/logical.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/max-depth.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/mixed-lang-stack.exp            | 2 +-
 gdb/testsuite/gdb.fortran/module.exp                      | 2 +-
 gdb/testsuite/gdb.fortran/multi-dim.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/namelist.exp                    | 2 +-
 gdb/testsuite/gdb.fortran/nested-funcs-2.exp              | 2 +-
 gdb/testsuite/gdb.fortran/nested-funcs.exp                | 2 +-
 gdb/testsuite/gdb.fortran/oop_extend_type.exp             | 4 +---
 gdb/testsuite/gdb.fortran/pointer-to-pointer.exp          | 2 +-
 gdb/testsuite/gdb.fortran/print-formatted.exp             | 4 +---
 gdb/testsuite/gdb.fortran/print_type.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/printing-types.exp              | 2 +-
 gdb/testsuite/gdb.fortran/ptr-indentation.exp             | 2 +-
 gdb/testsuite/gdb.fortran/ptype-on-functions.exp          | 2 +-
 gdb/testsuite/gdb.fortran/rank.exp                        | 2 +-
 gdb/testsuite/gdb.fortran/shape.exp                       | 2 +-
 gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp | 2 +-
 gdb/testsuite/gdb.fortran/size.exp                        | 2 +-
 gdb/testsuite/gdb.fortran/string-types.exp                | 2 +-
 gdb/testsuite/gdb.fortran/subarray.exp                    | 2 +-
 gdb/testsuite/gdb.fortran/type-kinds.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/types.exp                       | 2 +-
 gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp             | 2 +-
 gdb/testsuite/gdb.fortran/vla-datatypes.exp               | 2 +-
 gdb/testsuite/gdb.fortran/vla-history.exp                 | 2 +-
 gdb/testsuite/gdb.fortran/vla-ptr-info.exp                | 2 +-
 gdb/testsuite/gdb.fortran/vla-ptype-sub.exp               | 2 +-
 gdb/testsuite/gdb.fortran/vla-ptype.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/vla-sizeof.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/vla-type.exp                    | 2 +-
 gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp     | 2 +-
 gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp        | 2 +-
 gdb/testsuite/gdb.fortran/vla-value-sub.exp               | 2 +-
 gdb/testsuite/gdb.fortran/vla-value.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/whatis_type.exp                 | 2 +-
 gdb/testsuite/gdb.mi/mi-fortran-modules.exp               | 2 +-
 gdb/testsuite/gdb.mi/mi-var-child-f.exp                   | 2 +-
 gdb/testsuite/gdb.mi/mi-vla-fortran.exp                   | 2 +-
 73 files changed, 73 insertions(+), 81 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index 58e1eccf27c..8f6c0aa75dc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -24,9 +24,7 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
 }
 
 # It requires fortran.
-if {[skip_fortran_tests]} {
-    return 0
-}
+require !skip_fortran_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.fortran/allocated.exp b/gdb/testsuite/gdb.fortran/allocated.exp
index ff054d29e72..d4aba5e2585 100644
--- a/gdb/testsuite/gdb.fortran/allocated.exp
+++ b/gdb/testsuite/gdb.fortran/allocated.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of ALLOCATED keyword.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-bounds-high.exp b/gdb/testsuite/gdb.fortran/array-bounds-high.exp
index f9b30e9a4df..25023ebace5 100644
--- a/gdb/testsuite/gdb.fortran/array-bounds-high.exp
+++ b/gdb/testsuite/gdb.fortran/array-bounds-high.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains test to ensure that
 # array bounds accept LONGEST.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 set testfile "array-bounds-high"
 standard_testfile .f90
diff --git a/gdb/testsuite/gdb.fortran/array-bounds.exp b/gdb/testsuite/gdb.fortran/array-bounds.exp
index b4b9e2954ab..0903d9ed7a0 100644
--- a/gdb/testsuite/gdb.fortran/array-bounds.exp
+++ b/gdb/testsuite/gdb.fortran/array-bounds.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains test to ensure that
 # array bounds accept LONGEST.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 set testfile "array-bounds"
 standard_testfile .f90
diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp
index 5f663fe9d13..1902329fc94 100644
--- a/gdb/testsuite/gdb.fortran/array-element.exp
+++ b/gdb/testsuite/gdb.fortran/array-element.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains test for printing
 # the elements of an array which is passed as pointer to a subroutine.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f
 
diff --git a/gdb/testsuite/gdb.fortran/array-indices.exp b/gdb/testsuite/gdb.fortran/array-indices.exp
index 64d1270d510..299bf3417b6 100644
--- a/gdb/testsuite/gdb.fortran/array-indices.exp
+++ b/gdb/testsuite/gdb.fortran/array-indices.exp
@@ -15,7 +15,7 @@
 
 # Test the printing of element indices in Fortran arrays.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 load_lib fortran.exp
 
diff --git a/gdb/testsuite/gdb.fortran/array-no-bounds.exp b/gdb/testsuite/gdb.fortran/array-no-bounds.exp
index 9ae2851a2db..126cea76ccb 100644
--- a/gdb/testsuite/gdb.fortran/array-no-bounds.exp
+++ b/gdb/testsuite/gdb.fortran/array-no-bounds.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains test to ensure that
 # array bounds accept LONGEST.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-repeat.exp b/gdb/testsuite/gdb.fortran/array-repeat.exp
index 5cb92cc6c86..90b48a398d6 100644
--- a/gdb/testsuite/gdb.fortran/array-repeat.exp
+++ b/gdb/testsuite/gdb.fortran/array-repeat.exp
@@ -15,7 +15,7 @@
 
 # Test the detection and printing of repeated elements in Fortran arrays.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 load_lib fortran.exp
 
diff --git a/gdb/testsuite/gdb.fortran/array-slices-bad.exp b/gdb/testsuite/gdb.fortran/array-slices-bad.exp
index f54e412eecc..f49154b9c6a 100644
--- a/gdb/testsuite/gdb.fortran/array-slices-bad.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices-bad.exp
@@ -15,7 +15,7 @@
 
 # Test invalid element and slice array accesses.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
index 1724e71957f..832aefc0954 100644
--- a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
@@ -15,7 +15,7 @@
 
 # Create a slice of an array, then take a slice of that slice.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp
index 80f6cc122df..8fab57e13e7 100644
--- a/gdb/testsuite/gdb.fortran/array-slices.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices.exp
@@ -33,7 +33,7 @@
 # debug information) matches the size of the slice manually extracted
 # by GDB.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 # This test relies on output from the inferior.
 if [target_info exists gdb,noinferiorio] {
diff --git a/gdb/testsuite/gdb.fortran/associated.exp b/gdb/testsuite/gdb.fortran/associated.exp
index 9ba2b048503..1acc40027c0 100644
--- a/gdb/testsuite/gdb.fortran/associated.exp
+++ b/gdb/testsuite/gdb.fortran/associated.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of ASSOCIATED keyword.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/assumedrank.exp b/gdb/testsuite/gdb.fortran/assumedrank.exp
index fbd43fd0d73..a1e59903014 100644
--- a/gdb/testsuite/gdb.fortran/assumedrank.exp
+++ b/gdb/testsuite/gdb.fortran/assumedrank.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of ASSUMED RANK arrays.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/block-data.exp b/gdb/testsuite/gdb.fortran/block-data.exp
index 533d7807ad6..6f51fce3ddc 100644
--- a/gdb/testsuite/gdb.fortran/block-data.exp
+++ b/gdb/testsuite/gdb.fortran/block-data.exp
@@ -21,7 +21,7 @@
 # outputs nameless DW_TAG_module, unlike with gfortran which just
 # doesn't emit DW_TAG_module in this case.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/call-no-debug.exp b/gdb/testsuite/gdb.fortran/call-no-debug.exp
index c69019643be..d17eb4a5db3 100644
--- a/gdb/testsuite/gdb.fortran/call-no-debug.exp
+++ b/gdb/testsuite/gdb.fortran/call-no-debug.exp
@@ -16,7 +16,7 @@
 # Test calling Fortran functions that are compiled without debug
 # information.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile call-no-debug-prog.f90 call-no-debug-func.f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/charset.exp b/gdb/testsuite/gdb.fortran/charset.exp
index 02e273e9a51..1a860964782 100644
--- a/gdb/testsuite/gdb.fortran/charset.exp
+++ b/gdb/testsuite/gdb.fortran/charset.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains tests for evaluating
 # Fortran subarray expression.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp
index 0b8b10e7be5..76a848c7711 100644
--- a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp
+++ b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp
@@ -16,7 +16,7 @@
 # Test that GDB can print an allocatable array that is a data field
 # within a class like type.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/common-block.exp b/gdb/testsuite/gdb.fortran/common-block.exp
index 0b00db81675..b551bbd428b 100644
--- a/gdb/testsuite/gdb.fortran/common-block.exp
+++ b/gdb/testsuite/gdb.fortran/common-block.exp
@@ -15,9 +15,7 @@
 
 # This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
-if {[skip_fortran_tests]} {
-    return 0
-}
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/completion.exp b/gdb/testsuite/gdb.fortran/completion.exp
index 18798e060c3..4ae6f9ae792 100644
--- a/gdb/testsuite/gdb.fortran/completion.exp
+++ b/gdb/testsuite/gdb.fortran/completion.exp
@@ -15,7 +15,7 @@
 
 # Test tab completion of Fortran type field names.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/complex.exp b/gdb/testsuite/gdb.fortran/complex.exp
index 6b44aa2b462..708b73c3ca4 100644
--- a/gdb/testsuite/gdb.fortran/complex.exp
+++ b/gdb/testsuite/gdb.fortran/complex.exp
@@ -16,7 +16,7 @@
 standard_testfile .f90
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
     return -1
diff --git a/gdb/testsuite/gdb.fortran/debug-expr.exp b/gdb/testsuite/gdb.fortran/debug-expr.exp
index 5d4c96bbec0..75324ac4607 100644
--- a/gdb/testsuite/gdb.fortran/debug-expr.exp
+++ b/gdb/testsuite/gdb.fortran/debug-expr.exp
@@ -15,7 +15,7 @@
 
 # Test "set debug expr 1" on Fortran expressions.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
diff --git a/gdb/testsuite/gdb.fortran/derived-type-function.exp b/gdb/testsuite/gdb.fortran/derived-type-function.exp
index 3ba18c23d86..d7fa4a0378b 100644
--- a/gdb/testsuite/gdb.fortran/derived-type-function.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type-function.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains tests for type-printing
 # and value-printing Fortran derived types having also functions.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/derived-type-striding.exp b/gdb/testsuite/gdb.fortran/derived-type-striding.exp
index 92834375a2d..9a9a3ca8f3f 100644
--- a/gdb/testsuite/gdb.fortran/derived-type-striding.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type-striding.exp
@@ -16,7 +16,7 @@
 # Print some single dimensional integer arrays that will have a byte
 # stride in the debug information.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 
diff --git a/gdb/testsuite/gdb.fortran/derived-type.exp b/gdb/testsuite/gdb.fortran/derived-type.exp
index 5dae95f7f71..be7c1937d78 100644
--- a/gdb/testsuite/gdb.fortran/derived-type.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains tests for type-printing
 # and value-printing Fortran derived types.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/dot-ops.exp b/gdb/testsuite/gdb.fortran/dot-ops.exp
index b47c59db463..049008f90e0 100644
--- a/gdb/testsuite/gdb.fortran/dot-ops.exp
+++ b/gdb/testsuite/gdb.fortran/dot-ops.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } { continue }
+require !skip_fortran_tests
 
 proc test_dot_operations {} {
 
diff --git a/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp b/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp
index af11fa1d4c4..8fb0a6c6cb9 100644
--- a/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp
+++ b/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp
@@ -16,7 +16,7 @@
 # Test using whatis and ptype on different configurations of dynamic
 # types.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/empty-string.exp b/gdb/testsuite/gdb.fortran/empty-string.exp
index 9a8ca91127f..07937741f15 100644
--- a/gdb/testsuite/gdb.fortran/empty-string.exp
+++ b/gdb/testsuite/gdb.fortran/empty-string.exp
@@ -15,7 +15,7 @@
 
 # Test printing of an empty Fortran string.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/exprs.exp b/gdb/testsuite/gdb.fortran/exprs.exp
index 3fb9aba5efe..44773cc3a3b 100644
--- a/gdb/testsuite/gdb.fortran/exprs.exp
+++ b/gdb/testsuite/gdb.fortran/exprs.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } { continue }
+require !skip_fortran_tests
 
 proc test_integer_literals_accepted {} {
     global gdb_prompt
diff --git a/gdb/testsuite/gdb.fortran/function-calls.exp b/gdb/testsuite/gdb.fortran/function-calls.exp
index ab54ead1613..ef5e4e03b62 100644
--- a/gdb/testsuite/gdb.fortran/function-calls.exp
+++ b/gdb/testsuite/gdb.fortran/function-calls.exp
@@ -16,7 +16,7 @@
 # Exercise passing and returning arguments in Fortran. This test case
 # is based on the GNU Fortran Argument passing conventions.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 
diff --git a/gdb/testsuite/gdb.fortran/info-modules.exp b/gdb/testsuite/gdb.fortran/info-modules.exp
index ff5fa3ba946..2992e9f2fd1 100644
--- a/gdb/testsuite/gdb.fortran/info-modules.exp
+++ b/gdb/testsuite/gdb.fortran/info-modules.exp
@@ -19,7 +19,7 @@
 load_lib "fortran.exp"
 load_lib "sym-info-cmds.exp"
 
-if { [skip_fortran_tests] } { return }
+require !skip_fortran_tests
 
 standard_testfile info-types.f90 info-types-2.f90
 
diff --git a/gdb/testsuite/gdb.fortran/info-types.exp b/gdb/testsuite/gdb.fortran/info-types.exp
index 1cea93216e0..565c9cf5190 100644
--- a/gdb/testsuite/gdb.fortran/info-types.exp
+++ b/gdb/testsuite/gdb.fortran/info-types.exp
@@ -18,7 +18,7 @@
 load_lib "fortran.exp"
 load_lib "sym-info-cmds.exp"
 
-if { [skip_fortran_tests] } { return }
+require !skip_fortran_tests
 
 standard_testfile info-types.f90 info-types-2.f90
 
diff --git a/gdb/testsuite/gdb.fortran/intrinsics.exp b/gdb/testsuite/gdb.fortran/intrinsics.exp
index 4f057faa57c..460f242e137 100644
--- a/gdb/testsuite/gdb.fortran/intrinsics.exp
+++ b/gdb/testsuite/gdb.fortran/intrinsics.exp
@@ -17,7 +17,7 @@
 
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } { return }
+require !skip_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
index aec3c351709..563d4b12024 100644
--- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp
+++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of LBOUND and UBOUND.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".F90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/library-module.exp b/gdb/testsuite/gdb.fortran/library-module.exp
index 954fe2826f0..60a37a46361 100644
--- a/gdb/testsuite/gdb.fortran/library-module.exp
+++ b/gdb/testsuite/gdb.fortran/library-module.exp
@@ -15,7 +15,7 @@
 
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile library-module-main.f90 
 set srclibfile ${testfile}-lib.f90
diff --git a/gdb/testsuite/gdb.fortran/logical.exp b/gdb/testsuite/gdb.fortran/logical.exp
index 8b2a1a74cb5..91ef4bc15be 100644
--- a/gdb/testsuite/gdb.fortran/logical.exp
+++ b/gdb/testsuite/gdb.fortran/logical.exp
@@ -18,7 +18,7 @@
 standard_testfile .f90
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
     return -1
diff --git a/gdb/testsuite/gdb.fortran/max-depth.exp b/gdb/testsuite/gdb.fortran/max-depth.exp
index e4ea7bb123c..bbb3b2a21ed 100644
--- a/gdb/testsuite/gdb.fortran/max-depth.exp
+++ b/gdb/testsuite/gdb.fortran/max-depth.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } { return }
+require !skip_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
index 6538e16e566..a1614554556 100644
--- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
+++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
@@ -23,7 +23,7 @@
 # each case to ensure that trying to print objects or types from one
 # language, while GDB's language is set to another, doesn't crash GDB.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile mixed-lang-stack.c mixed-lang-stack.cpp mixed-lang-stack.f90
 
diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp
index 7c6984ee973..8c7e9957f14 100644
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -15,7 +15,7 @@
 
 load_lib "fortran.exp"
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/multi-dim.exp b/gdb/testsuite/gdb.fortran/multi-dim.exp
index 58b78dd3e1d..5646471e863 100644
--- a/gdb/testsuite/gdb.fortran/multi-dim.exp
+++ b/gdb/testsuite/gdb.fortran/multi-dim.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains tests for evaluating
 # Fortran subarray expression.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/namelist.exp b/gdb/testsuite/gdb.fortran/namelist.exp
index 1f5f5bc65c8..bf51e946292 100644
--- a/gdb/testsuite/gdb.fortran/namelist.exp
+++ b/gdb/testsuite/gdb.fortran/namelist.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains tests for fortran
 # namelist.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs-2.exp b/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
index 32166ca871c..344745453cd 100644
--- a/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
+++ b/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
@@ -15,7 +15,7 @@
 
 # Further testing of placing breakpoints in nested subroutines.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 load_lib "fortran.exp"
 
 standard_testfile ".f90"
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs.exp b/gdb/testsuite/gdb.fortran/nested-funcs.exp
index 374199349df..bf8915a2f38 100755
--- a/gdb/testsuite/gdb.fortran/nested-funcs.exp
+++ b/gdb/testsuite/gdb.fortran/nested-funcs.exp
@@ -16,7 +16,7 @@
 # This testcase is supposed to test DWARF static link which is usually
 # used together with nested functions.  
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/oop_extend_type.exp b/gdb/testsuite/gdb.fortran/oop_extend_type.exp
index 6f2924b4743..1ffa5a39fc3 100755
--- a/gdb/testsuite/gdb.fortran/oop_extend_type.exp
+++ b/gdb/testsuite/gdb.fortran/oop_extend_type.exp
@@ -16,9 +16,7 @@
 standard_testfile ".f90"
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } {
-    return -1
-}
+require !skip_fortran_tests
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
      {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp b/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp
index 395789cb98b..a37ab3fedb1 100644
--- a/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp
+++ b/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp
@@ -15,7 +15,7 @@
 
 # Test for GDB printing a pointer to a type containing a buffer.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/print-formatted.exp b/gdb/testsuite/gdb.fortran/print-formatted.exp
index c3b07134cf5..9d552afcc61 100644
--- a/gdb/testsuite/gdb.fortran/print-formatted.exp
+++ b/gdb/testsuite/gdb.fortran/print-formatted.exp
@@ -15,9 +15,7 @@
 
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } {
-    return
-}
+require !skip_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/print_type.exp b/gdb/testsuite/gdb.fortran/print_type.exp
index e30d6a46fea..964b69ef948 100755
--- a/gdb/testsuite/gdb.fortran/print_type.exp
+++ b/gdb/testsuite/gdb.fortran/print_type.exp
@@ -19,7 +19,7 @@
 standard_testfile "pointers.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/printing-types.exp b/gdb/testsuite/gdb.fortran/printing-types.exp
index 098ccbd65e4..82ad7b753e4 100644
--- a/gdb/testsuite/gdb.fortran/printing-types.exp
+++ b/gdb/testsuite/gdb.fortran/printing-types.exp
@@ -13,7 +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_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/ptr-indentation.exp b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
index 549d18e96e4..c420ccdc124 100644
--- a/gdb/testsuite/gdb.fortran/ptr-indentation.exp
+++ b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
@@ -13,7 +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_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
index 730d68ad95a..e52c70fb2a9 100644
--- a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
+++ b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
@@ -15,7 +15,7 @@
 
 # This file contains a test for printing the types of functions.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/rank.exp b/gdb/testsuite/gdb.fortran/rank.exp
index 6e4bd011a28..e3e055b112f 100644
--- a/gdb/testsuite/gdb.fortran/rank.exp
+++ b/gdb/testsuite/gdb.fortran/rank.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of RANK keyword.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/shape.exp b/gdb/testsuite/gdb.fortran/shape.exp
index f203eff6666..2608e74946c 100644
--- a/gdb/testsuite/gdb.fortran/shape.exp
+++ b/gdb/testsuite/gdb.fortran/shape.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of SHAPE keyword.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
index c116f80432a..b7aac47c6fe 100644
--- a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
+++ b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
@@ -17,7 +17,7 @@
 # calls and substring operations that are to be skipped due to short
 # circuiting.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 
diff --git a/gdb/testsuite/gdb.fortran/size.exp b/gdb/testsuite/gdb.fortran/size.exp
index ce74296cb4b..e028455fc63 100644
--- a/gdb/testsuite/gdb.fortran/size.exp
+++ b/gdb/testsuite/gdb.fortran/size.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of SIZE keyword.
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/string-types.exp b/gdb/testsuite/gdb.fortran/string-types.exp
index f202c075422..f553fe592f9 100644
--- a/gdb/testsuite/gdb.fortran/string-types.exp
+++ b/gdb/testsuite/gdb.fortran/string-types.exp
@@ -19,7 +19,7 @@
 standard_testfile .f90
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug f90 quiet}]} {
diff --git a/gdb/testsuite/gdb.fortran/subarray.exp b/gdb/testsuite/gdb.fortran/subarray.exp
index 7222a168342..bc3f33e5aae 100644
--- a/gdb/testsuite/gdb.fortran/subarray.exp
+++ b/gdb/testsuite/gdb.fortran/subarray.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains tests for evaluating
 # Fortran subarray expression.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 standard_testfile .f
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/type-kinds.exp b/gdb/testsuite/gdb.fortran/type-kinds.exp
index be7ca14f5d8..bf2609b3fae 100644
--- a/gdb/testsuite/gdb.fortran/type-kinds.exp
+++ b/gdb/testsuite/gdb.fortran/type-kinds.exp
@@ -19,7 +19,7 @@
 
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } { continue }
+require !skip_fortran_tests
 
 # Cast the value 1 to the type 'BASE_TYPE (kind=TYPE_KIND)'.  The
 # expected result of the cast is CAST_RESULT, and the size of the
diff --git a/gdb/testsuite/gdb.fortran/types.exp b/gdb/testsuite/gdb.fortran/types.exp
index 3bb63f73a8a..dfe9518ed7e 100644
--- a/gdb/testsuite/gdb.fortran/types.exp
+++ b/gdb/testsuite/gdb.fortran/types.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } { continue }
+require !skip_fortran_tests
 
 proc test_integer_literal_types_accepted {} {
     global gdb_prompt
diff --git a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
index 5ec28088aef..9025df0d907 100644
--- a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
+++ b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-datatypes.exp b/gdb/testsuite/gdb.fortran/vla-datatypes.exp
index afff37a3759..dfa3fd626ff 100644
--- a/gdb/testsuite/gdb.fortran/vla-datatypes.exp
+++ b/gdb/testsuite/gdb.fortran/vla-datatypes.exp
@@ -16,7 +16,7 @@
 standard_testfile ".f90"
 load_lib "fortran.exp"
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-history.exp b/gdb/testsuite/gdb.fortran/vla-history.exp
index 5d95d88f836..c95125c66f3 100644
--- a/gdb/testsuite/gdb.fortran/vla-history.exp
+++ b/gdb/testsuite/gdb.fortran/vla-history.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
index a5bf78f1de0..3d864bc87f8 100644
--- a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
+++ b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
index 5efb14b5ac3..2b3355c55b7 100644
--- a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
+++ b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib "fortran.exp"
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran/vla-ptype.exp
index 301d4f60570..798c0d5c58c 100644
--- a/gdb/testsuite/gdb.fortran/vla-ptype.exp
+++ b/gdb/testsuite/gdb.fortran/vla-ptype.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib "fortran.exp"
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-sizeof.exp b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
index 1ffe6a28e26..8344401da49 100644
--- a/gdb/testsuite/gdb.fortran/vla-sizeof.exp
+++ b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-type.exp b/gdb/testsuite/gdb.fortran/vla-type.exp
index 7befd4605c8..1a4d6f430cb 100755
--- a/gdb/testsuite/gdb.fortran/vla-type.exp
+++ b/gdb/testsuite/gdb.fortran/vla-type.exp
@@ -16,7 +16,7 @@
 standard_testfile ".f90"
 load_lib "fortran.exp"
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
      {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
index 7562b489dd9..f836f05df8c 100644
--- a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
index 1463b811eb8..27ddf3b58a5 100644
--- a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub.exp b/gdb/testsuite/gdb.fortran/vla-value-sub.exp
index 5c0556d7998..4785afb7799 100644
--- a/gdb/testsuite/gdb.fortran/vla-value-sub.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value-sub.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib fortran.exp
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp
index 4b99fbcf29b..ec5b6250a9b 100644
--- a/gdb/testsuite/gdb.fortran/vla-value.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib "fortran.exp"
 
-if {[skip_fortran_tests]} { return -1 }
+require !skip_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
      {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/whatis_type.exp b/gdb/testsuite/gdb.fortran/whatis_type.exp
index f29265bc55c..18c2da5e9ea 100644
--- a/gdb/testsuite/gdb.fortran/whatis_type.exp
+++ b/gdb/testsuite/gdb.fortran/whatis_type.exp
@@ -13,7 +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_fortran_tests] } { continue }
+require !skip_fortran_tests
 
 standard_testfile type.f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
index efd74aa63f5..676408bb1db 100644
--- a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
+++ b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
@@ -15,7 +15,7 @@
 
 # Test -symbol-info-modules, listing Fortran modules.
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 load_lib fortran.exp
 load_lib mi-support.exp
diff --git a/gdb/testsuite/gdb.mi/mi-var-child-f.exp b/gdb/testsuite/gdb.mi/mi-var-child-f.exp
index 5a419306886..c5294156159 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child-f.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child-f.exp
@@ -19,7 +19,7 @@ load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 load_lib "fortran.exp"
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
index a234394b602..1d6c91dc9b3 100644
--- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
@@ -16,7 +16,7 @@
 # Verify that, using the MI, we can evaluate a simple Fortran Variable
 # Length Array (VLA).
 
-if { [skip_fortran_tests] } { return -1 }
+require !skip_fortran_tests
 
 load_lib mi-support.exp
 load_lib fortran.exp
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 14/79] Use require skip_ada_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (12 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 13/79] Use require skip_fortran_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 15/79] Use require skip_go_tests Tom Tromey
                   ` (66 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_ada_tests".
---
 gdb/testsuite/gdb.ada/O2_float_param.exp              | 2 +-
 gdb/testsuite/gdb.ada/access_tagged_param.exp         | 2 +-
 gdb/testsuite/gdb.ada/access_to_packed_array.exp      | 2 +-
 gdb/testsuite/gdb.ada/access_to_unbounded_array.exp   | 2 +-
 gdb/testsuite/gdb.ada/addr_arith.exp                  | 2 +-
 gdb/testsuite/gdb.ada/aliased_array.exp               | 2 +-
 gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp           | 2 +-
 gdb/testsuite/gdb.ada/arr_arr.exp                     | 2 +-
 gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp          | 2 +-
 gdb/testsuite/gdb.ada/array_bounds.exp                | 2 +-
 gdb/testsuite/gdb.ada/array_char_idx.exp              | 2 +-
 gdb/testsuite/gdb.ada/array_of_symbolic_length.exp    | 2 +-
 gdb/testsuite/gdb.ada/array_of_variable_length.exp    | 2 +-
 gdb/testsuite/gdb.ada/array_of_variant.exp            | 2 +-
 gdb/testsuite/gdb.ada/array_ptr_renaming.exp          | 2 +-
 gdb/testsuite/gdb.ada/array_return.exp                | 2 +-
 gdb/testsuite/gdb.ada/array_subscript_addr.exp        | 2 +-
 gdb/testsuite/gdb.ada/arraydim.exp                    | 2 +-
 gdb/testsuite/gdb.ada/arrayidx.exp                    | 2 +-
 gdb/testsuite/gdb.ada/arrayparam.exp                  | 2 +-
 gdb/testsuite/gdb.ada/arrayptr.exp                    | 2 +-
 gdb/testsuite/gdb.ada/assign_1.exp                    | 2 +-
 gdb/testsuite/gdb.ada/assign_arr.exp                  | 2 +-
 gdb/testsuite/gdb.ada/atomic_enum.exp                 | 2 +-
 gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp        | 2 +-
 gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp         | 2 +-
 gdb/testsuite/gdb.ada/bias.exp                        | 2 +-
 gdb/testsuite/gdb.ada/big_packed_array.exp            | 2 +-
 gdb/testsuite/gdb.ada/boolean_expr.exp                | 2 +-
 gdb/testsuite/gdb.ada/bp_c_mixed_case.exp             | 2 +-
 gdb/testsuite/gdb.ada/bp_enum_homonym.exp             | 2 +-
 gdb/testsuite/gdb.ada/bp_fun_addr.exp                 | 2 +-
 gdb/testsuite/gdb.ada/bp_inlined_func.exp             | 2 +-
 gdb/testsuite/gdb.ada/bp_on_var.exp                   | 2 +-
 gdb/testsuite/gdb.ada/bp_range_type.exp               | 2 +-
 gdb/testsuite/gdb.ada/bp_reset.exp                    | 2 +-
 gdb/testsuite/gdb.ada/byte_packed_arr.exp             | 2 +-
 gdb/testsuite/gdb.ada/call_pn.exp                     | 2 +-
 gdb/testsuite/gdb.ada/catch_assert_if.exp             | 2 +-
 gdb/testsuite/gdb.ada/catch_ex.exp                    | 2 +-
 gdb/testsuite/gdb.ada/catch_ex_std.exp                | 2 +-
 gdb/testsuite/gdb.ada/char_enum.exp                   | 2 +-
 gdb/testsuite/gdb.ada/char_enum_overload.exp          | 2 +-
 gdb/testsuite/gdb.ada/char_enum_unicode.exp           | 2 +-
 gdb/testsuite/gdb.ada/char_param.exp                  | 2 +-
 gdb/testsuite/gdb.ada/complete.exp                    | 2 +-
 gdb/testsuite/gdb.ada/cond_lang.exp                   | 2 +-
 gdb/testsuite/gdb.ada/convvar_comp.exp                | 2 +-
 gdb/testsuite/gdb.ada/dgopt.exp                       | 2 +-
 gdb/testsuite/gdb.ada/disc_arr_bound.exp              | 2 +-
 gdb/testsuite/gdb.ada/discrete-char.exp               | 2 +-
 gdb/testsuite/gdb.ada/display_nested.exp              | 2 +-
 gdb/testsuite/gdb.ada/dot_all.exp                     | 2 +-
 gdb/testsuite/gdb.ada/dyn_arrayidx.exp                | 2 +-
 gdb/testsuite/gdb.ada/dyn_loc.exp                     | 2 +-
 gdb/testsuite/gdb.ada/dyn_stride.exp                  | 2 +-
 gdb/testsuite/gdb.ada/dynamic-iface.exp               | 2 +-
 gdb/testsuite/gdb.ada/enum_idx_packed.exp             | 2 +-
 gdb/testsuite/gdb.ada/enum_qual.exp                   | 2 +-
 gdb/testsuite/gdb.ada/enums_overload.exp              | 2 +-
 gdb/testsuite/gdb.ada/excep_handle.exp                | 2 +-
 gdb/testsuite/gdb.ada/exec_changed.exp                | 2 +-
 gdb/testsuite/gdb.ada/expr_delims.exp                 | 2 +-
 gdb/testsuite/gdb.ada/expr_with_funcall.exp           | 2 +-
 gdb/testsuite/gdb.ada/exprs.exp                       | 2 +-
 gdb/testsuite/gdb.ada/fin_fun_out.exp                 | 2 +-
 gdb/testsuite/gdb.ada/fixed_cmp.exp                   | 2 +-
 gdb/testsuite/gdb.ada/fixed_points.exp                | 2 +-
 gdb/testsuite/gdb.ada/fixed_points_function.exp       | 2 +-
 gdb/testsuite/gdb.ada/float-bits.exp                  | 2 +-
 gdb/testsuite/gdb.ada/float_param.exp                 | 2 +-
 gdb/testsuite/gdb.ada/formatted_ref.exp               | 2 +-
 gdb/testsuite/gdb.ada/frame_arg_lang.exp              | 2 +-
 gdb/testsuite/gdb.ada/frame_args.exp                  | 2 +-
 gdb/testsuite/gdb.ada/fullname_bp.exp                 | 2 +-
 gdb/testsuite/gdb.ada/fun_addr.exp                    | 2 +-
 gdb/testsuite/gdb.ada/fun_in_declare.exp              | 2 +-
 gdb/testsuite/gdb.ada/fun_overload_menu.exp           | 2 +-
 gdb/testsuite/gdb.ada/fun_renaming.exp                | 2 +-
 gdb/testsuite/gdb.ada/funcall_char.exp                | 2 +-
 gdb/testsuite/gdb.ada/funcall_param.exp               | 2 +-
 gdb/testsuite/gdb.ada/funcall_ptr.exp                 | 2 +-
 gdb/testsuite/gdb.ada/funcall_ref.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ghost.exp                       | 2 +-
 gdb/testsuite/gdb.ada/homonym.exp                     | 2 +-
 gdb/testsuite/gdb.ada/info_addr_mixed_case.exp        | 2 +-
 gdb/testsuite/gdb.ada/info_auto_lang.exp              | 2 +-
 gdb/testsuite/gdb.ada/info_exc.exp                    | 2 +-
 gdb/testsuite/gdb.ada/info_locals_renaming.exp        | 2 +-
 gdb/testsuite/gdb.ada/info_types.exp                  | 2 +-
 gdb/testsuite/gdb.ada/inline-section-gc.exp           | 2 +-
 gdb/testsuite/gdb.ada/int_deref.exp                   | 2 +-
 gdb/testsuite/gdb.ada/interface.exp                   | 2 +-
 gdb/testsuite/gdb.ada/iwide.exp                       | 2 +-
 gdb/testsuite/gdb.ada/lang_switch.exp                 | 2 +-
 gdb/testsuite/gdb.ada/length_cond.exp                 | 2 +-
 gdb/testsuite/gdb.ada/literals.exp                    | 2 +-
 gdb/testsuite/gdb.ada/local-enum.exp                  | 2 +-
 gdb/testsuite/gdb.ada/maint_with_ada.exp              | 2 +-
 gdb/testsuite/gdb.ada/mi_catch_assert.exp             | 2 +-
 gdb/testsuite/gdb.ada/mi_catch_ex.exp                 | 2 +-
 gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp            | 2 +-
 gdb/testsuite/gdb.ada/mi_dyn_arr.exp                  | 2 +-
 gdb/testsuite/gdb.ada/mi_ex_cond.exp                  | 2 +-
 gdb/testsuite/gdb.ada/mi_exc_info.exp                 | 2 +-
 gdb/testsuite/gdb.ada/mi_interface.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_prot.exp                     | 2 +-
 gdb/testsuite/gdb.ada/mi_ref_changeable.exp           | 2 +-
 gdb/testsuite/gdb.ada/mi_string_access.exp            | 2 +-
 gdb/testsuite/gdb.ada/mi_task_arg.exp                 | 2 +-
 gdb/testsuite/gdb.ada/mi_task_info.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_var_access.exp               | 4 +---
 gdb/testsuite/gdb.ada/mi_var_array.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_var_union.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_variant.exp                  | 2 +-
 gdb/testsuite/gdb.ada/minsyms.exp                     | 2 +-
 gdb/testsuite/gdb.ada/mod_from_name.exp               | 2 +-
 gdb/testsuite/gdb.ada/multiarray.exp                  | 2 +-
 gdb/testsuite/gdb.ada/n_arr_bound.exp                 | 2 +-
 gdb/testsuite/gdb.ada/nested.exp                      | 2 +-
 gdb/testsuite/gdb.ada/non-ascii-latin-1.exp           | 2 +-
 gdb/testsuite/gdb.ada/non-ascii-latin-3.exp           | 2 +-
 gdb/testsuite/gdb.ada/non-ascii-utf-8.exp             | 2 +-
 gdb/testsuite/gdb.ada/notcplusplus.exp                | 2 +-
 gdb/testsuite/gdb.ada/null_array.exp                  | 2 +-
 gdb/testsuite/gdb.ada/null_overload.exp               | 2 +-
 gdb/testsuite/gdb.ada/null_record.exp                 | 2 +-
 gdb/testsuite/gdb.ada/operator_bp.exp                 | 2 +-
 gdb/testsuite/gdb.ada/operator_call.exp               | 2 +-
 gdb/testsuite/gdb.ada/optim_drec.exp                  | 2 +-
 gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp      | 2 +-
 gdb/testsuite/gdb.ada/overload_menu_crash.exp         | 2 +-
 gdb/testsuite/gdb.ada/packed_array.exp                | 2 +-
 gdb/testsuite/gdb.ada/packed_array_assign.exp         | 2 +-
 gdb/testsuite/gdb.ada/packed_record.exp               | 2 +-
 gdb/testsuite/gdb.ada/packed_tagged.exp               | 2 +-
 gdb/testsuite/gdb.ada/pckd_arr_ren.exp                | 2 +-
 gdb/testsuite/gdb.ada/pckd_neg.exp                    | 2 +-
 gdb/testsuite/gdb.ada/pkd_arr_elem.exp                | 2 +-
 gdb/testsuite/gdb.ada/pp-rec-component.exp            | 2 +-
 gdb/testsuite/gdb.ada/print_chars.exp                 | 2 +-
 gdb/testsuite/gdb.ada/print_pc.exp                    | 2 +-
 gdb/testsuite/gdb.ada/ptr_typedef.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ptype_arith_binop.exp           | 2 +-
 gdb/testsuite/gdb.ada/ptype_array.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ptype_field.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ptype_tagged_param.exp          | 2 +-
 gdb/testsuite/gdb.ada/ptype_union.exp                 | 2 +-
 gdb/testsuite/gdb.ada/py_range.exp                    | 2 +-
 gdb/testsuite/gdb.ada/py_taft.exp                     | 2 +-
 gdb/testsuite/gdb.ada/rdv_wait.exp                    | 2 +-
 gdb/testsuite/gdb.ada/rec_comp.exp                    | 2 +-
 gdb/testsuite/gdb.ada/rec_ptype.exp                   | 2 +-
 gdb/testsuite/gdb.ada/rec_return.exp                  | 2 +-
 gdb/testsuite/gdb.ada/ref_param.exp                   | 2 +-
 gdb/testsuite/gdb.ada/ref_tick_size.exp               | 2 +-
 gdb/testsuite/gdb.ada/rename_subscript_param.exp      | 2 +-
 gdb/testsuite/gdb.ada/repeat_dyn.exp                  | 2 +-
 gdb/testsuite/gdb.ada/same_component_name.exp         | 2 +-
 gdb/testsuite/gdb.ada/same_enum.exp                   | 2 +-
 gdb/testsuite/gdb.ada/scalar_storage.exp              | 2 +-
 gdb/testsuite/gdb.ada/scoped_watch.exp                | 2 +-
 gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp            | 2 +-
 gdb/testsuite/gdb.ada/set_wstr.exp                    | 2 +-
 gdb/testsuite/gdb.ada/small_reg_param.exp             | 2 +-
 gdb/testsuite/gdb.ada/start.exp                       | 2 +-
 gdb/testsuite/gdb.ada/str_binop_equal.exp             | 2 +-
 gdb/testsuite/gdb.ada/str_ref_cmp.exp                 | 2 +-
 gdb/testsuite/gdb.ada/str_uninit.exp                  | 2 +-
 gdb/testsuite/gdb.ada/sub_variant.exp                 | 2 +-
 gdb/testsuite/gdb.ada/sym_print_name.exp              | 2 +-
 gdb/testsuite/gdb.ada/taft_type.exp                   | 2 +-
 gdb/testsuite/gdb.ada/tagged.exp                      | 2 +-
 gdb/testsuite/gdb.ada/tagged_access.exp               | 2 +-
 gdb/testsuite/gdb.ada/tagged_not_init.exp             | 2 +-
 gdb/testsuite/gdb.ada/task_bp.exp                     | 2 +-
 gdb/testsuite/gdb.ada/task_switch_in_core.exp         | 2 +-
 gdb/testsuite/gdb.ada/task_watch.exp                  | 2 +-
 gdb/testsuite/gdb.ada/tasks.exp                       | 2 +-
 gdb/testsuite/gdb.ada/tick_last_segv.exp              | 2 +-
 gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp  | 2 +-
 gdb/testsuite/gdb.ada/type_coercion.exp               | 2 +-
 gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp      | 2 +-
 gdb/testsuite/gdb.ada/unchecked_union.exp             | 2 +-
 gdb/testsuite/gdb.ada/uninitialized_vars.exp          | 2 +-
 gdb/testsuite/gdb.ada/unsigned_last.exp               | 2 +-
 gdb/testsuite/gdb.ada/unsigned_range.exp              | 2 +-
 gdb/testsuite/gdb.ada/var_arr_attrs.exp               | 2 +-
 gdb/testsuite/gdb.ada/var_arr_typedef.exp             | 2 +-
 gdb/testsuite/gdb.ada/var_rec_arr.exp                 | 2 +-
 gdb/testsuite/gdb.ada/variant-record.exp              | 2 +-
 gdb/testsuite/gdb.ada/variant.exp                     | 2 +-
 gdb/testsuite/gdb.ada/variant_record_packed_array.exp | 2 +-
 gdb/testsuite/gdb.ada/varsize_limit.exp               | 2 +-
 gdb/testsuite/gdb.ada/vla.exp                         | 2 +-
 gdb/testsuite/gdb.ada/voidctx.exp                     | 2 +-
 gdb/testsuite/gdb.ada/watch_arg.exp                   | 2 +-
 gdb/testsuite/gdb.ada/watch_minus_l.exp               | 2 +-
 gdb/testsuite/gdb.ada/whatis_array_val.exp            | 2 +-
 gdb/testsuite/gdb.ada/widewide.exp                    | 2 +-
 gdb/testsuite/gdb.ada/win_fu_syms.exp                 | 2 +-
 201 files changed, 201 insertions(+), 203 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/O2_float_param.exp b/gdb/testsuite/gdb.ada/O2_float_param.exp
index 1d3196292d8..88ff578d19e 100644
--- a/gdb/testsuite/gdb.ada/O2_float_param.exp
+++ b/gdb/testsuite/gdb.ada/O2_float_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/access_tagged_param.exp b/gdb/testsuite/gdb.ada/access_tagged_param.exp
index 0250f948829..c9c6b3296d7 100644
--- a/gdb/testsuite/gdb.ada/access_tagged_param.exp
+++ b/gdb/testsuite/gdb.ada/access_tagged_param.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/access_to_packed_array.exp b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
index d568ae19bd5..0db9d525910 100644
--- a/gdb/testsuite/gdb.ada/access_to_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
index d28113150f2..f7924ccf67d 100644
--- a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/addr_arith.exp b/gdb/testsuite/gdb.ada/addr_arith.exp
index 6e3f72cc746..59f66c11089 100644
--- a/gdb/testsuite/gdb.ada/addr_arith.exp
+++ b/gdb/testsuite/gdb.ada/addr_arith.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_na07_019
 
diff --git a/gdb/testsuite/gdb.ada/aliased_array.exp b/gdb/testsuite/gdb.ada/aliased_array.exp
index 141c32b135a..6c926c11263 100644
--- a/gdb/testsuite/gdb.ada/aliased_array.exp
+++ b/gdb/testsuite/gdb.ada/aliased_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp b/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
index d6423374aee..2cd664eaf38 100644
--- a/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
+++ b/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile enum_with_gap_main
 
diff --git a/gdb/testsuite/gdb.ada/arr_arr.exp b/gdb/testsuite/gdb.ada/arr_arr.exp
index b565bcd034d..93ed4aafc49 100644
--- a/gdb/testsuite/gdb.ada/arr_arr.exp
+++ b/gdb/testsuite/gdb.ada/arr_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
index 6fcc541f798..ba89c8a1186 100644
--- a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
+++ b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_q418_043
 
diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp
index 5567d448883..ef541f88ec9 100644
--- a/gdb/testsuite/gdb.ada/array_bounds.exp
+++ b/gdb/testsuite/gdb.ada/array_bounds.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/array_char_idx.exp b/gdb/testsuite/gdb.ada/array_char_idx.exp
index 12e9d932e9b..c94950aeba3 100644
--- a/gdb/testsuite/gdb.ada/array_char_idx.exp
+++ b/gdb/testsuite/gdb.ada/array_char_idx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
index 904c665e355..b8295214fe1 100644
--- a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_of_variable_length.exp b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
index ea171e6e062..7536f7e2da8 100644
--- a/gdb/testsuite/gdb.ada/array_of_variable_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_of_variant.exp b/gdb/testsuite/gdb.ada/array_of_variant.exp
index 095259fd5d4..7b7a623bd0a 100644
--- a/gdb/testsuite/gdb.ada/array_of_variant.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variant.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib "gdb-python.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
index faa45979849..c64c612ae83 100644
--- a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
+++ b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp
index 3bc5fba7a50..e101323279f 100644
--- a/gdb/testsuite/gdb.ada/array_return.exp
+++ b/gdb/testsuite/gdb.ada/array_return.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr.exp b/gdb/testsuite/gdb.ada/array_subscript_addr.exp
index b8a00d35936..21f56578d1c 100644
--- a/gdb/testsuite/gdb.ada/array_subscript_addr.exp
+++ b/gdb/testsuite/gdb.ada/array_subscript_addr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/arraydim.exp b/gdb/testsuite/gdb.ada/arraydim.exp
index 6b3a08dfa81..93ea0eb1128 100644
--- a/gdb/testsuite/gdb.ada/arraydim.exp
+++ b/gdb/testsuite/gdb.ada/arraydim.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arrayidx.exp b/gdb/testsuite/gdb.ada/arrayidx.exp
index 85c7eaf8ece..daf05827127 100644
--- a/gdb/testsuite/gdb.ada/arrayidx.exp
+++ b/gdb/testsuite/gdb.ada/arrayidx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/arrayparam.exp b/gdb/testsuite/gdb.ada/arrayparam.exp
index 964ba9b170b..1f7b1387024 100644
--- a/gdb/testsuite/gdb.ada/arrayparam.exp
+++ b/gdb/testsuite/gdb.ada/arrayparam.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp
index 8101a65a240..4e92a110190 100644
--- a/gdb/testsuite/gdb.ada/arrayptr.exp
+++ b/gdb/testsuite/gdb.ada/arrayptr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/assign_1.exp b/gdb/testsuite/gdb.ada/assign_1.exp
index 969bef4ef08..2a3e5dae7fa 100644
--- a/gdb/testsuite/gdb.ada/assign_1.exp
+++ b/gdb/testsuite/gdb.ada/assign_1.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.ada/assign_arr.exp b/gdb/testsuite/gdb.ada/assign_arr.exp
index 394fea9be90..845a2400c2f 100644
--- a/gdb/testsuite/gdb.ada/assign_arr.exp
+++ b/gdb/testsuite/gdb.ada/assign_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile main_p324_051
 
diff --git a/gdb/testsuite/gdb.ada/atomic_enum.exp b/gdb/testsuite/gdb.ada/atomic_enum.exp
index dd038a9284c..a306c416ba8 100644
--- a/gdb/testsuite/gdb.ada/atomic_enum.exp
+++ b/gdb/testsuite/gdb.ada/atomic_enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
index f0c7d902a54..aa502f8de9e 100644
--- a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
+++ b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile "foo"
 
diff --git a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
index 8bbc32b5464..0ac633a6801 100644
--- a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
+++ b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bias.exp b/gdb/testsuite/gdb.ada/bias.exp
index a08dc3e784e..522461590e0 100644
--- a/gdb/testsuite/gdb.ada/bias.exp
+++ b/gdb/testsuite/gdb.ada/bias.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bias
 
diff --git a/gdb/testsuite/gdb.ada/big_packed_array.exp b/gdb/testsuite/gdb.ada/big_packed_array.exp
index 96f61b81274..6b8cbd6f4ba 100644
--- a/gdb/testsuite/gdb.ada/big_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/big_packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_ra24_010
 
diff --git a/gdb/testsuite/gdb.ada/boolean_expr.exp b/gdb/testsuite/gdb.ada/boolean_expr.exp
index 2ed56523ca0..52977f87257 100644
--- a/gdb/testsuite/gdb.ada/boolean_expr.exp
+++ b/gdb/testsuite/gdb.ada/boolean_expr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
index 7012c383513..a18513712eb 100644
--- a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
+++ b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
@@ -20,7 +20,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_h731_021
 
diff --git a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
index 9bbcfa26248..ac9982b38f5 100644
--- a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
+++ b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/bp_fun_addr.exp b/gdb/testsuite/gdb.ada/bp_fun_addr.exp
index 78a1db95fe0..e0a3b52ff79 100644
--- a/gdb/testsuite/gdb.ada/bp_fun_addr.exp
+++ b/gdb/testsuite/gdb.ada/bp_fun_addr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bp_fun_addr
 
diff --git a/gdb/testsuite/gdb.ada/bp_inlined_func.exp b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
index 6242eb5256e..9eaba4fec04 100644
--- a/gdb/testsuite/gdb.ada/bp_inlined_func.exp
+++ b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bp_on_var.exp b/gdb/testsuite/gdb.ada/bp_on_var.exp
index 0ae802f57ae..9f06781d2f1 100644
--- a/gdb/testsuite/gdb.ada/bp_on_var.exp
+++ b/gdb/testsuite/gdb.ada/bp_on_var.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bp_range_type.exp b/gdb/testsuite/gdb.ada/bp_range_type.exp
index 952adbbb2f4..4e36edee805 100644
--- a/gdb/testsuite/gdb.ada/bp_range_type.exp
+++ b/gdb/testsuite/gdb.ada/bp_range_type.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bp_reset.exp b/gdb/testsuite/gdb.ada/bp_reset.exp
index c09ceb371ac..21040e5fbab 100644
--- a/gdb/testsuite/gdb.ada/bp_reset.exp
+++ b/gdb/testsuite/gdb.ada/bp_reset.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/byte_packed_arr.exp b/gdb/testsuite/gdb.ada/byte_packed_arr.exp
index 7618bc49b23..00eb19ce6f7 100644
--- a/gdb/testsuite/gdb.ada/byte_packed_arr.exp
+++ b/gdb/testsuite/gdb.ada/byte_packed_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile reprod_main
 
diff --git a/gdb/testsuite/gdb.ada/call_pn.exp b/gdb/testsuite/gdb.ada/call_pn.exp
index d9eee40d23d..21e2a37c28e 100644
--- a/gdb/testsuite/gdb.ada/call_pn.exp
+++ b/gdb/testsuite/gdb.ada/call_pn.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp b/gdb/testsuite/gdb.ada/catch_assert_if.exp
index 5d493cb8ad6..81ebf33b435 100644
--- a/gdb/testsuite/gdb.ada/catch_assert_if.exp
+++ b/gdb/testsuite/gdb.ada/catch_assert_if.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bla
 
diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp
index 606b66e13ff..87583422418 100644
--- a/gdb/testsuite/gdb.ada/catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index 30d19e1f27b..7bdbadc0fef 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -17,7 +17,7 @@ require !skip_shlib_tests
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_enum.exp b/gdb/testsuite/gdb.ada/char_enum.exp
index 76a1075d666..054c2eaa452 100644
--- a/gdb/testsuite/gdb.ada/char_enum.exp
+++ b/gdb/testsuite/gdb.ada/char_enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_enum_overload.exp b/gdb/testsuite/gdb.ada/char_enum_overload.exp
index 87b67fd1763..66bf25fcb68 100644
--- a/gdb/testsuite/gdb.ada/char_enum_overload.exp
+++ b/gdb/testsuite/gdb.ada/char_enum_overload.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_enum_unicode.exp b/gdb/testsuite/gdb.ada/char_enum_unicode.exp
index 95f110071bc..09afb365312 100644
--- a/gdb/testsuite/gdb.ada/char_enum_unicode.exp
+++ b/gdb/testsuite/gdb.ada/char_enum_unicode.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_param.exp b/gdb/testsuite/gdb.ada/char_param.exp
index 7244df6ee51..fb5aeb47f6f 100644
--- a/gdb/testsuite/gdb.ada/char_param.exp
+++ b/gdb/testsuite/gdb.ada/char_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp
index 14ca358c8e4..2c4674de70e 100644
--- a/gdb/testsuite/gdb.ada/complete.exp
+++ b/gdb/testsuite/gdb.ada/complete.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/cond_lang.exp b/gdb/testsuite/gdb.ada/cond_lang.exp
index 7f9316ebd73..37ec5a40774 100644
--- a/gdb/testsuite/gdb.ada/cond_lang.exp
+++ b/gdb/testsuite/gdb.ada/cond_lang.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile a
 
diff --git a/gdb/testsuite/gdb.ada/convvar_comp.exp b/gdb/testsuite/gdb.ada/convvar_comp.exp
index 2dbd2f92548..7de4e567967 100644
--- a/gdb/testsuite/gdb.ada/convvar_comp.exp
+++ b/gdb/testsuite/gdb.ada/convvar_comp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile pb16_063
 
diff --git a/gdb/testsuite/gdb.ada/dgopt.exp b/gdb/testsuite/gdb.ada/dgopt.exp
index cc920e2b3b6..796595bb312 100644
--- a/gdb/testsuite/gdb.ada/dgopt.exp
+++ b/gdb/testsuite/gdb.ada/dgopt.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile x
 
diff --git a/gdb/testsuite/gdb.ada/disc_arr_bound.exp b/gdb/testsuite/gdb.ada/disc_arr_bound.exp
index d3aafd59c06..a5b5527396f 100644
--- a/gdb/testsuite/gdb.ada/disc_arr_bound.exp
+++ b/gdb/testsuite/gdb.ada/disc_arr_bound.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_n612_026
 
diff --git a/gdb/testsuite/gdb.ada/discrete-char.exp b/gdb/testsuite/gdb.ada/discrete-char.exp
index 367a37a9856..76ec90512d5 100644
--- a/gdb/testsuite/gdb.ada/discrete-char.exp
+++ b/gdb/testsuite/gdb.ada/discrete-char.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/display_nested.exp b/gdb/testsuite/gdb.ada/display_nested.exp
index 6f3f93b3dc5..8ff40deffce 100644
--- a/gdb/testsuite/gdb.ada/display_nested.exp
+++ b/gdb/testsuite/gdb.ada/display_nested.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dot_all.exp b/gdb/testsuite/gdb.ada/dot_all.exp
index 1787d07da6b..91751f0d2b2 100644
--- a/gdb/testsuite/gdb.ada/dot_all.exp
+++ b/gdb/testsuite/gdb.ada/dot_all.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
index c1ae6df3587..db6e7c86507 100644
--- a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
+++ b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dyn_loc.exp b/gdb/testsuite/gdb.ada/dyn_loc.exp
index b75f9141b5e..6693b9d05e1 100644
--- a/gdb/testsuite/gdb.ada/dyn_loc.exp
+++ b/gdb/testsuite/gdb.ada/dyn_loc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/dyn_stride.exp b/gdb/testsuite/gdb.ada/dyn_stride.exp
index 193af5ab78d..85f2bf03564 100644
--- a/gdb/testsuite/gdb.ada/dyn_stride.exp
+++ b/gdb/testsuite/gdb.ada/dyn_stride.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dynamic-iface.exp b/gdb/testsuite/gdb.ada/dynamic-iface.exp
index c2a249f2a15..13e93966819 100644
--- a/gdb/testsuite/gdb.ada/dynamic-iface.exp
+++ b/gdb/testsuite/gdb.ada/dynamic-iface.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if {![gnat_runtime_has_debug_info]} {
     untested "GNAT runtime debuginfo required for this test"
diff --git a/gdb/testsuite/gdb.ada/enum_idx_packed.exp b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
index 4432c7a3fdf..a4232c75a82 100644
--- a/gdb/testsuite/gdb.ada/enum_idx_packed.exp
+++ b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/enum_qual.exp b/gdb/testsuite/gdb.ada/enum_qual.exp
index 599f9e1eafd..807fd421e20 100644
--- a/gdb/testsuite/gdb.ada/enum_qual.exp
+++ b/gdb/testsuite/gdb.ada/enum_qual.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile qual
 
diff --git a/gdb/testsuite/gdb.ada/enums_overload.exp b/gdb/testsuite/gdb.ada/enums_overload.exp
index 32e33650fe2..cb77f50620e 100644
--- a/gdb/testsuite/gdb.ada/enums_overload.exp
+++ b/gdb/testsuite/gdb.ada/enums_overload.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile enums_overload_main
 
diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp
index bb84953a0dc..f02680ffd86 100644
--- a/gdb/testsuite/gdb.ada/excep_handle.exp
+++ b/gdb/testsuite/gdb.ada/excep_handle.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp
index da3f5a33dd0..9ccc46a98d7 100644
--- a/gdb/testsuite/gdb.ada/exec_changed.exp
+++ b/gdb/testsuite/gdb.ada/exec_changed.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
diff --git a/gdb/testsuite/gdb.ada/expr_delims.exp b/gdb/testsuite/gdb.ada/expr_delims.exp
index e52a6f83420..951cc7944e5 100644
--- a/gdb/testsuite/gdb.ada/expr_delims.exp
+++ b/gdb/testsuite/gdb.ada/expr_delims.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/expr_with_funcall.exp b/gdb/testsuite/gdb.ada/expr_with_funcall.exp
index fa453ce99e8..58e9577b4db 100644
--- a/gdb/testsuite/gdb.ada/expr_with_funcall.exp
+++ b/gdb/testsuite/gdb.ada/expr_with_funcall.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile expr_r821_013
 
diff --git a/gdb/testsuite/gdb.ada/exprs.exp b/gdb/testsuite/gdb.ada/exprs.exp
index 13cf18940b6..a2da1f0f2d8 100644
--- a/gdb/testsuite/gdb.ada/exprs.exp
+++ b/gdb/testsuite/gdb.ada/exprs.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/fin_fun_out.exp b/gdb/testsuite/gdb.ada/fin_fun_out.exp
index 704b77eb590..b5d3774e2d1 100644
--- a/gdb/testsuite/gdb.ada/fin_fun_out.exp
+++ b/gdb/testsuite/gdb.ada/fin_fun_out.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_o525_013
 
diff --git a/gdb/testsuite/gdb.ada/fixed_cmp.exp b/gdb/testsuite/gdb.ada/fixed_cmp.exp
index 61ff57d1ea4..f15e2c83fcc 100644
--- a/gdb/testsuite/gdb.ada/fixed_cmp.exp
+++ b/gdb/testsuite/gdb.ada/fixed_cmp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile fixed
 
diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp
index fe6dd8025fa..bcc1bbe935a 100644
--- a/gdb/testsuite/gdb.ada/fixed_points.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile fixed_points
 
diff --git a/gdb/testsuite/gdb.ada/fixed_points_function.exp b/gdb/testsuite/gdb.ada/fixed_points_function.exp
index 30a1793ade8..d038fa1ea54 100644
--- a/gdb/testsuite/gdb.ada/fixed_points_function.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points_function.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile fixed_points_function
 
diff --git a/gdb/testsuite/gdb.ada/float-bits.exp b/gdb/testsuite/gdb.ada/float-bits.exp
index d248122fd24..7edd117d829 100644
--- a/gdb/testsuite/gdb.ada/float-bits.exp
+++ b/gdb/testsuite/gdb.ada/float-bits.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile prog
 
diff --git a/gdb/testsuite/gdb.ada/float_param.exp b/gdb/testsuite/gdb.ada/float_param.exp
index 8e73af826bb..8d4b8cf2da2 100644
--- a/gdb/testsuite/gdb.ada/float_param.exp
+++ b/gdb/testsuite/gdb.ada/float_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp
index 17eb4bb6635..e02bd4c1ffa 100644
--- a/gdb/testsuite/gdb.ada/formatted_ref.exp
+++ b/gdb/testsuite/gdb.ada/formatted_ref.exp
@@ -26,7 +26,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile formatted_ref
 
diff --git a/gdb/testsuite/gdb.ada/frame_arg_lang.exp b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
index 7e21153fc37..f6e9ab570c6 100644
--- a/gdb/testsuite/gdb.ada/frame_arg_lang.exp
+++ b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bla
 set cfile "foo"
diff --git a/gdb/testsuite/gdb.ada/frame_args.exp b/gdb/testsuite/gdb.ada/frame_args.exp
index 62ed6a9a9e7..476b9cdf5d0 100644
--- a/gdb/testsuite/gdb.ada/frame_args.exp
+++ b/gdb/testsuite/gdb.ada/frame_args.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fullname_bp.exp b/gdb/testsuite/gdb.ada/fullname_bp.exp
index 26f4af48aa9..470bf440edd 100644
--- a/gdb/testsuite/gdb.ada/fullname_bp.exp
+++ b/gdb/testsuite/gdb.ada/fullname_bp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_addr.exp b/gdb/testsuite/gdb.ada/fun_addr.exp
index 9a5f7eddad7..a0147f5b3ee 100644
--- a/gdb/testsuite/gdb.ada/fun_addr.exp
+++ b/gdb/testsuite/gdb.ada/fun_addr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_in_declare.exp b/gdb/testsuite/gdb.ada/fun_in_declare.exp
index 1b759fd2b7e..000bc4f1174 100644
--- a/gdb/testsuite/gdb.ada/fun_in_declare.exp
+++ b/gdb/testsuite/gdb.ada/fun_in_declare.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_overload_menu.exp b/gdb/testsuite/gdb.ada/fun_overload_menu.exp
index cb2aad162bf..76a983f1aeb 100644
--- a/gdb/testsuite/gdb.ada/fun_overload_menu.exp
+++ b/gdb/testsuite/gdb.ada/fun_overload_menu.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_renaming.exp b/gdb/testsuite/gdb.ada/fun_renaming.exp
index da56e3a6673..87da2f168ad 100644
--- a/gdb/testsuite/gdb.ada/fun_renaming.exp
+++ b/gdb/testsuite/gdb.ada/fun_renaming.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile fun_renaming
 
diff --git a/gdb/testsuite/gdb.ada/funcall_char.exp b/gdb/testsuite/gdb.ada/funcall_char.exp
index 5052980f6d3..c8ba2fbb538 100644
--- a/gdb/testsuite/gdb.ada/funcall_char.exp
+++ b/gdb/testsuite/gdb.ada/funcall_char.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/funcall_param.exp b/gdb/testsuite/gdb.ada/funcall_param.exp
index 69b1e80af92..97d1e7fd2ef 100644
--- a/gdb/testsuite/gdb.ada/funcall_param.exp
+++ b/gdb/testsuite/gdb.ada/funcall_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/funcall_ptr.exp b/gdb/testsuite/gdb.ada/funcall_ptr.exp
index 873733e0451..6684381a6c2 100644
--- a/gdb/testsuite/gdb.ada/funcall_ptr.exp
+++ b/gdb/testsuite/gdb.ada/funcall_ptr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/funcall_ref.exp b/gdb/testsuite/gdb.ada/funcall_ref.exp
index 88e20175183..09a95089b16 100644
--- a/gdb/testsuite/gdb.ada/funcall_ref.exp
+++ b/gdb/testsuite/gdb.ada/funcall_ref.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ghost.exp b/gdb/testsuite/gdb.ada/ghost.exp
index 653aef62de5..feee5cfc52b 100644
--- a/gdb/testsuite/gdb.ada/ghost.exp
+++ b/gdb/testsuite/gdb.ada/ghost.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/homonym.exp b/gdb/testsuite/gdb.ada/homonym.exp
index b37cfe9cce2..8e4bd644ae3 100644
--- a/gdb/testsuite/gdb.ada/homonym.exp
+++ b/gdb/testsuite/gdb.ada/homonym.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile homonym_main
 
diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
index 39fe6407d6d..d09ba8c9656 100644
--- a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
+++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/info_auto_lang.exp b/gdb/testsuite/gdb.ada/info_auto_lang.exp
index 0354454cb31..2451e7babb7 100644
--- a/gdb/testsuite/gdb.ada/info_auto_lang.exp
+++ b/gdb/testsuite/gdb.ada/info_auto_lang.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 # This test verifies that the commands
 #   info [functions|variables|types]
diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp
index c5debf470ec..ae08a9444d8 100644
--- a/gdb/testsuite/gdb.ada/info_exc.exp
+++ b/gdb/testsuite/gdb.ada/info_exc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/info_locals_renaming.exp b/gdb/testsuite/gdb.ada/info_locals_renaming.exp
index c236943e6ed..8d78e0eae56 100644
--- a/gdb/testsuite/gdb.ada/info_locals_renaming.exp
+++ b/gdb/testsuite/gdb.ada/info_locals_renaming.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/info_types.exp b/gdb/testsuite/gdb.ada/info_types.exp
index 81e3ee437c5..cbb6f1309db 100644
--- a/gdb/testsuite/gdb.ada/info_types.exp
+++ b/gdb/testsuite/gdb.ada/info_types.exp
@@ -13,7 +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_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.ada/inline-section-gc.exp b/gdb/testsuite/gdb.ada/inline-section-gc.exp
index cf69bec0791..c015493cc7f 100644
--- a/gdb/testsuite/gdb.ada/inline-section-gc.exp
+++ b/gdb/testsuite/gdb.ada/inline-section-gc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile caller
 
diff --git a/gdb/testsuite/gdb.ada/int_deref.exp b/gdb/testsuite/gdb.ada/int_deref.exp
index f9bec9f81cf..3b66877b1e5 100644
--- a/gdb/testsuite/gdb.ada/int_deref.exp
+++ b/gdb/testsuite/gdb.ada/int_deref.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp
index 52918e259e8..c1b2bf87e15 100644
--- a/gdb/testsuite/gdb.ada/interface.exp
+++ b/gdb/testsuite/gdb.ada/interface.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if {![gnat_runtime_has_debug_info]} {
     untested "GNAT runtime debuginfo required for this test"
diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp
index 5529b7c84b1..89386c5a851 100644
--- a/gdb/testsuite/gdb.ada/iwide.exp
+++ b/gdb/testsuite/gdb.ada/iwide.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if {![gnat_runtime_has_debug_info]} {
     untested "GNAT runtime debuginfo required for this test"
diff --git a/gdb/testsuite/gdb.ada/lang_switch.exp b/gdb/testsuite/gdb.ada/lang_switch.exp
index d4cbb9e3808..63cfa74ad45 100644
--- a/gdb/testsuite/gdb.ada/lang_switch.exp
+++ b/gdb/testsuite/gdb.ada/lang_switch.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile lang_switch
 set cfile "foo"
diff --git a/gdb/testsuite/gdb.ada/length_cond.exp b/gdb/testsuite/gdb.ada/length_cond.exp
index 7d43ce6f3c8..a075e520601 100644
--- a/gdb/testsuite/gdb.ada/length_cond.exp
+++ b/gdb/testsuite/gdb.ada/length_cond.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile length_cond
 
diff --git a/gdb/testsuite/gdb.ada/literals.exp b/gdb/testsuite/gdb.ada/literals.exp
index 06da6b14080..158dd44ccd8 100644
--- a/gdb/testsuite/gdb.ada/literals.exp
+++ b/gdb/testsuite/gdb.ada/literals.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 clean_restart
 
diff --git a/gdb/testsuite/gdb.ada/local-enum.exp b/gdb/testsuite/gdb.ada/local-enum.exp
index b3bb7ee9c83..5fd01166ea6 100644
--- a/gdb/testsuite/gdb.ada/local-enum.exp
+++ b/gdb/testsuite/gdb.ada/local-enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile local
 
diff --git a/gdb/testsuite/gdb.ada/maint_with_ada.exp b/gdb/testsuite/gdb.ada/maint_with_ada.exp
index 87c877f84d1..d029a1da57b 100644
--- a/gdb/testsuite/gdb.ada/maint_with_ada.exp
+++ b/gdb/testsuite/gdb.ada/maint_with_ada.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile var_arr_typedef
 
diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
index 3b693702eb0..4267eac0010 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bla
 
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index 74c896df58f..8e10d37562b 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
index 5c5e2006518..652c7d72609 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
index a0bd3bf6cc3..6f1282adeb4 100644
--- a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
+++ b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_ex_cond.exp b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
index d4bf2f425a1..5b99b472a36 100644
--- a/gdb/testsuite/gdb.ada/mi_ex_cond.exp
+++ b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp
index 6d58fdc441a..a21055b3fb1 100644
--- a/gdb/testsuite/gdb.ada/mi_exc_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp
index 072035b187e..88829faf457 100644
--- a/gdb/testsuite/gdb.ada/mi_interface.exp
+++ b/gdb/testsuite/gdb.ada/mi_interface.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if {![gnat_runtime_has_debug_info]} {
     untested "GNAT runtime debuginfo required for this test"
diff --git a/gdb/testsuite/gdb.ada/mi_prot.exp b/gdb/testsuite/gdb.ada/mi_prot.exp
index 308f9b49dc6..430ae072386 100644
--- a/gdb/testsuite/gdb.ada/mi_prot.exp
+++ b/gdb/testsuite/gdb.ada/mi_prot.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if { ![gnatmake_version_at_least 8] } {
     return -1
diff --git a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
index 52c9a4bf872..c51b1d49265 100644
--- a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
+++ b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_rb20_056
 
diff --git a/gdb/testsuite/gdb.ada/mi_string_access.exp b/gdb/testsuite/gdb.ada/mi_string_access.exp
index 91b3e2c164f..1c84c267220 100644
--- a/gdb/testsuite/gdb.ada/mi_string_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_string_access.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp
index ffee40ad044..4e5086a690a 100644
--- a/gdb/testsuite/gdb.ada/mi_task_arg.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile task_switch
 
diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp
index 76df285d63c..b9768b08ec0 100644
--- a/gdb/testsuite/gdb.ada/mi_task_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_info.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile task_switch
 
diff --git a/gdb/testsuite/gdb.ada/mi_var_access.exp b/gdb/testsuite/gdb.ada/mi_var_access.exp
index c5b553e2e7f..ab4ad3f6c02 100644
--- a/gdb/testsuite/gdb.ada/mi_var_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_access.exp
@@ -15,9 +15,7 @@
 
 load_lib "ada.exp"
 
-if {[skip_ada_tests]} {
-    return -1
-}
+require !skip_ada_tests
 
 standard_ada_testfile mi_access
 
diff --git a/gdb/testsuite/gdb.ada/mi_var_array.exp b/gdb/testsuite/gdb.ada/mi_var_array.exp
index cca091517aa..1dcae8c35e3 100644
--- a/gdb/testsuite/gdb.ada/mi_var_array.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/mi_var_union.exp b/gdb/testsuite/gdb.ada/mi_var_union.exp
index 7f7278c486d..b888b642931 100644
--- a/gdb/testsuite/gdb.ada/mi_var_union.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_union.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/mi_variant.exp b/gdb/testsuite/gdb.ada/mi_variant.exp
index e96d7d9cb40..78714f28d03 100644
--- a/gdb/testsuite/gdb.ada/mi_variant.exp
+++ b/gdb/testsuite/gdb.ada/mi_variant.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib "gdb-python.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile pkg
 
diff --git a/gdb/testsuite/gdb.ada/minsyms.exp b/gdb/testsuite/gdb.ada/minsyms.exp
index d63c1d79ae8..da87483c025 100644
--- a/gdb/testsuite/gdb.ada/minsyms.exp
+++ b/gdb/testsuite/gdb.ada/minsyms.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_qb07_057
 
diff --git a/gdb/testsuite/gdb.ada/mod_from_name.exp b/gdb/testsuite/gdb.ada/mod_from_name.exp
index 93c55806a48..b23416558b3 100644
--- a/gdb/testsuite/gdb.ada/mod_from_name.exp
+++ b/gdb/testsuite/gdb.ada/mod_from_name.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/multiarray.exp b/gdb/testsuite/gdb.ada/multiarray.exp
index a42d2904792..281a7155be1 100644
--- a/gdb/testsuite/gdb.ada/multiarray.exp
+++ b/gdb/testsuite/gdb.ada/multiarray.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/n_arr_bound.exp b/gdb/testsuite/gdb.ada/n_arr_bound.exp
index b88920e7ae6..c296a9f9950 100644
--- a/gdb/testsuite/gdb.ada/n_arr_bound.exp
+++ b/gdb/testsuite/gdb.ada/n_arr_bound.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/nested.exp b/gdb/testsuite/gdb.ada/nested.exp
index 327b29787dc..6fb7f8918c5 100644
--- a/gdb/testsuite/gdb.ada/nested.exp
+++ b/gdb/testsuite/gdb.ada/nested.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile hello
 
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
index ad4ccde625b..eec03eb7216 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 # Enable basic use of UTF-8.  LC_ALL gets reset for each testfile.  We
 # want this despite the program itself using Latin-1, as this test is
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
index f2bdd99d243..196ebb416fd 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 # Enable basic use of UTF-8.  LC_ALL gets reset for each testfile.  We
 # want this despite the program itself using Latin-1, as this test is
diff --git a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
index d3c1ac4d0cf..cd4b2cda664 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 # Enable basic use of UTF-8.  LC_ALL gets reset for each testfile.
 setenv LC_ALL C.UTF-8
diff --git a/gdb/testsuite/gdb.ada/notcplusplus.exp b/gdb/testsuite/gdb.ada/notcplusplus.exp
index 40bbd146596..1101eafebd2 100644
--- a/gdb/testsuite/gdb.ada/notcplusplus.exp
+++ b/gdb/testsuite/gdb.ada/notcplusplus.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/null_array.exp b/gdb/testsuite/gdb.ada/null_array.exp
index c956a8b4ecf..8995480bcc6 100644
--- a/gdb/testsuite/gdb.ada/null_array.exp
+++ b/gdb/testsuite/gdb.ada/null_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/null_overload.exp b/gdb/testsuite/gdb.ada/null_overload.exp
index 2901f7bd9bf..8731c5788b1 100644
--- a/gdb/testsuite/gdb.ada/null_overload.exp
+++ b/gdb/testsuite/gdb.ada/null_overload.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp
index 246bbb21fa7..7f0148b31db 100644
--- a/gdb/testsuite/gdb.ada/null_record.exp
+++ b/gdb/testsuite/gdb.ada/null_record.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile null_record
 
diff --git a/gdb/testsuite/gdb.ada/operator_bp.exp b/gdb/testsuite/gdb.ada/operator_bp.exp
index 5435ab48e6d..9a8a0abf684 100644
--- a/gdb/testsuite/gdb.ada/operator_bp.exp
+++ b/gdb/testsuite/gdb.ada/operator_bp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile ops_test
 
diff --git a/gdb/testsuite/gdb.ada/operator_call.exp b/gdb/testsuite/gdb.ada/operator_call.exp
index ddc3784070e..8a0d3573a32 100644
--- a/gdb/testsuite/gdb.ada/operator_call.exp
+++ b/gdb/testsuite/gdb.ada/operator_call.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile opcall
 
diff --git a/gdb/testsuite/gdb.ada/optim_drec.exp b/gdb/testsuite/gdb.ada/optim_drec.exp
index f4af3bdc911..5026eb9b1bd 100644
--- a/gdb/testsuite/gdb.ada/optim_drec.exp
+++ b/gdb/testsuite/gdb.ada/optim_drec.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
index 03092a15188..8aa32f53050 100644
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_o224_021
 
diff --git a/gdb/testsuite/gdb.ada/overload_menu_crash.exp b/gdb/testsuite/gdb.ada/overload_menu_crash.exp
index 7c871bdd338..366cf502afb 100644
--- a/gdb/testsuite/gdb.ada/overload_menu_crash.exp
+++ b/gdb/testsuite/gdb.ada/overload_menu_crash.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
index 3a99dca7623..19babffed9d 100644
--- a/gdb/testsuite/gdb.ada/packed_array.exp
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile pa
 
diff --git a/gdb/testsuite/gdb.ada/packed_array_assign.exp b/gdb/testsuite/gdb.ada/packed_array_assign.exp
index 7b78a0f4465..7da413a8765 100644
--- a/gdb/testsuite/gdb.ada/packed_array_assign.exp
+++ b/gdb/testsuite/gdb.ada/packed_array_assign.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile tester
 
diff --git a/gdb/testsuite/gdb.ada/packed_record.exp b/gdb/testsuite/gdb.ada/packed_record.exp
index 2110ac6cfee..c4eee31a137 100644
--- a/gdb/testsuite/gdb.ada/packed_record.exp
+++ b/gdb/testsuite/gdb.ada/packed_record.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile pr
 
diff --git a/gdb/testsuite/gdb.ada/packed_tagged.exp b/gdb/testsuite/gdb.ada/packed_tagged.exp
index a4cd2b48e81..5c7558f8589 100644
--- a/gdb/testsuite/gdb.ada/packed_tagged.exp
+++ b/gdb/testsuite/gdb.ada/packed_tagged.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile comp_bug
 
diff --git a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
index d3f5b5fc98f..7d9cc335b04 100644
--- a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
+++ b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/pckd_neg.exp b/gdb/testsuite/gdb.ada/pckd_neg.exp
index be15270a92c..3b6bbfe1ce9 100644
--- a/gdb/testsuite/gdb.ada/pckd_neg.exp
+++ b/gdb/testsuite/gdb.ada/pckd_neg.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_o508_021
 
diff --git a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
index bba3eb15b56..13fc8f0f585 100644
--- a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
+++ b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile failure
 
diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp
index dbc300f7dee..f5963fff799 100644
--- a/gdb/testsuite/gdb.ada/pp-rec-component.exp
+++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/print_chars.exp b/gdb/testsuite/gdb.ada/print_chars.exp
index 033b7cccc0b..6c1d8cb2d68 100644
--- a/gdb/testsuite/gdb.ada/print_chars.exp
+++ b/gdb/testsuite/gdb.ada/print_chars.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/print_pc.exp b/gdb/testsuite/gdb.ada/print_pc.exp
index 6658fdf672b..150c45fd8ff 100644
--- a/gdb/testsuite/gdb.ada/print_pc.exp
+++ b/gdb/testsuite/gdb.ada/print_pc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile dummy start
 
diff --git a/gdb/testsuite/gdb.ada/ptr_typedef.exp b/gdb/testsuite/gdb.ada/ptr_typedef.exp
index 24bcd63bcb9..1adaa844be4 100644
--- a/gdb/testsuite/gdb.ada/ptr_typedef.exp
+++ b/gdb/testsuite/gdb.ada/ptr_typedef.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
index b3d33761aea..a775ff2754a 100644
--- a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
+++ b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
@@ -13,7 +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_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.ada/ptype_array.exp b/gdb/testsuite/gdb.ada/ptype_array.exp
index 807ab4d08fe..3e4e55e5db6 100644
--- a/gdb/testsuite/gdb.ada/ptype_array.exp
+++ b/gdb/testsuite/gdb.ada/ptype_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_field.exp b/gdb/testsuite/gdb.ada/ptype_field.exp
index 9cddf197264..c6a1fb3aa28 100644
--- a/gdb/testsuite/gdb.ada/ptype_field.exp
+++ b/gdb/testsuite/gdb.ada/ptype_field.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
index 3e904fa513d..c282341583a 100644
--- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
+++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_union.exp b/gdb/testsuite/gdb.ada/ptype_union.exp
index 97d42ca42c3..b1545a44f20 100644
--- a/gdb/testsuite/gdb.ada/ptype_union.exp
+++ b/gdb/testsuite/gdb.ada/ptype_union.exp
@@ -13,7 +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_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp
index f5e84eecc6c..d1a84b617fa 100644
--- a/gdb/testsuite/gdb.ada/py_range.exp
+++ b/gdb/testsuite/gdb.ada/py_range.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/py_taft.exp b/gdb/testsuite/gdb.ada/py_taft.exp
index 151578be6a1..ea9e7b1db5c 100644
--- a/gdb/testsuite/gdb.ada/py_taft.exp
+++ b/gdb/testsuite/gdb.ada/py_taft.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/rdv_wait.exp b/gdb/testsuite/gdb.ada/rdv_wait.exp
index 19624ce45d4..de60c98d975 100644
--- a/gdb/testsuite/gdb.ada/rdv_wait.exp
+++ b/gdb/testsuite/gdb.ada/rdv_wait.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/rec_comp.exp b/gdb/testsuite/gdb.ada/rec_comp.exp
index 1dacd23c2c0..ded69c8b0e0 100644
--- a/gdb/testsuite/gdb.ada/rec_comp.exp
+++ b/gdb/testsuite/gdb.ada/rec_comp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile bar_o203_012
 
diff --git a/gdb/testsuite/gdb.ada/rec_ptype.exp b/gdb/testsuite/gdb.ada/rec_ptype.exp
index 008ab34aa64..9662628ccbe 100644
--- a/gdb/testsuite/gdb.ada/rec_ptype.exp
+++ b/gdb/testsuite/gdb.ada/rec_ptype.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/rec_return.exp b/gdb/testsuite/gdb.ada/rec_return.exp
index 58b5a497b9f..253a33a7c51 100644
--- a/gdb/testsuite/gdb.ada/rec_return.exp
+++ b/gdb/testsuite/gdb.ada/rec_return.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ref_param.exp b/gdb/testsuite/gdb.ada/ref_param.exp
index d123f749445..f919ef624c6 100644
--- a/gdb/testsuite/gdb.ada/ref_param.exp
+++ b/gdb/testsuite/gdb.ada/ref_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ref_tick_size.exp b/gdb/testsuite/gdb.ada/ref_tick_size.exp
index 68d26435889..9851174ca18 100644
--- a/gdb/testsuite/gdb.ada/ref_tick_size.exp
+++ b/gdb/testsuite/gdb.ada/ref_tick_size.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
index dfa83150736..ae227b2ca89 100644
--- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp
+++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if { ![gnatmake_version_at_least 8] } {
     return -1
diff --git a/gdb/testsuite/gdb.ada/repeat_dyn.exp b/gdb/testsuite/gdb.ada/repeat_dyn.exp
index 48d5e8cfe12..ca380083410 100644
--- a/gdb/testsuite/gdb.ada/repeat_dyn.exp
+++ b/gdb/testsuite/gdb.ada/repeat_dyn.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_oc22_002
 
diff --git a/gdb/testsuite/gdb.ada/same_component_name.exp b/gdb/testsuite/gdb.ada/same_component_name.exp
index 7d5ab6f1f02..ccaae44616f 100644
--- a/gdb/testsuite/gdb.ada/same_component_name.exp
+++ b/gdb/testsuite/gdb.ada/same_component_name.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/same_enum.exp b/gdb/testsuite/gdb.ada/same_enum.exp
index 482f5eed348..847fe146d46 100644
--- a/gdb/testsuite/gdb.ada/same_enum.exp
+++ b/gdb/testsuite/gdb.ada/same_enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile a
 
diff --git a/gdb/testsuite/gdb.ada/scalar_storage.exp b/gdb/testsuite/gdb.ada/scalar_storage.exp
index f087a4019cb..f6c038b29cf 100644
--- a/gdb/testsuite/gdb.ada/scalar_storage.exp
+++ b/gdb/testsuite/gdb.ada/scalar_storage.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile storage
 
diff --git a/gdb/testsuite/gdb.ada/scoped_watch.exp b/gdb/testsuite/gdb.ada/scoped_watch.exp
index 5c8770fd0d1..9d49d389509 100644
--- a/gdb/testsuite/gdb.ada/scoped_watch.exp
+++ b/gdb/testsuite/gdb.ada/scoped_watch.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_p708_025
 
diff --git a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
index 3dcd300bdc5..37bb7d04e24 100644
--- a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
+++ b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/set_wstr.exp b/gdb/testsuite/gdb.ada/set_wstr.exp
index 24338f215f9..2265df31c6b 100644
--- a/gdb/testsuite/gdb.ada/set_wstr.exp
+++ b/gdb/testsuite/gdb.ada/set_wstr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile a
 
diff --git a/gdb/testsuite/gdb.ada/small_reg_param.exp b/gdb/testsuite/gdb.ada/small_reg_param.exp
index d3b6953ed7b..02467ab12c7 100644
--- a/gdb/testsuite/gdb.ada/small_reg_param.exp
+++ b/gdb/testsuite/gdb.ada/small_reg_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp
index e394273ffaa..08a61212487 100644
--- a/gdb/testsuite/gdb.ada/start.exp
+++ b/gdb/testsuite/gdb.ada/start.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
diff --git a/gdb/testsuite/gdb.ada/str_binop_equal.exp b/gdb/testsuite/gdb.ada/str_binop_equal.exp
index 5eb531c1453..04ee2dc53df 100644
--- a/gdb/testsuite/gdb.ada/str_binop_equal.exp
+++ b/gdb/testsuite/gdb.ada/str_binop_equal.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_p211_061
 
diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp
index 3ce4a03a42e..59fa89baab4 100644
--- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp
+++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/str_uninit.exp b/gdb/testsuite/gdb.ada/str_uninit.exp
index cf10ad3cb50..03f40abc110 100644
--- a/gdb/testsuite/gdb.ada/str_uninit.exp
+++ b/gdb/testsuite/gdb.ada/str_uninit.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile parse
 
diff --git a/gdb/testsuite/gdb.ada/sub_variant.exp b/gdb/testsuite/gdb.ada/sub_variant.exp
index b74caa5ab65..578145086a2 100644
--- a/gdb/testsuite/gdb.ada/sub_variant.exp
+++ b/gdb/testsuite/gdb.ada/sub_variant.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile subv
 
diff --git a/gdb/testsuite/gdb.ada/sym_print_name.exp b/gdb/testsuite/gdb.ada/sym_print_name.exp
index feb05cdc7fc..ef6dc360b33 100644
--- a/gdb/testsuite/gdb.ada/sym_print_name.exp
+++ b/gdb/testsuite/gdb.ada/sym_print_name.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/taft_type.exp b/gdb/testsuite/gdb.ada/taft_type.exp
index 7d62f9c9a96..fca67ef191c 100644
--- a/gdb/testsuite/gdb.ada/taft_type.exp
+++ b/gdb/testsuite/gdb.ada/taft_type.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp
index ab7120875b4..bbefa8d966d 100644
--- a/gdb/testsuite/gdb.ada/tagged.exp
+++ b/gdb/testsuite/gdb.ada/tagged.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if {![gnat_runtime_has_debug_info]} {
     untested "GNAT runtime debuginfo required for this test"
diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp
index 7f9ebbeaaa2..17e5f6d971e 100644
--- a/gdb/testsuite/gdb.ada/tagged_access.exp
+++ b/gdb/testsuite/gdb.ada/tagged_access.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if {![gnat_runtime_has_debug_info]} {
     untested "GNAT runtime debuginfo required for this test"
diff --git a/gdb/testsuite/gdb.ada/tagged_not_init.exp b/gdb/testsuite/gdb.ada/tagged_not_init.exp
index caf5b0f133b..2d84f49d8de 100644
--- a/gdb/testsuite/gdb.ada/tagged_not_init.exp
+++ b/gdb/testsuite/gdb.ada/tagged_not_init.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/task_bp.exp b/gdb/testsuite/gdb.ada/task_bp.exp
index 36e7879db76..e2ccac08619 100644
--- a/gdb/testsuite/gdb.ada/task_bp.exp
+++ b/gdb/testsuite/gdb.ada/task_bp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/task_switch_in_core.exp b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
index 9a7662befa1..317f602cde3 100644
--- a/gdb/testsuite/gdb.ada/task_switch_in_core.exp
+++ b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile crash
 
diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp
index 920a04b6607..1e2e631c94d 100644
--- a/gdb/testsuite/gdb.ada/task_watch.exp
+++ b/gdb/testsuite/gdb.ada/task_watch.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 if { [skip_hw_watchpoint_tests] } { return -1 }
 
diff --git a/gdb/testsuite/gdb.ada/tasks.exp b/gdb/testsuite/gdb.ada/tasks.exp
index 6cc7bb1ea32..32b8969c61b 100644
--- a/gdb/testsuite/gdb.ada/tasks.exp
+++ b/gdb/testsuite/gdb.ada/tasks.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/tick_last_segv.exp b/gdb/testsuite/gdb.ada/tick_last_segv.exp
index c462e242658..76fb95e8f1b 100644
--- a/gdb/testsuite/gdb.ada/tick_last_segv.exp
+++ b/gdb/testsuite/gdb.ada/tick_last_segv.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
index 9b0aca57af5..41f497cebf6 100644
--- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
+++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_n207_004
 
diff --git a/gdb/testsuite/gdb.ada/type_coercion.exp b/gdb/testsuite/gdb.ada/type_coercion.exp
index 04b16c08f93..fed32648154 100644
--- a/gdb/testsuite/gdb.ada/type_coercion.exp
+++ b/gdb/testsuite/gdb.ada/type_coercion.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile assign
 
diff --git a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
index e83edfa6d27..4c86a6b6c12 100644
--- a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
+++ b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/unchecked_union.exp b/gdb/testsuite/gdb.ada/unchecked_union.exp
index 17022ae2ac0..401682f590e 100644
--- a/gdb/testsuite/gdb.ada/unchecked_union.exp
+++ b/gdb/testsuite/gdb.ada/unchecked_union.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile unchecked_union
 
diff --git a/gdb/testsuite/gdb.ada/uninitialized_vars.exp b/gdb/testsuite/gdb.ada/uninitialized_vars.exp
index a6354bf97d2..a19bf50b78a 100644
--- a/gdb/testsuite/gdb.ada/uninitialized_vars.exp
+++ b/gdb/testsuite/gdb.ada/uninitialized_vars.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile parse
 
diff --git a/gdb/testsuite/gdb.ada/unsigned_last.exp b/gdb/testsuite/gdb.ada/unsigned_last.exp
index 1115d41f25a..c9ff78bf73b 100644
--- a/gdb/testsuite/gdb.ada/unsigned_last.exp
+++ b/gdb/testsuite/gdb.ada/unsigned_last.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/unsigned_range.exp b/gdb/testsuite/gdb.ada/unsigned_range.exp
index 92de3170c39..b2c478ff4ff 100644
--- a/gdb/testsuite/gdb.ada/unsigned_range.exp
+++ b/gdb/testsuite/gdb.ada/unsigned_range.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/var_arr_attrs.exp b/gdb/testsuite/gdb.ada/var_arr_attrs.exp
index c85e46cba07..5baef49242f 100644
--- a/gdb/testsuite/gdb.ada/var_arr_attrs.exp
+++ b/gdb/testsuite/gdb.ada/var_arr_attrs.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_o115_002
 
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef.exp b/gdb/testsuite/gdb.ada/var_arr_typedef.exp
index 1c452a3ef08..3600f382f1d 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef.exp
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile var_arr_typedef
 
diff --git a/gdb/testsuite/gdb.ada/var_rec_arr.exp b/gdb/testsuite/gdb.ada/var_rec_arr.exp
index 52e6281750a..c3109b34d44 100644
--- a/gdb/testsuite/gdb.ada/var_rec_arr.exp
+++ b/gdb/testsuite/gdb.ada/var_rec_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_na09_042
 
diff --git a/gdb/testsuite/gdb.ada/variant-record.exp b/gdb/testsuite/gdb.ada/variant-record.exp
index 66e1df5f11c..1e6b5174e6a 100644
--- a/gdb/testsuite/gdb.ada/variant-record.exp
+++ b/gdb/testsuite/gdb.ada/variant-record.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile proc
 
diff --git a/gdb/testsuite/gdb.ada/variant.exp b/gdb/testsuite/gdb.ada/variant.exp
index a024b295018..d286e4368a2 100644
--- a/gdb/testsuite/gdb.ada/variant.exp
+++ b/gdb/testsuite/gdb.ada/variant.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib "gdb-python.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile pkg
 
diff --git a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
index fae3c04d14b..965e748ab09 100644
--- a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/varsize_limit.exp b/gdb/testsuite/gdb.ada/varsize_limit.exp
index 3b85799441f..0a1ada7e191 100644
--- a/gdb/testsuite/gdb.ada/varsize_limit.exp
+++ b/gdb/testsuite/gdb.ada/varsize_limit.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile vsizelim
 
diff --git a/gdb/testsuite/gdb.ada/vla.exp b/gdb/testsuite/gdb.ada/vla.exp
index dd79c344689..0f12cbc474f 100644
--- a/gdb/testsuite/gdb.ada/vla.exp
+++ b/gdb/testsuite/gdb.ada/vla.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile vla
 
diff --git a/gdb/testsuite/gdb.ada/voidctx.exp b/gdb/testsuite/gdb.ada/voidctx.exp
index ac77eb2f92f..2c9af20ea3e 100644
--- a/gdb/testsuite/gdb.ada/voidctx.exp
+++ b/gdb/testsuite/gdb.ada/voidctx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile voidctx
 
diff --git a/gdb/testsuite/gdb.ada/watch_arg.exp b/gdb/testsuite/gdb.ada/watch_arg.exp
index 557a3e11f6c..2fc6fcedf1c 100644
--- a/gdb/testsuite/gdb.ada/watch_arg.exp
+++ b/gdb/testsuite/gdb.ada/watch_arg.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile watch
 
diff --git a/gdb/testsuite/gdb.ada/watch_minus_l.exp b/gdb/testsuite/gdb.ada/watch_minus_l.exp
index 9531d9305d9..a17f063bd9f 100644
--- a/gdb/testsuite/gdb.ada/watch_minus_l.exp
+++ b/gdb/testsuite/gdb.ada/watch_minus_l.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo_ra10_006
 
diff --git a/gdb/testsuite/gdb.ada/whatis_array_val.exp b/gdb/testsuite/gdb.ada/whatis_array_val.exp
index c879d9f30f7..2c2ed842dfa 100644
--- a/gdb/testsuite/gdb.ada/whatis_array_val.exp
+++ b/gdb/testsuite/gdb.ada/whatis_array_val.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/widewide.exp b/gdb/testsuite/gdb.ada/widewide.exp
index 5de5d52b8cb..ecf42de6afb 100644
--- a/gdb/testsuite/gdb.ada/widewide.exp
+++ b/gdb/testsuite/gdb.ada/widewide.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/win_fu_syms.exp b/gdb/testsuite/gdb.ada/win_fu_syms.exp
index 496d65a3c0a..c8a87dd93c4 100644
--- a/gdb/testsuite/gdb.ada/win_fu_syms.exp
+++ b/gdb/testsuite/gdb.ada/win_fu_syms.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require !skip_ada_tests
 
 standard_ada_testfile foo
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 15/79] Use require skip_go_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (13 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 14/79] Use require skip_ada_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 16/79] Use require skip_d_tests Tom Tromey
                   ` (65 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_go_tests".
---
 gdb/testsuite/gdb.go/basic-types.exp             | 2 +-
 gdb/testsuite/gdb.go/chan.exp                    | 2 +-
 gdb/testsuite/gdb.go/global-local-var-shadow.exp | 2 +-
 gdb/testsuite/gdb.go/handcall.exp                | 2 +-
 gdb/testsuite/gdb.go/hello.exp                   | 2 +-
 gdb/testsuite/gdb.go/integers.exp                | 2 +-
 gdb/testsuite/gdb.go/max-depth.exp               | 2 +-
 gdb/testsuite/gdb.go/methods.exp                 | 2 +-
 gdb/testsuite/gdb.go/package.exp                 | 2 +-
 gdb/testsuite/gdb.go/print.exp                   | 2 +-
 gdb/testsuite/gdb.go/strings.exp                 | 2 +-
 gdb/testsuite/gdb.go/types.exp                   | 2 +-
 gdb/testsuite/gdb.go/unsafe.exp                  | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.go/basic-types.exp b/gdb/testsuite/gdb.go/basic-types.exp
index b511a5dee62..c1009f93e86 100644
--- a/gdb/testsuite/gdb.go/basic-types.exp
+++ b/gdb/testsuite/gdb.go/basic-types.exp
@@ -20,7 +20,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 
 proc test_integer_literal_types_accepted {} {
     # Test various decimal values.
diff --git a/gdb/testsuite/gdb.go/chan.exp b/gdb/testsuite/gdb.go/chan.exp
index ea01b2c3d07..cca903296fb 100644
--- a/gdb/testsuite/gdb.go/chan.exp
+++ b/gdb/testsuite/gdb.go/chan.exp
@@ -20,7 +20,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/global-local-var-shadow.exp b/gdb/testsuite/gdb.go/global-local-var-shadow.exp
index 21c808750a9..8bede6b3c2d 100644
--- a/gdb/testsuite/gdb.go/global-local-var-shadow.exp
+++ b/gdb/testsuite/gdb.go/global-local-var-shadow.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/handcall.exp b/gdb/testsuite/gdb.go/handcall.exp
index 04cb0c20c83..f132a150e1b 100644
--- a/gdb/testsuite/gdb.go/handcall.exp
+++ b/gdb/testsuite/gdb.go/handcall.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/hello.exp b/gdb/testsuite/gdb.go/hello.exp
index 2c278b849b3..6975252bbbb 100644
--- a/gdb/testsuite/gdb.go/hello.exp
+++ b/gdb/testsuite/gdb.go/hello.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/integers.exp b/gdb/testsuite/gdb.go/integers.exp
index b8c9eb8c906..1bd1c1ed981 100644
--- a/gdb/testsuite/gdb.go/integers.exp
+++ b/gdb/testsuite/gdb.go/integers.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/max-depth.exp b/gdb/testsuite/gdb.go/max-depth.exp
index ae6ff2b0063..78a4c414763 100644
--- a/gdb/testsuite/gdb.go/max-depth.exp
+++ b/gdb/testsuite/gdb.go/max-depth.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/methods.exp b/gdb/testsuite/gdb.go/methods.exp
index 5cf5c57d9a0..221bf3ee804 100644
--- a/gdb/testsuite/gdb.go/methods.exp
+++ b/gdb/testsuite/gdb.go/methods.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/package.exp b/gdb/testsuite/gdb.go/package.exp
index 166e382a20a..247f21b6c39 100644
--- a/gdb/testsuite/gdb.go/package.exp
+++ b/gdb/testsuite/gdb.go/package.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile package1.go package2.go
diff --git a/gdb/testsuite/gdb.go/print.exp b/gdb/testsuite/gdb.go/print.exp
index 20126f656f7..0c1f0eda98f 100644
--- a/gdb/testsuite/gdb.go/print.exp
+++ b/gdb/testsuite/gdb.go/print.exp
@@ -20,7 +20,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 
 proc test_float_accepted {} {
     global gdb_prompt
diff --git a/gdb/testsuite/gdb.go/strings.exp b/gdb/testsuite/gdb.go/strings.exp
index 157bf7c6620..2be756a2c47 100644
--- a/gdb/testsuite/gdb.go/strings.exp
+++ b/gdb/testsuite/gdb.go/strings.exp
@@ -17,7 +17,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/types.exp b/gdb/testsuite/gdb.go/types.exp
index 5b77d654e10..992f5cbd3f4 100644
--- a/gdb/testsuite/gdb.go/types.exp
+++ b/gdb/testsuite/gdb.go/types.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
diff --git a/gdb/testsuite/gdb.go/unsafe.exp b/gdb/testsuite/gdb.go/unsafe.exp
index 8f7c1b22690..9b5c26eb185 100644
--- a/gdb/testsuite/gdb.go/unsafe.exp
+++ b/gdb/testsuite/gdb.go/unsafe.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-if { [skip_go_tests] } { continue }
+require !skip_go_tests
 if { [support_go_compile] == 0 } { continue }
 
 standard_testfile .go
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 16/79] Use require skip_d_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (14 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 15/79] Use require skip_go_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 17/79] Use require skip_ctf_tests Tom Tromey
                   ` (64 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_d_tests".
---
 gdb/testsuite/gdb.dlang/debug-expr.exp      | 2 +-
 gdb/testsuite/gdb.dlang/demangle.exp        | 2 +-
 gdb/testsuite/gdb.dlang/expression.exp      | 2 +-
 gdb/testsuite/gdb.dlang/primitive-types.exp | 2 +-
 gdb/testsuite/gdb.dlang/properties.exp      | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.dlang/debug-expr.exp b/gdb/testsuite/gdb.dlang/debug-expr.exp
index a452a4976cb..aa5770080fc 100644
--- a/gdb/testsuite/gdb.dlang/debug-expr.exp
+++ b/gdb/testsuite/gdb.dlang/debug-expr.exp
@@ -15,7 +15,7 @@
 
 # Test "set debug expr 1" on d expressions.
 
-if { [skip_d_tests] } { return -1 }
+require !skip_d_tests
 
 gdb_start
 gdb_test_no_output "set language d"
diff --git a/gdb/testsuite/gdb.dlang/demangle.exp b/gdb/testsuite/gdb.dlang/demangle.exp
index b7447b27392..23b2149974d 100644
--- a/gdb/testsuite/gdb.dlang/demangle.exp
+++ b/gdb/testsuite/gdb.dlang/demangle.exp
@@ -19,7 +19,7 @@
 
 load_lib "d-support.exp"
 
-if { [skip_d_tests] } { continue }
+require !skip_d_tests
 
 ### Utility function for test_demangling and test_demangling_exact.
 proc test_demangling {test result} {
diff --git a/gdb/testsuite/gdb.dlang/expression.exp b/gdb/testsuite/gdb.dlang/expression.exp
index eee18eac7c5..3e82ad90deb 100644
--- a/gdb/testsuite/gdb.dlang/expression.exp
+++ b/gdb/testsuite/gdb.dlang/expression.exp
@@ -18,7 +18,7 @@
 
 load_lib "d-support.exp"
 
-if { [skip_d_tests] } { continue }
+require !skip_d_tests
 
 proc test_d_integer_literals {} {
     # Test valid D integer literals are accepted.
diff --git a/gdb/testsuite/gdb.dlang/primitive-types.exp b/gdb/testsuite/gdb.dlang/primitive-types.exp
index 07b525b9245..7a114fc020f 100644
--- a/gdb/testsuite/gdb.dlang/primitive-types.exp
+++ b/gdb/testsuite/gdb.dlang/primitive-types.exp
@@ -18,7 +18,7 @@
 
 load_lib "d-support.exp"
 
-if { [skip_d_tests] } { continue }
+require !skip_d_tests
 
 proc test_builtin_d_types_accepted {} {
     # Test types are recognised.
diff --git a/gdb/testsuite/gdb.dlang/properties.exp b/gdb/testsuite/gdb.dlang/properties.exp
index 3c7920de652..9164ce8ee5d 100644
--- a/gdb/testsuite/gdb.dlang/properties.exp
+++ b/gdb/testsuite/gdb.dlang/properties.exp
@@ -18,7 +18,7 @@
 
 load_lib "d-support.exp"
 
-if { [skip_d_tests] } { continue }
+require !skip_d_tests
 
 proc test_d_sizeof {} {
     # Test use of .sizeof with types and expressions.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 17/79] Use require skip_ctf_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (15 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 16/79] Use require skip_d_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 18/79] Use require skip_hw_watchpoint_tests Tom Tromey
                   ` (63 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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(-)

diff --git a/gdb/testsuite/gdb.base/ctf-constvars.exp b/gdb/testsuite/gdb.base/ctf-constvars.exp
index 3ef52b01dc7..7737401bbab 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 51499e323da..4010cf4e15e 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 1fc0e71146b..4ce178af2c0 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 4cde8dcabda..a65a1cbf7ad 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 ea317d14c34..0afbdc5a6ab 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
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 18/79] Use require skip_hw_watchpoint_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (16 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 17/79] Use require skip_ctf_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 19/79] Use require skip_ifunc_tests Tom Tromey
                   ` (62 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_hw_watchpoint_tests".
---
 gdb/testsuite/gdb.ada/task_watch.exp                        | 2 +-
 gdb/testsuite/gdb.base/pr11022.exp                          | 4 +---
 gdb/testsuite/gdb.base/watch-before-fork.exp                | 4 +---
 gdb/testsuite/gdb.base/watch-read.exp                       | 4 +---
 gdb/testsuite/gdb.base/watch_thread_num.exp                 | 4 +---
 gdb/testsuite/gdb.base/watchpoint-hw-attach.exp             | 4 +---
 gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp           | 4 +---
 gdb/testsuite/gdb.base/watchpoint-hw.exp                    | 4 +---
 gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp   | 4 +---
 gdb/testsuite/gdb.base/watchpoint-unaligned.exp             | 4 +---
 gdb/testsuite/gdb.mi/mi-watch-nonstop.exp                   | 4 +---
 gdb/testsuite/gdb.mi/pr11022.exp                            | 4 +---
 gdb/testsuite/gdb.multi/watchpoint-multi.exp                | 5 +----
 gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp      | 4 +---
 gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp | 4 +---
 gdb/testsuite/gdb.threads/watchthreads-reorder.exp          | 5 ++---
 gdb/testsuite/gdb.threads/watchthreads.exp                  | 4 +---
 gdb/testsuite/gdb.threads/watchthreads2.exp                 | 4 +---
 gdb/testsuite/gdb.threads/wp-replication.exp                | 4 +---
 19 files changed, 20 insertions(+), 56 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp
index 1e2e631c94d..a8f8b13a37b 100644
--- a/gdb/testsuite/gdb.ada/task_watch.exp
+++ b/gdb/testsuite/gdb.ada/task_watch.exp
@@ -19,7 +19,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if { [skip_hw_watchpoint_tests] } { return -1 }
+require !skip_hw_watchpoint_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.base/pr11022.exp b/gdb/testsuite/gdb.base/pr11022.exp
index 95a0e3665ae..bf329bc383f 100644
--- a/gdb/testsuite/gdb.base/pr11022.exp
+++ b/gdb/testsuite/gdb.base/pr11022.exp
@@ -13,9 +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_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/watch-before-fork.exp b/gdb/testsuite/gdb.base/watch-before-fork.exp
index 472f3dab7c6..41574169e8f 100644
--- a/gdb/testsuite/gdb.base/watch-before-fork.exp
+++ b/gdb/testsuite/gdb.base/watch-before-fork.exp
@@ -18,9 +18,7 @@
 # followed by a catchpoint hit.
 
 # This test uses "awatch".
-if {[skip_hw_watchpoint_access_tests]} {
-    return
-}
+require !skip_hw_watchpoint_access_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/watch-read.exp b/gdb/testsuite/gdb.base/watch-read.exp
index 8d7801263bd..6533ee2f14c 100644
--- a/gdb/testsuite/gdb.base/watch-read.exp
+++ b/gdb/testsuite/gdb.base/watch-read.exp
@@ -24,9 +24,7 @@
 
 standard_testfile .c
 
-if {[skip_hw_watchpoint_access_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_access_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp
index 465c523655c..799b386a390 100644
--- a/gdb/testsuite/gdb.base/watch_thread_num.exp
+++ b/gdb/testsuite/gdb.base/watch_thread_num.exp
@@ -23,9 +23,7 @@
 # so the test is only meaningful on a system with hardware watchpoints.
 # More specifically, the implementation of this test uses access
 # watchpoints, so skip it when those are not available.
-if {[skip_hw_watchpoint_access_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_access_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
index 5bff78f9242..e1a9c94d94c 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
@@ -16,9 +16,7 @@
 # watchpoint-hw-attach.exp -- Test if hardware watchpoints are used
 # when attaching to a target.
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 if {![can_spawn_for_attach]} {
     return 0
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
index 317a318fb96..e93391a6512 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
@@ -13,9 +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_hw_watchpoint_access_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_access_tests
 
 set test watchpoint-hw-hit-once
 set srcfile ${test}.c
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp
index adc454932df..63ab8ffe1bb 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw.exp
@@ -18,9 +18,7 @@ if { [use_gdb_stub] } {
     return
 }
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
index b97e5e3ab24..585669dd0fd 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -71,9 +71,7 @@
 standard_testfile
 
 # No use testing this if we can't use hardware watchpoints.
-if {[skip_hw_watchpoint_tests]} {
-    return -1
-}
+require !skip_hw_watchpoint_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
index 88fba010e61..33fc1c1b5d0 100644
--- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
@@ -17,9 +17,7 @@
 
 # Test inserting read watchpoints on unaligned addresses.
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
index 2b9b2a13f14..515454456b2 100644
--- a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
@@ -13,9 +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_hw_watchpoint_tests] {
-    return -1
-}
+require !skip_hw_watchpoint_tests
 
 if { ![support_displaced_stepping] } { 
     unsupported "displaced stepping"
diff --git a/gdb/testsuite/gdb.mi/pr11022.exp b/gdb/testsuite/gdb.mi/pr11022.exp
index 66357628f16..fcfad4400d3 100644
--- a/gdb/testsuite/gdb.mi/pr11022.exp
+++ b/gdb/testsuite/gdb.mi/pr11022.exp
@@ -13,9 +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_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
index d371ee569f1..8df68b382e1 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
@@ -25,10 +25,7 @@ if [use_gdb_stub] {
 
 # Do not use simple hardware watchpoints ("watch") as its false hit may be
 # unnoticed by GDB if it reads it still has the same value.
-if [skip_hw_watchpoint_access_tests] {
-    untested "${testfile} (no hardware access watchpoints)"
-    return
-}
+require !skip_hw_watchpoint_access_tests
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
index 3bd82051601..2f627a05980 100644
--- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
+++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
@@ -19,9 +19,7 @@
 # thread other than the thread the local watchpoint was set in stops
 # for a breakpoint.
 
-if {[skip_hw_watchpoint_multi_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_multi_tests
 
 standard_testfile
 if {[gdb_compile_pthreads \
diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
index ae720a894a0..f271c468aff 100644
--- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
+++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
@@ -22,9 +22,7 @@ set executable ${testfile}
 # This test verifies that a watchpoint is detected in a multithreaded
 # program so the test is only meaningful on a system with hardware
 # watchpoints.
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable [list debug "incdir=${objdir}"]] != "" } {
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
index d223c11e6a8..2469b3ada0c 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
@@ -25,9 +25,8 @@
 # could be assigned during continuation of a thread with pending SIGTRAP to the
 # different/new watchpoint, just based on the watchpoint/debug register number.
 
-if {[skip_hw_watchpoint_access_tests]
-    || [skip_hw_watchpoint_multi_tests]
-    || ![istarget *-*-linux*]} {
+require !skip_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
+if {![istarget *-*-linux*]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp
index 0a5369a3c30..d2a95bf7d5c 100644
--- a/gdb/testsuite/gdb.threads/watchthreads.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads.exp
@@ -20,9 +20,7 @@
 
 # This test verifies that a watchpoint is detected in the proper thread
 # so the test is only meaningful on a system with hardware watchpoints.
-if {[skip_hw_watchpoint_multi_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_multi_tests
 
 proc target_no_stopped_data { } {
     return [istarget s390*-*-*]
diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp
index 0f641bbef31..e9db6781708 100644
--- a/gdb/testsuite/gdb.threads/watchthreads2.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads2.exp
@@ -24,9 +24,7 @@ set X_INCR_COUNT 10
 
 # This test verifies that a watchpoint is detected in the proper thread
 # so the test is only meaningful on a system with hardware watchpoints.
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index 738cb34cfa6..7da66f386ab 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -27,9 +27,7 @@ set NR_TRIGGERS_PER_THREAD 2
 # This test verifies that a hardware watchpoint gets replicated to
 # every existing thread and is detected properly.  This test is
 # only meaningful on a target with hardware watchpoint support.
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 19/79] Use require skip_ifunc_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (17 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 18/79] Use require skip_hw_watchpoint_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 20/79] Use require skip_aarch64_sve_tests Tom Tromey
                   ` (61 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_ifunc_tests".
---
 gdb/testsuite/gdb.base/gnu-ifunc.exp        | 6 +-----
 gdb/testsuite/gdb.compile/compile-ifunc.exp | 4 +---
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index fd5eaa1233b..967d1e053e7 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -13,11 +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/>.
 
-require !skip_shlib_tests
-
-if {[skip_ifunc_tests]} {
-    return 0
-}
+require !skip_shlib_tests !skip_ifunc_tests
 
 standard_testfile .c
 set staticexecutable ${testfile}-static
diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp
index 866207635c1..bfbe65a503b 100644
--- a/gdb/testsuite/gdb.compile/compile-ifunc.exp
+++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp
@@ -15,9 +15,7 @@
 
 load_lib compile-support.exp
 
-if {[skip_ifunc_tests]} {
-    return 0
-}
+require !skip_ifunc_tests
 
 standard_testfile
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 20/79] Use require skip_aarch64_sve_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (18 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 19/79] Use require skip_ifunc_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 21/79] Use require skip_btrace_pt_tests Tom Tromey
                   ` (60 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_aarch64_sve_tests".
---
 gdb/testsuite/gdb.arch/aarch64-sve.exp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/aarch64-sve.exp b/gdb/testsuite/gdb.arch/aarch64-sve.exp
index 659e81f5c06..4a54b56105d 100644
--- a/gdb/testsuite/gdb.arch/aarch64-sve.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-sve.exp
@@ -15,10 +15,7 @@
 
 # Test a binary that uses SVE and exercise changing the SVE vector length.
 
-if {[skip_aarch64_sve_tests]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require !skip_aarch64_sve_tests
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 21/79] Use require skip_btrace_pt_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (19 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 20/79] Use require skip_aarch64_sve_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 22/79] Use require skip_btrace_tests Tom Tromey
                   ` (59 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_btrace_pt_tests" and
"require skip_tsx_tests".
---
 gdb/testsuite/gdb.btrace/tsx.exp | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
index 26883f1b3de..2a8d29de8ed 100644
--- a/gdb/testsuite/gdb.btrace/tsx.exp
+++ b/gdb/testsuite/gdb.btrace/tsx.exp
@@ -15,15 +15,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_btrace_pt_tests] } {
-    unsupported "target does not support PT"
-    return -1
-}
-
-if { [skip_tsx_tests] } {
-    unsupported "target does not support TSX"
-    return -1
-}
+require !skip_btrace_pt_tests !skip_tsx_tests
 
 standard_testfile .c x86-tsx.S
 if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 22/79] Use require skip_btrace_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (20 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 21/79] Use require skip_btrace_pt_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 23/79] Use require skip_avx_* Tom Tromey
                   ` (58 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_btrace_tests".
---
 gdb/testsuite/gdb.btrace/buffer-size.exp              | 5 +----
 gdb/testsuite/gdb.btrace/data.exp                     | 5 +----
 gdb/testsuite/gdb.btrace/delta.exp                    | 5 +----
 gdb/testsuite/gdb.btrace/enable-new-thread.exp        | 5 +----
 gdb/testsuite/gdb.btrace/enable-running.exp           | 5 +----
 gdb/testsuite/gdb.btrace/enable.exp                   | 5 +----
 gdb/testsuite/gdb.btrace/exception.exp                | 5 +----
 gdb/testsuite/gdb.btrace/function_call_history.exp    | 5 +----
 gdb/testsuite/gdb.btrace/gcore.exp                    | 5 +----
 gdb/testsuite/gdb.btrace/instruction_history.exp      | 5 +----
 gdb/testsuite/gdb.btrace/multi-inferior.exp           | 5 +----
 gdb/testsuite/gdb.btrace/multi-thread-step.exp        | 5 +----
 gdb/testsuite/gdb.btrace/nohist.exp                   | 5 +----
 gdb/testsuite/gdb.btrace/non-stop.exp                 | 5 +----
 gdb/testsuite/gdb.btrace/reconnect.exp                | 5 +----
 gdb/testsuite/gdb.btrace/record_goto-step.exp         | 5 +----
 gdb/testsuite/gdb.btrace/record_goto.exp              | 5 +----
 gdb/testsuite/gdb.btrace/rn-dl-bind.exp               | 5 +----
 gdb/testsuite/gdb.btrace/segv.exp                     | 5 +----
 gdb/testsuite/gdb.btrace/step.exp                     | 5 +----
 gdb/testsuite/gdb.btrace/stepi.exp                    | 5 +----
 gdb/testsuite/gdb.btrace/tailcall-only.exp            | 5 +----
 gdb/testsuite/gdb.btrace/tailcall.exp                 | 5 +----
 gdb/testsuite/gdb.btrace/unknown_functions.exp        | 5 +----
 gdb/testsuite/gdb.btrace/vdso.exp                     | 5 +----
 gdb/testsuite/gdb.python/py-record-btrace-threads.exp | 5 +----
 gdb/testsuite/gdb.python/py-record-btrace.exp         | 5 +----
 27 files changed, 27 insertions(+), 108 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/buffer-size.exp b/gdb/testsuite/gdb.btrace/buffer-size.exp
index 6790323f854..d0a9086604f 100644
--- a/gdb/testsuite/gdb.btrace/buffer-size.exp
+++ b/gdb/testsuite/gdb.btrace/buffer-size.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/data.exp b/gdb/testsuite/gdb.btrace/data.exp
index 77248beb1a2..8be2a4ccdea 100644
--- a/gdb/testsuite/gdb.btrace/data.exp
+++ b/gdb/testsuite/gdb.btrace/data.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/delta.exp b/gdb/testsuite/gdb.btrace/delta.exp
index e21cbfb87eb..e4307e15a5b 100644
--- a/gdb/testsuite/gdb.btrace/delta.exp
+++ b/gdb/testsuite/gdb.btrace/delta.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/enable-new-thread.exp b/gdb/testsuite/gdb.btrace/enable-new-thread.exp
index fb6b9ca3dd2..22cc33f142f 100644
--- a/gdb/testsuite/gdb.btrace/enable-new-thread.exp
+++ b/gdb/testsuite/gdb.btrace/enable-new-thread.exp
@@ -17,10 +17,7 @@
 
 # Test that new threads of recorded inferiors also get recorded.
 
-if { [skip_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] {
diff --git a/gdb/testsuite/gdb.btrace/enable-running.exp b/gdb/testsuite/gdb.btrace/enable-running.exp
index 2c24b8d8398..6e626e3a053 100644
--- a/gdb/testsuite/gdb.btrace/enable-running.exp
+++ b/gdb/testsuite/gdb.btrace/enable-running.exp
@@ -15,10 +15,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp
index 1c29131e97b..bb57f7b8a74 100644
--- a/gdb/testsuite/gdb.btrace/enable.exp
+++ b/gdb/testsuite/gdb.btrace/enable.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 # start fresh - without an executable
 gdb_exit
diff --git a/gdb/testsuite/gdb.btrace/exception.exp b/gdb/testsuite/gdb.btrace/exception.exp
index 731ebe1cf90..e84ff14d193 100755
--- a/gdb/testsuite/gdb.btrace/exception.exp
+++ b/gdb/testsuite/gdb.btrace/exception.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 # We expect a specific function call history.  This gets messed up with
 # PIE on 32-bit.
diff --git a/gdb/testsuite/gdb.btrace/function_call_history.exp b/gdb/testsuite/gdb.btrace/function_call_history.exp
index 562412f121c..fd35d762796 100644
--- a/gdb/testsuite/gdb.btrace/function_call_history.exp
+++ b/gdb/testsuite/gdb.btrace/function_call_history.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 # We expect a specific function call history.  This gets messed up with
 # PIE on 32-bit.
diff --git a/gdb/testsuite/gdb.btrace/gcore.exp b/gdb/testsuite/gdb.btrace/gcore.exp
index 4b056c0fee0..1e98860aee3 100644
--- a/gdb/testsuite/gdb.btrace/gcore.exp
+++ b/gdb/testsuite/gdb.btrace/gcore.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/instruction_history.exp b/gdb/testsuite/gdb.btrace/instruction_history.exp
index b9043b36eac..0e525c73cb7 100644
--- a/gdb/testsuite/gdb.btrace/instruction_history.exp
+++ b/gdb/testsuite/gdb.btrace/instruction_history.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile .c .S
 if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
diff --git a/gdb/testsuite/gdb.btrace/multi-inferior.exp b/gdb/testsuite/gdb.btrace/multi-inferior.exp
index 87bf029e4be..727161e4dbd 100644
--- a/gdb/testsuite/gdb.btrace/multi-inferior.exp
+++ b/gdb/testsuite/gdb.btrace/multi-inferior.exp
@@ -22,10 +22,7 @@
 #
 # Each inferior can be recorded separately.
 
-if { [skip_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 if { [use_gdb_stub] } {
     unsupported "test creates multiple inferiors"
diff --git a/gdb/testsuite/gdb.btrace/multi-thread-step.exp b/gdb/testsuite/gdb.btrace/multi-thread-step.exp
index d58b791b4e1..a18734843ae 100644
--- a/gdb/testsuite/gdb.btrace/multi-thread-step.exp
+++ b/gdb/testsuite/gdb.btrace/multi-thread-step.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
diff --git a/gdb/testsuite/gdb.btrace/nohist.exp b/gdb/testsuite/gdb.btrace/nohist.exp
index 60710132431..0875b8a6e22 100644
--- a/gdb/testsuite/gdb.btrace/nohist.exp
+++ b/gdb/testsuite/gdb.btrace/nohist.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/non-stop.exp b/gdb/testsuite/gdb.btrace/non-stop.exp
index 0cc78e97f16..278064fbac5 100644
--- a/gdb/testsuite/gdb.btrace/non-stop.exp
+++ b/gdb/testsuite/gdb.btrace/non-stop.exp
@@ -15,10 +15,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp
index 0adfc1b65fc..868cf1f0680 100644
--- a/gdb/testsuite/gdb.btrace/reconnect.exp
+++ b/gdb/testsuite/gdb.btrace/reconnect.exp
@@ -19,10 +19,7 @@
 
 load_lib gdbserver-support.exp
 
-if { [skip_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 if { [skip_gdbserver_tests] } {
     unsupported "target does not support gdbserver"
     return -1
diff --git a/gdb/testsuite/gdb.btrace/record_goto-step.exp b/gdb/testsuite/gdb.btrace/record_goto-step.exp
index f1a3f00ada9..1f289b47f64 100644
--- a/gdb/testsuite/gdb.btrace/record_goto-step.exp
+++ b/gdb/testsuite/gdb.btrace/record_goto-step.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/record_goto.exp b/gdb/testsuite/gdb.btrace/record_goto.exp
index ab32a298ce3..dce9ca18c6c 100644
--- a/gdb/testsuite/gdb.btrace/record_goto.exp
+++ b/gdb/testsuite/gdb.btrace/record_goto.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 # The "record goto" command jumps to a specific instruction in the execution
 # trace.  To guarantee that we always get the same execution trace, we use
diff --git a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
index c55ff18b003..f61aa936a8d 100644
--- a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
+++ b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
@@ -21,10 +21,7 @@
 # Test that we can reverse-next over the dynamic linker's symbol
 # lookup code.
 
-if { [skip_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile \
diff --git a/gdb/testsuite/gdb.btrace/segv.exp b/gdb/testsuite/gdb.btrace/segv.exp
index 45b9d1d5b5e..9d256795729 100644
--- a/gdb/testsuite/gdb.btrace/segv.exp
+++ b/gdb/testsuite/gdb.btrace/segv.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/step.exp b/gdb/testsuite/gdb.btrace/step.exp
index 438ff580b55..8ad58d48fdc 100644
--- a/gdb/testsuite/gdb.btrace/step.exp
+++ b/gdb/testsuite/gdb.btrace/step.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/stepi.exp b/gdb/testsuite/gdb.btrace/stepi.exp
index 06a68d9b1b4..f659d58cf7c 100644
--- a/gdb/testsuite/gdb.btrace/stepi.exp
+++ b/gdb/testsuite/gdb.btrace/stepi.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 # This test is stepping on instruction level.  To guarantee that we always
 # get the same execution trace, we use an assembly source file.
diff --git a/gdb/testsuite/gdb.btrace/tailcall-only.exp b/gdb/testsuite/gdb.btrace/tailcall-only.exp
index 081a919b719..16541b2eacf 100644
--- a/gdb/testsuite/gdb.btrace/tailcall-only.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall-only.exp
@@ -20,10 +20,7 @@
 # calls.  This used to cause a crash in get_frame_type.
 #
 
-if { [skip_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 # This test requires the compiler to generate a tail call.  To guarantee that
 # we always get one, we use an assembly source file.
diff --git a/gdb/testsuite/gdb.btrace/tailcall.exp b/gdb/testsuite/gdb.btrace/tailcall.exp
index 028e03fc6f6..f422fbb1b2a 100644
--- a/gdb/testsuite/gdb.btrace/tailcall.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 # This test requires the compiler to generate a tail call.  To guarantee that
 # we always get one, we use an assembly source file.
diff --git a/gdb/testsuite/gdb.btrace/unknown_functions.exp b/gdb/testsuite/gdb.btrace/unknown_functions.exp
index 1bfa4dcd873..291d7df5963 100644
--- a/gdb/testsuite/gdb.btrace/unknown_functions.exp
+++ b/gdb/testsuite/gdb.btrace/unknown_functions.exp
@@ -17,10 +17,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_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.btrace/vdso.exp b/gdb/testsuite/gdb.btrace/vdso.exp
index ef2ef2c8e8f..16a7e230786 100644
--- a/gdb/testsuite/gdb.btrace/vdso.exp
+++ b/gdb/testsuite/gdb.btrace/vdso.exp
@@ -20,10 +20,7 @@
 #
 # Test that we can access the vdso memory during replay for stepping.
 
-if { [skip_btrace_tests] } {
-    unsupported "target does not support record-btrace"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
index 53f4a7bba98..ef14edceded 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
@@ -17,10 +17,7 @@
 
 # Skip this test if btrace is disabled.
 
-if { [skip_btrace_tests] } {
-    untested "skipping btrace tests"
-    return -1
-}
+require !skip_btrace_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 0d36959464e..38c326f555f 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -17,10 +17,7 @@
 
 # Skip this test if btrace is disabled.
 
-if { [skip_btrace_tests] } {
-    untested "skipping btrace tests"
-    return -1
-}
+require !skip_btrace_tests
 
 load_lib gdb-python.exp
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 23/79] Use require skip_avx_*
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (21 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 22/79] Use require skip_btrace_tests Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 24/79] Use require support_displaced_stepping Tom Tromey
                   ` (57 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require" with skip_avx_*.
---
 gdb/testsuite/gdb.arch/x86-avx512bf16.exp     | 5 +----
 gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp | 5 +----
 gdb/testsuite/gdb.arch/x86-avx512fp16.exp     | 5 +----
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/x86-avx512bf16.exp b/gdb/testsuite/gdb.arch/x86-avx512bf16.exp
index 61ec1fa93fb..d77cc088eb5 100644
--- a/gdb/testsuite/gdb.arch/x86-avx512bf16.exp
+++ b/gdb/testsuite/gdb.arch/x86-avx512bf16.exp
@@ -18,10 +18,7 @@
 
 # Test bfloat16 support in AVX512 registers
 
-if { [skip_avx512bf16_tests] } {
-    unsupported "target does not support AVX512BF16"
-    return -1
-}
+require !skip_avx512bf16_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp b/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp
index 2f336d515b2..696a6b8edf1 100644
--- a/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp
+++ b/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp
@@ -15,10 +15,7 @@
 
 # Test support for _Float16 parameters and return values.
 
-if { [skip_avx512fp16_tests] } {
-    unsupported "target does not support AVX512fp16"
-    return -1
-}
+require !skip_avx512fp16_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/x86-avx512fp16.exp b/gdb/testsuite/gdb.arch/x86-avx512fp16.exp
index 6216fac60db..526be1660bf 100644
--- a/gdb/testsuite/gdb.arch/x86-avx512fp16.exp
+++ b/gdb/testsuite/gdb.arch/x86-avx512fp16.exp
@@ -15,10 +15,7 @@
 
 # Test fp16 support in AVX512 registers.
 
-if { [skip_avx512fp16_tests] } {
-    unsupported "target does not support AVX512fp16"
-    return -1
-}
+require !skip_avx512fp16_tests
 
 standard_testfile
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 24/79] Use require support_displaced_stepping
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (22 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 23/79] Use require skip_avx_* Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 25/79] Use require is_aarch64_target Tom Tromey
                   ` (56 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require support_displaced_stepping".
---
 gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp | 5 +----
 gdb/testsuite/gdb.base/async-shell.exp          | 5 +----
 gdb/testsuite/gdb.base/inferior-died.exp        | 5 +----
 gdb/testsuite/gdb.base/moribund-step.exp        | 5 +----
 gdb/testsuite/gdb.mi/mi-nonstop-exit.exp        | 5 +----
 gdb/testsuite/gdb.mi/mi-nonstop.exp             | 5 +----
 gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp   | 5 +----
 gdb/testsuite/gdb.mi/mi-nsintrall.exp           | 5 +----
 gdb/testsuite/gdb.mi/mi-nsmoribund.exp          | 5 +----
 gdb/testsuite/gdb.mi/mi-nsthrexec.exp           | 5 +----
 gdb/testsuite/gdb.mi/mi-watch-nonstop.exp       | 7 +------
 gdb/testsuite/gdb.python/py-evthreads.exp       | 5 +----
 12 files changed, 12 insertions(+), 50 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp b/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
index 7ec4f301c18..1a1adf17961 100644
--- a/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
+++ b/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
@@ -16,10 +16,7 @@ standard_testfile insn-reloc.c
 set executable $testfile
 set expfile $testfile.exp
 
-if { ![support_displaced_stepping] } {
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
diff --git a/gdb/testsuite/gdb.base/async-shell.exp b/gdb/testsuite/gdb.base/async-shell.exp
index ba1efacafae..e79fe143455 100644
--- a/gdb/testsuite/gdb.base/async-shell.exp
+++ b/gdb/testsuite/gdb.base/async-shell.exp
@@ -15,10 +15,7 @@
 
 standard_testfile
 
-if { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 # The testfile uses "run".  The real bug happened only for ![is_remote target].
 if [use_gdb_stub] {
diff --git a/gdb/testsuite/gdb.base/inferior-died.exp b/gdb/testsuite/gdb.base/inferior-died.exp
index 84aefee0645..4a72e8da98b 100644
--- a/gdb/testsuite/gdb.base/inferior-died.exp
+++ b/gdb/testsuite/gdb.base/inferior-died.exp
@@ -21,10 +21,7 @@ if {![istarget "*-*-linux*"]} {
     return
 }
 
-if { ![support_displaced_stepping] } {
-    unsupported "inferior-died.exp"
-    return -1
-}
+require support_displaced_stepping
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/moribund-step.exp b/gdb/testsuite/gdb.base/moribund-step.exp
index 509115cbcc0..d052df72425 100644
--- a/gdb/testsuite/gdb.base/moribund-step.exp
+++ b/gdb/testsuite/gdb.base/moribund-step.exp
@@ -15,10 +15,7 @@
 
 standard_testfile start.c
 
-if { ![support_displaced_stepping] } {
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 save_vars { GDBFLAGS } {
     set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
diff --git a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp b/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp
index 9301f0f2173..0c64ee18320 100644
--- a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp
+++ b/gdb/testsuite/gdb.mi/mi-nonstop-exit.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 { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-nonstop.exp b/gdb/testsuite/gdb.mi/mi-nonstop.exp
index 8fa60037e4f..84ba40a4448 100644
--- a/gdb/testsuite/gdb.mi/mi-nonstop.exp
+++ b/gdb/testsuite/gdb.mi/mi-nonstop.exp
@@ -14,10 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp b/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp
index 1bb759a4595..47429d6930c 100644
--- a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp
+++ b/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp
@@ -16,10 +16,7 @@
 # Regression test for PR11557.  Make sure we don't end up with a stale
 # register cache just after resuming a thread.
 
-if { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-nsintrall.exp b/gdb/testsuite/gdb.mi/mi-nsintrall.exp
index 7fefd791c58..98607fc2129 100644
--- a/gdb/testsuite/gdb.mi/mi-nsintrall.exp
+++ b/gdb/testsuite/gdb.mi/mi-nsintrall.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 { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
index 6b02a544e6a..103aa45d7e1 100644
--- a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
+++ b/gdb/testsuite/gdb.mi/mi-nsmoribund.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 { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp
index 6f3b2773187..a6ce493ce8d 100644
--- a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp
+++ b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp
@@ -18,10 +18,7 @@
 # the main thread doesn't just silently stop at the first internal
 # breakpoint (usually the _dl_debug_state breakpoint).
 
-if { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
index 515454456b2..b3dc7b772e4 100644
--- a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
@@ -13,12 +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/>.
 
-require !skip_hw_watchpoint_tests
-
-if { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require !skip_hw_watchpoint_tests support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.python/py-evthreads.exp b/gdb/testsuite/gdb.python/py-evthreads.exp
index c9afbb7cdb8..fde5501b1db 100644
--- a/gdb/testsuite/gdb.python/py-evthreads.exp
+++ b/gdb/testsuite/gdb.python/py-evthreads.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 { ![support_displaced_stepping] } { 
-    unsupported "displaced stepping"
-    return -1
-}
+require support_displaced_stepping
 
 load_lib gdb-python.exp
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 25/79] Use require is_aarch64_target
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (23 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 24/79] Use require support_displaced_stepping Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  2:59 ` [PATCH v2 26/79] Use require is_aarch32_target Tom Tromey
                   ` (55 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require is_aarch64_target".
---
 gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp      | 5 +----
 gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp     | 5 +----
 gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp   | 5 +----
 gdb/testsuite/gdb.arch/aarch64-fp.exp               | 5 +----
 gdb/testsuite/gdb.arch/aarch64-mte-core.exp         | 5 +----
 gdb/testsuite/gdb.arch/aarch64-mte.exp              | 5 +----
 gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp | 5 +----
 gdb/testsuite/gdb.arch/aarch64-pauth.exp            | 5 +----
 gdb/testsuite/gdb.arch/aarch64-prologue.exp         | 5 +----
 gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp  | 5 +----
 gdb/testsuite/gdb.arch/aarch64-tagged-pointer.exp   | 5 +----
 gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp        | 5 +----
 gdb/testsuite/gdb.arch/aarch64-w-registers.exp      | 5 +----
 13 files changed, 13 insertions(+), 52 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp b/gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp
index 7fa5bcab610..c88594f2af9 100644
--- a/gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp
@@ -18,10 +18,7 @@
 # Test single stepping through atomic sequences beginning with
 # a ldxr instruction and ending with a stxr instruction.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp b/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp
index 98504fef327..304e4b16b60 100644
--- a/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp
@@ -18,10 +18,7 @@
 # Test if GDB stops at various BRK instruction patterns inserted into
 # the code.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
diff --git a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp
index e97a0eb2db6..8c430aafbe2 100644
--- a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp
@@ -21,10 +21,7 @@
 #
 # See PR breakpoints/21870.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.arch/aarch64-fp.exp b/gdb/testsuite/gdb.arch/aarch64-fp.exp
index 4bbd6d305c0..c851447bb45 100644
--- a/gdb/testsuite/gdb.arch/aarch64-fp.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-fp.exp
@@ -18,10 +18,7 @@
 # PR server/17457
 # Test aarch64 floating point registers q0, q1, v0, v1, fpsr, fpcr
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.arch/aarch64-mte-core.exp b/gdb/testsuite/gdb.arch/aarch64-mte-core.exp
index 485a9075616..dde5df47b1a 100644
--- a/gdb/testsuite/gdb.arch/aarch64-mte-core.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-mte-core.exp
@@ -164,10 +164,7 @@ proc test_mode { mode } {
 
 }
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 # Run tests
 foreach_with_prefix mode {"sync" "async"} {
diff --git a/gdb/testsuite/gdb.arch/aarch64-mte.exp b/gdb/testsuite/gdb.arch/aarch64-mte.exp
index 194576ac7f6..e026f85fa72 100644
--- a/gdb/testsuite/gdb.arch/aarch64-mte.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-mte.exp
@@ -43,10 +43,7 @@ proc get_ltag_from_ptr { ptr } {
 		      "fetch tag from pointer ${ptr}"]
 }
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp b/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp
index bc5e089c633..2f7ebb1c04b 100644
--- a/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp
@@ -19,10 +19,7 @@
 # the upper 16 bits (PAC) or 8 bits (Tag) set, as well as the
 # VA_RANGE_SELECT bit (55).
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.arch/aarch64-pauth.exp b/gdb/testsuite/gdb.arch/aarch64-pauth.exp
index 731bf760410..d0dfaf96900 100644
--- a/gdb/testsuite/gdb.arch/aarch64-pauth.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-pauth.exp
@@ -17,10 +17,7 @@
 # supports pauth instructions.  On non pauth systems, all pauth instructions
 # are treated as nops.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 # Build program with address signing forced on.
 standard_testfile
diff --git a/gdb/testsuite/gdb.arch/aarch64-prologue.exp b/gdb/testsuite/gdb.arch/aarch64-prologue.exp
index ba3c26f0baa..776615a3e5e 100644
--- a/gdb/testsuite/gdb.arch/aarch64-prologue.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-prologue.exp
@@ -15,10 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return 1
-}
+require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
diff --git a/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp b/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
index d748810d92a..d3f7d1f503e 100644
--- a/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
@@ -15,10 +15,7 @@
 #
 # This file is part of the gdb testsuite.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return -1
-}
+require is_aarch64_target
 
 set compile_flags {debug}
 
diff --git a/gdb/testsuite/gdb.arch/aarch64-tagged-pointer.exp b/gdb/testsuite/gdb.arch/aarch64-tagged-pointer.exp
index f08fc6c99ea..4cb277c7777 100644
--- a/gdb/testsuite/gdb.arch/aarch64-tagged-pointer.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-tagged-pointer.exp
@@ -15,10 +15,7 @@
 #
 # This file is part of the gdb testsuite.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp b/gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp
index 14d8a33eb9b..724945af492 100644
--- a/gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp
@@ -17,10 +17,7 @@
 
 # Test explicitly unwinding the PC DWARF register on aarch64
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/aarch64-w-registers.exp b/gdb/testsuite/gdb.arch/aarch64-w-registers.exp
index 86b1af922db..d8463647cc6 100644
--- a/gdb/testsuite/gdb.arch/aarch64-w-registers.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-w-registers.exp
@@ -16,10 +16,7 @@
 # Check if the W registers have the expected size and if setting/fetching
 # values from W registers works correctly for both big and little endian.
 
-if {![is_aarch64_target]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 26/79] Use require is_aarch32_target
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (24 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 25/79] Use require is_aarch64_target Tom Tromey
@ 2023-01-12  2:59 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 27/79] Use require is_amd64_regs_target Tom Tromey
                   ` (54 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  2:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require is_aarch32_target".
---
 gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp            | 5 +----
 gdb/testsuite/gdb.arch/arm-disp-step.exp                 | 5 +----
 gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp | 5 +----
 gdb/testsuite/gdb.arch/pr25124.exp                       | 5 +----
 gdb/testsuite/gdb.arch/thumb-bx-pc.exp                   | 5 +----
 gdb/testsuite/gdb.arch/thumb-prologue.exp                | 5 +----
 gdb/testsuite/gdb.arch/thumb-singlestep.exp              | 5 +----
 7 files changed, 7 insertions(+), 28 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp b/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
index dff9b115ac9..f2de30031a5 100644
--- a/gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
+++ b/gdb/testsuite/gdb.arch/arm-bl-branch-dest.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 { ![is_aarch32_target] } {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch32_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.exp b/gdb/testsuite/gdb.arch/arm-disp-step.exp
index 2917e9fd12f..e9106cf17b7 100644
--- a/gdb/testsuite/gdb.arch/arm-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/arm-disp-step.exp
@@ -17,10 +17,7 @@
 
 # Test arm displaced stepping.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping arm displaced stepping tests."
-    return
-}
+require is_aarch32_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp b/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
index 37f0790b65f..af33ac61b37 100644
--- a/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
+++ b/gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.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 { ![is_aarch32_target] } {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require is_aarch32_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/pr25124.exp b/gdb/testsuite/gdb.arch/pr25124.exp
index 6cc7ec41220..45033771d79 100644
--- a/gdb/testsuite/gdb.arch/pr25124.exp
+++ b/gdb/testsuite/gdb.arch/pr25124.exp
@@ -16,10 +16,7 @@
 # Test proper disassembling of ARM thumb instructions when reloading a symbol
 # file.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM tests."
-    return
-}
+require is_aarch32_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/thumb-bx-pc.exp b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
index ae08e9e3a87..9a46f11b89a 100644
--- a/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
+++ b/gdb/testsuite/gdb.arch/thumb-bx-pc.exp
@@ -15,10 +15,7 @@
 
 # Test PC adjustment from Thumb-mode "bx pc" instruction.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM tests."
-    return
-}
+require is_aarch32_target
 
 set testfile "thumb-bx-pc"
 set srcfile ${testfile}.S
diff --git a/gdb/testsuite/gdb.arch/thumb-prologue.exp b/gdb/testsuite/gdb.arch/thumb-prologue.exp
index 095c9d58de7..1d74a30905a 100644
--- a/gdb/testsuite/gdb.arch/thumb-prologue.exp
+++ b/gdb/testsuite/gdb.arch/thumb-prologue.exp
@@ -15,10 +15,7 @@
 
 # Test ARM/Thumb prologue analyzer.
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM prologue tests."
-    return
-}
+require is_aarch32_target
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/thumb-singlestep.exp b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
index 375dade3d72..2d4e28dd31a 100644
--- a/gdb/testsuite/gdb.arch/thumb-singlestep.exp
+++ b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
@@ -15,10 +15,7 @@
 
 # Test single-stepping into incorrectly marked Thumb routine
 
-if {![is_aarch32_target]} {
-    verbose "Skipping ARM tests."
-    return
-}
+require is_aarch32_target
 
 set testfile "thumb-singlestep"
 set srcfile ${testfile}.S
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 27/79] Use require is_amd64_regs_target
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (25 preceding siblings ...)
  2023-01-12  2:59 ` [PATCH v2 26/79] Use require is_aarch32_target Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 28/79] Use require is_elf_target Tom Tromey
                   ` (53 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require is_amd64_regs_target".
---
 gdb/testsuite/gdb.arch/amd64-gs_base.exp         | 5 +----
 gdb/testsuite/gdb.arch/amd64-init-x87-values.exp | 4 +---
 gdb/testsuite/gdb.base/disasm-optim.exp          | 4 +---
 gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp | 5 +----
 4 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/amd64-gs_base.exp b/gdb/testsuite/gdb.arch/amd64-gs_base.exp
index f9170409426..a60e1dbe7f4 100644
--- a/gdb/testsuite/gdb.arch/amd64-gs_base.exp
+++ b/gdb/testsuite/gdb.arch/amd64-gs_base.exp
@@ -15,10 +15,7 @@
 
 standard_testfile
 
-if {![is_amd64_regs_target]} {
-    verbose "Untested x86_64 fs_base and gs_base tests."
-    return
-}
+require is_amd64_regs_target
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
      [list debug nowarnings]] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp b/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
index 64edc00a478..eb0e35ff7f7 100644
--- a/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
+++ b/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
@@ -18,9 +18,7 @@
 # Test initial values of x87 control registers, before any x87
 # instructions have been executed in the inferior.
 
-if {![is_amd64_regs_target]} {
-    return
-}
+require is_amd64_regs_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.base/disasm-optim.exp b/gdb/testsuite/gdb.base/disasm-optim.exp
index e6d861fcd39..8b94474c4d8 100644
--- a/gdb/testsuite/gdb.base/disasm-optim.exp
+++ b/gdb/testsuite/gdb.base/disasm-optim.exp
@@ -15,9 +15,7 @@
 
 # This test exercises disassemble /s with optimized and inlined code.
 
-if { ![is_amd64_regs_target] } {
-    return
-}
+require is_amd64_regs_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp b/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp
index 99bb88eec2d..baacd06c2ca 100644
--- a/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp
+++ b/gdb/testsuite/gdb.trace/tracefile-pseudo-reg.exp
@@ -12,10 +12,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 { ! [is_amd64_regs_target] } {
-    verbose "Skipping tfile AVX test (target is not x86_64)."
-    return
-}
+require is_amd64_regs_target
 
 load_lib "trace-support.exp"
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 28/79] Use require is_elf_target
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (26 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 27/79] Use require is_amd64_regs_target Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 29/79] Use require can_single_step_to_signal_handler Tom Tromey
                   ` (52 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require is_elf_target".
---
 gdb/testsuite/gdb.base/rtld-step.exp | 4 +---
 gdb/testsuite/gdb.base/sym-file.exp  | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.base/rtld-step.exp b/gdb/testsuite/gdb.base/rtld-step.exp
index 473c6c9f7d5..99f1a822b8d 100644
--- a/gdb/testsuite/gdb.base/rtld-step.exp
+++ b/gdb/testsuite/gdb.base/rtld-step.exp
@@ -35,9 +35,7 @@
 # or for non-ELF targets.  (We're not really testing or building
 # shared libraries here, but having a RTLD implies having shared
 # libraries on the target.)
-if { [skip_shlib_tests] || ![is_elf_target] } {
-    return 0
-}
+require !skip_shlib_tests is_elf_target
 
 # (Pretend) RTLD file names and flags:
 set rtld_basename ${::gdb_test_file_name}-rtld
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index 666bf96d38e..c4c5f746943 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -29,9 +29,7 @@
 # 13) Check that the execution can continue without error.
 # 14) Regression test for a stale breakpoints bug.
 
-if {![is_elf_target]} {
-    return 0
-}
+require is_elf_target
 
 require !skip_shlib_tests
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 29/79] Use require can_single_step_to_signal_handler
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (27 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 28/79] Use require is_elf_target Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 30/79] Use require supports_get_siginfo_type Tom Tromey
                   ` (51 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require can_single_step_to_signal_handler".
---
 gdb/testsuite/gdb.base/kill-after-signal.exp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.base/kill-after-signal.exp b/gdb/testsuite/gdb.base/kill-after-signal.exp
index c7b80b538c5..1372c9670ee 100644
--- a/gdb/testsuite/gdb.base/kill-after-signal.exp
+++ b/gdb/testsuite/gdb.base/kill-after-signal.exp
@@ -15,10 +15,7 @@
 
 standard_testfile .c
 
-if { ![can_single_step_to_signal_handler] } {
-    untested "cannot single-step to signal handler"
-    return
-}
+require can_single_step_to_signal_handler
 
 if [target_info exists gdb,nosignals] {
     verbose "Skipping kill-after-signal.exp because of nosignals."
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 30/79] Use require supports_get_siginfo_type
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (28 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 29/79] Use require can_single_step_to_signal_handler Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 31/79] Use require support_go_compile Tom Tromey
                   ` (50 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require supports_get_siginfo_type".
---
 gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp | 5 +----
 gdb/testsuite/gdb.base/siginfo-obj.exp               | 5 +----
 gdb/testsuite/gdb.base/siginfo-thread.exp            | 5 +----
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
index 25c681f0a6a..182b2f25faa 100644
--- a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
+++ b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
@@ -30,10 +30,7 @@ if [target_info exists gdb,nosignals] {
     return -1
 }
 
-if { ![supports_get_siginfo_type] } {
-    verbose "Skipping catch-signal-siginfo-cond.exp because of lack of support."
-    return -1
-}
+require supports_get_siginfo_type
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp
index f6411606346..9d8bfe75731 100644
--- a/gdb/testsuite/gdb.base/siginfo-obj.exp
+++ b/gdb/testsuite/gdb.base/siginfo-obj.exp
@@ -26,10 +26,7 @@ if [target_info exists gdb,nosignals] {
     return
 }
 
-if { ![supports_get_siginfo_type] } {
-    verbose "Skipping siginfo-obj.exp because of lack of support."
-    return
-}
+require supports_get_siginfo_type
 
 
 standard_testfile
diff --git a/gdb/testsuite/gdb.base/siginfo-thread.exp b/gdb/testsuite/gdb.base/siginfo-thread.exp
index b40b23a6def..718889fcc47 100644
--- a/gdb/testsuite/gdb.base/siginfo-thread.exp
+++ b/gdb/testsuite/gdb.base/siginfo-thread.exp
@@ -21,10 +21,7 @@ if [target_info exists gdb,nosignals] {
     return
 }
 
-if { ![supports_get_siginfo_type] } {
-    verbose "Skipping siginfo-thread.exp because of lack of support."
-    return
-}
+require supports_get_siginfo_type
 
 standard_testfile .c
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 31/79] Use require support_go_compile
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (29 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 30/79] Use require supports_get_siginfo_type Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 32/79] Use require use_gdb_stub Tom Tromey
                   ` (49 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require support_go_compile".
---
 gdb/testsuite/gdb.go/chan.exp                    | 3 +--
 gdb/testsuite/gdb.go/global-local-var-shadow.exp | 3 +--
 gdb/testsuite/gdb.go/handcall.exp                | 3 +--
 gdb/testsuite/gdb.go/hello.exp                   | 3 +--
 gdb/testsuite/gdb.go/integers.exp                | 3 +--
 gdb/testsuite/gdb.go/max-depth.exp               | 3 +--
 gdb/testsuite/gdb.go/methods.exp                 | 3 +--
 gdb/testsuite/gdb.go/package.exp                 | 3 +--
 gdb/testsuite/gdb.go/strings.exp                 | 3 +--
 gdb/testsuite/gdb.go/types.exp                   | 3 +--
 gdb/testsuite/gdb.go/unsafe.exp                  | 3 +--
 11 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/gdb/testsuite/gdb.go/chan.exp b/gdb/testsuite/gdb.go/chan.exp
index cca903296fb..075d9f81908 100644
--- a/gdb/testsuite/gdb.go/chan.exp
+++ b/gdb/testsuite/gdb.go/chan.exp
@@ -20,8 +20,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/global-local-var-shadow.exp b/gdb/testsuite/gdb.go/global-local-var-shadow.exp
index 8bede6b3c2d..8513c5530a5 100644
--- a/gdb/testsuite/gdb.go/global-local-var-shadow.exp
+++ b/gdb/testsuite/gdb.go/global-local-var-shadow.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/handcall.exp b/gdb/testsuite/gdb.go/handcall.exp
index f132a150e1b..530bddff140 100644
--- a/gdb/testsuite/gdb.go/handcall.exp
+++ b/gdb/testsuite/gdb.go/handcall.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/hello.exp b/gdb/testsuite/gdb.go/hello.exp
index 6975252bbbb..5f7da349fe5 100644
--- a/gdb/testsuite/gdb.go/hello.exp
+++ b/gdb/testsuite/gdb.go/hello.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/integers.exp b/gdb/testsuite/gdb.go/integers.exp
index 1bd1c1ed981..7c06d0584ed 100644
--- a/gdb/testsuite/gdb.go/integers.exp
+++ b/gdb/testsuite/gdb.go/integers.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/max-depth.exp b/gdb/testsuite/gdb.go/max-depth.exp
index 78a4c414763..8fa967c5d29 100644
--- a/gdb/testsuite/gdb.go/max-depth.exp
+++ b/gdb/testsuite/gdb.go/max-depth.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/methods.exp b/gdb/testsuite/gdb.go/methods.exp
index 221bf3ee804..f641c1cf0db 100644
--- a/gdb/testsuite/gdb.go/methods.exp
+++ b/gdb/testsuite/gdb.go/methods.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/package.exp b/gdb/testsuite/gdb.go/package.exp
index 247f21b6c39..8c64d2c7d86 100644
--- a/gdb/testsuite/gdb.go/package.exp
+++ b/gdb/testsuite/gdb.go/package.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile package1.go package2.go
 
diff --git a/gdb/testsuite/gdb.go/strings.exp b/gdb/testsuite/gdb.go/strings.exp
index 2be756a2c47..1bca7146db4 100644
--- a/gdb/testsuite/gdb.go/strings.exp
+++ b/gdb/testsuite/gdb.go/strings.exp
@@ -17,8 +17,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/types.exp b/gdb/testsuite/gdb.go/types.exp
index 992f5cbd3f4..22656f2174d 100644
--- a/gdb/testsuite/gdb.go/types.exp
+++ b/gdb/testsuite/gdb.go/types.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/unsafe.exp b/gdb/testsuite/gdb.go/unsafe.exp
index 9b5c26eb185..5a2bf32fcf5 100644
--- a/gdb/testsuite/gdb.go/unsafe.exp
+++ b/gdb/testsuite/gdb.go/unsafe.exp
@@ -19,8 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
-if { [support_go_compile] == 0 } { continue }
+require !skip_go_tests support_go_compile
 
 standard_testfile .go
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 32/79] Use require use_gdb_stub
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (30 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 31/79] Use require support_go_compile Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 33/79] Use require can_spawn_for_attach Tom Tromey
                   ` (48 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require use_gdb_stub".
---
 gdb/testsuite/gdb.ada/exec_changed.exp                    | 5 +----
 gdb/testsuite/gdb.ada/start.exp                           | 5 +----
 gdb/testsuite/gdb.base/args.exp                           | 4 +---
 gdb/testsuite/gdb.base/async-shell.exp                    | 4 +---
 gdb/testsuite/gdb.base/attach-pie-misread.exp             | 3 ++-
 gdb/testsuite/gdb.base/attach-wait-input.exp              | 4 +---
 gdb/testsuite/gdb.base/break-entry.exp                    | 5 +----
 gdb/testsuite/gdb.base/break-interp.exp                   | 3 ++-
 gdb/testsuite/gdb.base/cached-source-file.exp             | 3 ++-
 gdb/testsuite/gdb.base/dprintf-detach.exp                 | 4 +---
 gdb/testsuite/gdb.base/fork-print-inferior-events.exp     | 5 +----
 gdb/testsuite/gdb.base/nostdlib.exp                       | 5 +----
 gdb/testsuite/gdb.base/reread-readsym.exp                 | 4 +---
 gdb/testsuite/gdb.base/run-control-while-bg-execution.exp | 5 +----
 gdb/testsuite/gdb.base/set-cwd.exp                        | 5 +----
 gdb/testsuite/gdb.base/share-env-with-gdbserver.exp       | 5 +----
 gdb/testsuite/gdb.base/solib-display.exp                  | 4 +---
 gdb/testsuite/gdb.base/solib-nodir.exp                    | 4 +---
 gdb/testsuite/gdb.base/start-cpp.exp                      | 5 +----
 gdb/testsuite/gdb.base/start.exp                          | 5 +----
 gdb/testsuite/gdb.base/startup-with-shell.exp             | 5 +----
 gdb/testsuite/gdb.base/testenv.exp                        | 4 +---
 gdb/testsuite/gdb.base/watchpoint-hw.exp                  | 5 +----
 gdb/testsuite/gdb.btrace/multi-inferior.exp               | 5 +----
 gdb/testsuite/gdb.dwarf2/main-subprogram.exp              | 5 +----
 gdb/testsuite/gdb.mi/mi-exec-run.exp                      | 5 +----
 gdb/testsuite/gdb.mi/mi-start.exp                         | 5 +----
 gdb/testsuite/gdb.mi/user-selected-context-sync.exp       | 5 +----
 gdb/testsuite/gdb.multi/attach-while-running.exp          | 5 +----
 gdb/testsuite/gdb.multi/dummy-frame-restore.exp           | 4 +---
 gdb/testsuite/gdb.multi/multi-arch-exec.exp               | 4 +---
 gdb/testsuite/gdb.multi/multi-arch.exp                    | 4 +---
 gdb/testsuite/gdb.multi/multi-exit.exp                    | 4 +---
 gdb/testsuite/gdb.multi/multi-kill.exp                    | 4 +---
 gdb/testsuite/gdb.multi/run-only-second-inf.exp           | 4 +---
 gdb/testsuite/gdb.multi/start-inferior-specific.exp       | 4 +---
 gdb/testsuite/gdb.multi/tids-gid-reset.exp                | 5 +----
 gdb/testsuite/gdb.multi/tids.exp                          | 5 +----
 gdb/testsuite/gdb.multi/watchpoint-multi.exp              | 5 +----
 gdb/testsuite/gdb.python/py-events.exp                    | 4 +---
 gdb/testsuite/gdb.threads/attach-into-signal.exp          | 4 ++--
 gdb/testsuite/gdb.threads/attach-slow-waitpid.exp         | 4 ++--
 gdb/testsuite/gdb.threads/attach-stopped.exp              | 4 ++--
 gdb/testsuite/gdb.threads/vfork-multi-inferior.exp        | 5 +----
 gdb/testsuite/gdb.tui/corefile-run.exp                    | 3 ++-
 45 files changed, 52 insertions(+), 146 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp
index 9ccc46a98d7..1580077bb77 100644
--- a/gdb/testsuite/gdb.ada/exec_changed.exp
+++ b/gdb/testsuite/gdb.ada/exec_changed.exp
@@ -19,10 +19,7 @@ require !skip_ada_tests
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
-if [use_gdb_stub] {
-    untested "skipping tests due to use_gdb_stub"
-    return
-}
+require !use_gdb_stub
 
 standard_ada_testfile first
 
diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp
index 08a61212487..212d837f05f 100644
--- a/gdb/testsuite/gdb.ada/start.exp
+++ b/gdb/testsuite/gdb.ada/start.exp
@@ -19,10 +19,7 @@ require !skip_ada_tests
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
-if [use_gdb_stub] {
-    untested "skipping test due to gdb stub"
-    return
-}
+require !use_gdb_stub
 
 standard_ada_testfile dummy
 
diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp
index 6c19c7a1d61..17890745208 100644
--- a/gdb/testsuite/gdb.base/args.exp
+++ b/gdb/testsuite/gdb.base/args.exp
@@ -22,9 +22,7 @@ if [target_info exists noargs] {
 
 # This test requires starting new inferior processes, skip it if the target
 # board is a stub.
-if [use_gdb_stub] {
-    return
-}
+require !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/async-shell.exp b/gdb/testsuite/gdb.base/async-shell.exp
index e79fe143455..fb56d2602b1 100644
--- a/gdb/testsuite/gdb.base/async-shell.exp
+++ b/gdb/testsuite/gdb.base/async-shell.exp
@@ -18,9 +18,7 @@ standard_testfile
 require support_displaced_stepping
 
 # The testfile uses "run".  The real bug happened only for ![is_remote target].
-if [use_gdb_stub] {
-    return 0
-}
+require !use_gdb_stub
 
 save_vars { GDBFLAGS } {
     set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
index f89c5faee88..cd96a6ea76a 100644
--- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
@@ -14,7 +14,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-if { ![isnative] || [is_remote host] || [use_gdb_stub]
+require !use_gdb_stub
+if { ![isnative] || [is_remote host]
      || ![istarget *-linux*] || [skip_shlib_tests]} {
     return
 }
diff --git a/gdb/testsuite/gdb.base/attach-wait-input.exp b/gdb/testsuite/gdb.base/attach-wait-input.exp
index b3f7c6eba53..72895416bab 100644
--- a/gdb/testsuite/gdb.base/attach-wait-input.exp
+++ b/gdb/testsuite/gdb.base/attach-wait-input.exp
@@ -29,9 +29,7 @@
 # simpler to do, so we test with both editing on and off.
 
 # The test uses the "attach" command.
-if [use_gdb_stub] {
-    return
-}
+require !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/break-entry.exp b/gdb/testsuite/gdb.base/break-entry.exp
index 9eec5f1a646..779c3246fc9 100644
--- a/gdb/testsuite/gdb.base/break-entry.exp
+++ b/gdb/testsuite/gdb.base/break-entry.exp
@@ -27,10 +27,7 @@
 
 standard_testfile start.c
 
-if [use_gdb_stub] {
-    untested "skipping tests due to use_gdb_stub"
-    return
-}
+require !use_gdb_stub
 
 if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {additional_flags=-static}] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index ece5fec1cea..02a5685802e 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -14,7 +14,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-if { ![isnative] || [is_remote host] || [use_gdb_stub]
+require !use_gdb_stub
+if { ![isnative] || [is_remote host]
      || ![istarget *-linux*] || [skip_shlib_tests]} {
     return
 }
diff --git a/gdb/testsuite/gdb.base/cached-source-file.exp b/gdb/testsuite/gdb.base/cached-source-file.exp
index 4cacbbd01dd..d30b97d9ee5 100644
--- a/gdb/testsuite/gdb.base/cached-source-file.exp
+++ b/gdb/testsuite/gdb.base/cached-source-file.exp
@@ -24,7 +24,8 @@
 standard_testfile
 
 # Only run on native boards.
-if { [use_gdb_stub] || [target_info gdb_protocol] == "extended-remote" } {
+require !use_gdb_stub
+if { [target_info gdb_protocol] == "extended-remote" } {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/dprintf-detach.exp b/gdb/testsuite/gdb.base/dprintf-detach.exp
index 2eb5795721d..c71e4e054fd 100644
--- a/gdb/testsuite/gdb.base/dprintf-detach.exp
+++ b/gdb/testsuite/gdb.base/dprintf-detach.exp
@@ -21,9 +21,7 @@
 load_lib gdbserver-support.exp
 
 # The test relies on "detach/attach".
-if {[use_gdb_stub]} {
-    return 0
-}
+require !use_gdb_stub
 
 standard_testfile
 set escapedbinfile [string_to_regexp ${binfile}]
diff --git a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
index 313ec615c51..1b0ff149b31 100644
--- a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
+++ b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
@@ -20,10 +20,7 @@
 # 'set detach-on-fork [on,off]' are the correct ones.
 
 # This test relies on "run", so it cannot run on target remote stubs.
-if { [use_gdb_stub] } {
-    untested "not supported on target remote stubs"
-    return
-}
+require !use_gdb_stub
 
 # Test relies on checking follow-fork output. Do not run if gdb debug is
 # enabled as it will be redirected to the log.
diff --git a/gdb/testsuite/gdb.base/nostdlib.exp b/gdb/testsuite/gdb.base/nostdlib.exp
index aa088b19ea9..b893b87fccb 100644
--- a/gdb/testsuite/gdb.base/nostdlib.exp
+++ b/gdb/testsuite/gdb.base/nostdlib.exp
@@ -18,10 +18,7 @@ standard_testfile .c
 # If we're using a stub, breakpoints at the entry point will not trigger.
 # See also the comment in break-entry.exp.
 
-if [use_gdb_stub] {
-    untested "skipping tests due to use_gdb_stub"
-    return
-}
+require !use_gdb_stub
 
 # default_target_compile would otherwise add "-lm" making the testcase
 # dependent on whether the system libraries are already prelinked.
diff --git a/gdb/testsuite/gdb.base/reread-readsym.exp b/gdb/testsuite/gdb.base/reread-readsym.exp
index 6ebbf2c5e44..fac5131bfe3 100644
--- a/gdb/testsuite/gdb.base/reread-readsym.exp
+++ b/gdb/testsuite/gdb.base/reread-readsym.exp
@@ -38,9 +38,7 @@ proc generate_cmd_file {gdbfile binfile} {
     close $ofd
 }
 
-if [use_gdb_stub] {
-    return 0
-}
+require !use_gdb_stub
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
index 26e4e90f749..15231b0cdb6 100644
--- a/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
+++ b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
@@ -21,10 +21,7 @@
 # again.  The test was expanded to test various combinations of
 # run-control-related actions done with an inferior running in background.
 
-if {[use_gdb_stub]} {
-    unsupported "test requires running"
-    return
-}
+require !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/set-cwd.exp b/gdb/testsuite/gdb.base/set-cwd.exp
index 55c3e3f4752..e954c7e18c8 100644
--- a/gdb/testsuite/gdb.base/set-cwd.exp
+++ b/gdb/testsuite/gdb.base/set-cwd.exp
@@ -15,10 +15,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 { [use_gdb_stub] } {
-    untested "skipping tests due to use_gdb_stub"
-    return
-}
+require !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp b/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
index 24d9de1389e..2490d55a0f2 100644
--- a/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
+++ b/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
@@ -16,10 +16,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test doesn't make sense on native-gdbserver.
-if { [use_gdb_stub] } {
-    untested "not supported"
-    return
-}
+require !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
index d75b6f89df3..96bddc147ca 100644
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -43,9 +43,7 @@ require !skip_shlib_tests
 # This is because the initial stop is done before the shared libraries are
 # loaded.
 
-if { [use_gdb_stub] } {
-    return 0
-}
+require !use_gdb_stub
 
 # Library file.
 set libname "solib-display-lib"
diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp
index 62075cb3235..a8b205a5d68 100644
--- a/gdb/testsuite/gdb.base/solib-nodir.exp
+++ b/gdb/testsuite/gdb.base/solib-nodir.exp
@@ -23,9 +23,7 @@ if [is_remote target] {
 # We need to be able to influence the target's environment and working
 # directory.  Can't do that if when we connect the inferior is already
 # running.
-if [use_gdb_stub] {
-    return
-}
+require !use_gdb_stub
 
 set testfile "solib-nodir"
 # Arbitrary file, possibly not containing main, even an empty one.
diff --git a/gdb/testsuite/gdb.base/start-cpp.exp b/gdb/testsuite/gdb.base/start-cpp.exp
index 80b5eea4ec2..ad5595e88f8 100644
--- a/gdb/testsuite/gdb.base/start-cpp.exp
+++ b/gdb/testsuite/gdb.base/start-cpp.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 { [use_gdb_stub] } {
-    unsupported "test requires running"
-    return
-}
+require !use_gdb_stub
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.base/start.exp b/gdb/testsuite/gdb.base/start.exp
index b27c46c4d8f..84130c97fa7 100644
--- a/gdb/testsuite/gdb.base/start.exp
+++ b/gdb/testsuite/gdb.base/start.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 { [use_gdb_stub] } {
-    unsupported "test requires running"
-    return
-}
+require !use_gdb_stub
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/startup-with-shell.exp b/gdb/testsuite/gdb.base/startup-with-shell.exp
index 2f893184d21..b1f868b520a 100644
--- a/gdb/testsuite/gdb.base/startup-with-shell.exp
+++ b/gdb/testsuite/gdb.base/startup-with-shell.exp
@@ -16,10 +16,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test doesn't make sense on native-gdbserver.
-if { [use_gdb_stub] } {
-    untested "not supported"
-    return
-}
+require !use_gdb_stub
 
 # There's no easy way to set environment variables on remote targets
 # (via dejagnu) yet.
diff --git a/gdb/testsuite/gdb.base/testenv.exp b/gdb/testsuite/gdb.base/testenv.exp
index 6bfffd60091..017fa87e51b 100644
--- a/gdb/testsuite/gdb.base/testenv.exp
+++ b/gdb/testsuite/gdb.base/testenv.exp
@@ -20,9 +20,7 @@
 
 # Can't pass environment variables to the inferior if when we connect,
 # the inferior is already running.
-if [use_gdb_stub] {
-    return
-}
+require !use_gdb_stub
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp
index 63ab8ffe1bb..4b32215344a 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw.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 { [use_gdb_stub] } {
-    unsupported "test requires running"
-    return
-}
+require !use_gdb_stub
 
 require !skip_hw_watchpoint_tests
 
diff --git a/gdb/testsuite/gdb.btrace/multi-inferior.exp b/gdb/testsuite/gdb.btrace/multi-inferior.exp
index 727161e4dbd..bbc03daaccc 100644
--- a/gdb/testsuite/gdb.btrace/multi-inferior.exp
+++ b/gdb/testsuite/gdb.btrace/multi-inferior.exp
@@ -24,10 +24,7 @@
 
 require !skip_btrace_tests
 
-if { [use_gdb_stub] } {
-    unsupported "test creates multiple inferiors"
-    return -1
-}
+require !use_gdb_stub
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
index d52250c9328..23f02df8513 100644
--- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
+++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
@@ -17,10 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-4 and use gas.
 require dwarf2_support
 
-if { [use_gdb_stub] } {
-    unsupported "test requires running"
-    return
-}
+require !use_gdb_stub
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.mi/mi-exec-run.exp b/gdb/testsuite/gdb.mi/mi-exec-run.exp
index 5a25653bb9d..e3e6d9d6a21 100644
--- a/gdb/testsuite/gdb.mi/mi-exec-run.exp
+++ b/gdb/testsuite/gdb.mi/mi-exec-run.exp
@@ -28,10 +28,7 @@ set MIFLAGS "-i=mi"
 
 # The purpose of this testcase is to test the -exec-run command. If we
 # cannot use it, then there is no point in running this testcase.
-if [use_gdb_stub] {
-     untested "cannot use -exec-run command"
-     return -1
-}
+require !use_gdb_stub
 
 standard_testfile mi-start.c
 
diff --git a/gdb/testsuite/gdb.mi/mi-start.exp b/gdb/testsuite/gdb.mi/mi-start.exp
index fe5b37f60f8..b7e81a30486 100644
--- a/gdb/testsuite/gdb.mi/mi-start.exp
+++ b/gdb/testsuite/gdb.mi/mi-start.exp
@@ -19,10 +19,7 @@ set MIFLAGS "-i=mi"
 # The purpose of this testcase is to test the --start option of
 # the -exec-run command. If we cannot use the -exec-run command,
 # then there is no point in running this testcase...
-if [use_gdb_stub] {
-     untested "cannot use -exec-run command"
-     return -1
-}
+require !use_gdb_stub
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
index 252f307c268..55dab46fba8 100644
--- a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
+++ b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
@@ -41,10 +41,7 @@ standard_testfile
 
 # Multiple inferiors are needed, therefore only native gdb and extended
 # gdbserver modes are supported.
-if [use_gdb_stub] {
-    untested "using gdb stub"
-    return
-}
+require !use_gdb_stub
 
 set compile_options "debug pthreads"
 if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
diff --git a/gdb/testsuite/gdb.multi/attach-while-running.exp b/gdb/testsuite/gdb.multi/attach-while-running.exp
index d3e0d462413..3a0e27b26ba 100644
--- a/gdb/testsuite/gdb.multi/attach-while-running.exp
+++ b/gdb/testsuite/gdb.multi/attach-while-running.exp
@@ -36,10 +36,7 @@
 
 standard_testfile
 
-if [use_gdb_stub] {
-    unsupported "test requires running"
-    return
-}
+require !use_gdb_stub
 
 if { [build_executable "failed to prepare" ${testfile} ${srcfile}] } {
     return
diff --git a/gdb/testsuite/gdb.multi/dummy-frame-restore.exp b/gdb/testsuite/gdb.multi/dummy-frame-restore.exp
index 1974cc19e41..380010d19f0 100644
--- a/gdb/testsuite/gdb.multi/dummy-frame-restore.exp
+++ b/gdb/testsuite/gdb.multi/dummy-frame-restore.exp
@@ -17,9 +17,7 @@ standard_testfile .c
 set executable ${testfile}
 
 # The plain remote target can't do multiple inferiors.
-if [use_gdb_stub] {
-    return
-}
+require !use_gdb_stub
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
     return -1
diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
index 1ed2514c4d4..85d0cce327c 100644
--- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp
+++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
@@ -19,9 +19,7 @@
 set testfile "multi-arch-exec"
 
 # The plain remote target can't do multiple inferiors.
-if [use_gdb_stub] {
-    return
-}
+require !use_gdb_stub
 
 # The 64-bit compile may succeed for i386-linux, but gdb won't be able
 # to load the file.
diff --git a/gdb/testsuite/gdb.multi/multi-arch.exp b/gdb/testsuite/gdb.multi/multi-arch.exp
index 5943d490262..f2c8a282a61 100644
--- a/gdb/testsuite/gdb.multi/multi-arch.exp
+++ b/gdb/testsuite/gdb.multi/multi-arch.exp
@@ -19,9 +19,7 @@
 set testfile "multi-arch"
 
 # The plain remote target can't do multiple inferiors.
-if [use_gdb_stub] {
-    return
-}
+require !use_gdb_stub
 
 # The 64-bit compile may succeed for i386-linux, but gdb won't be able
 # to load the file.
diff --git a/gdb/testsuite/gdb.multi/multi-exit.exp b/gdb/testsuite/gdb.multi/multi-exit.exp
index f35eab78df6..4597a0e82fd 100644
--- a/gdb/testsuite/gdb.multi/multi-exit.exp
+++ b/gdb/testsuite/gdb.multi/multi-exit.exp
@@ -24,9 +24,7 @@
 
 standard_testfile
 
-if {[use_gdb_stub]} {
-    return 0
-}
+require !use_gdb_stub
 
 if {[build_executable "failed to prepare" $testfile $srcfile]} {
     return -1
diff --git a/gdb/testsuite/gdb.multi/multi-kill.exp b/gdb/testsuite/gdb.multi/multi-kill.exp
index 72dd22392ec..a6c3e633784 100644
--- a/gdb/testsuite/gdb.multi/multi-kill.exp
+++ b/gdb/testsuite/gdb.multi/multi-kill.exp
@@ -24,9 +24,7 @@
 
 standard_testfile
 
-if {[use_gdb_stub]} {
-    return 0
-}
+require !use_gdb_stub
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug}]} {
     return -1
diff --git a/gdb/testsuite/gdb.multi/run-only-second-inf.exp b/gdb/testsuite/gdb.multi/run-only-second-inf.exp
index 7796c9731a2..3e3046988f2 100644
--- a/gdb/testsuite/gdb.multi/run-only-second-inf.exp
+++ b/gdb/testsuite/gdb.multi/run-only-second-inf.exp
@@ -20,9 +20,7 @@
 
 standard_testfile
 
-if {[use_gdb_stub]} {
-    return 0
-}
+require !use_gdb_stub
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug}]} {
     return -1
diff --git a/gdb/testsuite/gdb.multi/start-inferior-specific.exp b/gdb/testsuite/gdb.multi/start-inferior-specific.exp
index 4823a94c21c..8641341d73e 100644
--- a/gdb/testsuite/gdb.multi/start-inferior-specific.exp
+++ b/gdb/testsuite/gdb.multi/start-inferior-specific.exp
@@ -25,9 +25,7 @@
 
 standard_testfile .c -other.c
 
-if { [use_gdb_stub] } {
-    return
-}
+require !use_gdb_stub
 
 set srcfile_other ${srcfile2}
 set binfile_other ${binfile}-other
diff --git a/gdb/testsuite/gdb.multi/tids-gid-reset.exp b/gdb/testsuite/gdb.multi/tids-gid-reset.exp
index 0f662627eaf..a57d0143116 100644
--- a/gdb/testsuite/gdb.multi/tids-gid-reset.exp
+++ b/gdb/testsuite/gdb.multi/tids-gid-reset.exp
@@ -52,10 +52,7 @@ with_test_prefix "single-inferior" {
 
 # For the following tests, multiple inferiors are needed, therefore
 # non-extended gdbserver is not supported.
-if [use_gdb_stub] {
-    untested "using gdb stub"
-    return
-}
+require !use_gdb_stub
 
 # Test with multiple inferiors.  This time, since we restart inferior
 # 1 while inferior 2 still has threads, then the new thread 1.1 should
diff --git a/gdb/testsuite/gdb.multi/tids.exp b/gdb/testsuite/gdb.multi/tids.exp
index 68ba24b0e5c..ff48d422c9b 100644
--- a/gdb/testsuite/gdb.multi/tids.exp
+++ b/gdb/testsuite/gdb.multi/tids.exp
@@ -22,10 +22,7 @@ standard_testfile
 # Multiple inferiors are needed, therefore both native and extended
 # gdbserver modes are supported.  Only non-extended gdbserver is not
 # supported.
-if [use_gdb_stub] {
-    untested "using gdb stub"
-    return
-}
+require !use_gdb_stub
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {pthreads debug}] } {
     return -1
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
index 8df68b382e1..e29e0675d8e 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
@@ -18,10 +18,7 @@ set executable ${testfile}
 
 # Multiple inferiors are needed, therefore both native and extended gdbserver
 # modes are supported.  Only non-extended gdbserver is not supported.
-if [use_gdb_stub] {
-    untested "using gdb stub"
-    return
-}
+require !use_gdb_stub
 
 # Do not use simple hardware watchpoints ("watch") as its false hit may be
 # unnoticed by GDB if it reads it still has the same value.
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
index 8c1a2d29b75..109f8c1ca4e 100644
--- a/gdb/testsuite/gdb.python/py-events.exp
+++ b/gdb/testsuite/gdb.python/py-events.exp
@@ -13,9 +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 [use_gdb_stub] {
-    return 0
-}
+require !use_gdb_stub
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp
index 2c85793e11a..c778d31719c 100644
--- a/gdb/testsuite/gdb.threads/attach-into-signal.exp
+++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp
@@ -17,8 +17,8 @@
 # This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
 # This test only works on Linux
-if { ![isnative] || [is_remote host] || [use_gdb_stub]
-     || ![istarget *-linux*] } {
+require !use_gdb_stub
+if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
index b13abe7039e..823614e5ba3 100644
--- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
+++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
@@ -37,8 +37,8 @@
 # during the attach phase.
 
 # This test only works on Linux
-if { ![isnative] || [is_remote host] || [use_gdb_stub]
-     || ![istarget *-linux*] } {
+require !use_gdb_stub
+if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
index 51391acae39..3904d4c087b 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
@@ -18,8 +18,8 @@
 # This file was updated by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
 # This test only works on Linux
-if { ![isnative] || [is_remote host] || [use_gdb_stub]
-     || ![istarget *-linux*] } {
+require !use_gdb_stub
+if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
index 1c98578b69a..5f48966f78d 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
+++ b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
@@ -25,10 +25,7 @@
 # To catch the bug, this test verifies that we can hit a breakpoint after a
 # vfork call, while a second inferior runs in the background.
 
-if [use_gdb_stub] {
-    unsupported "test uses multiple inferiors"
-    return
-}
+require !use_gdb_stub
 
 standard_testfile .c -sleep.c
 
diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp
index cdde4de18eb..02606ee286d 100644
--- a/gdb/testsuite/gdb.tui/corefile-run.exp
+++ b/gdb/testsuite/gdb.tui/corefile-run.exp
@@ -29,7 +29,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
 }
 
 # Only run on native boards.
-if { [use_gdb_stub] || [target_info gdb_protocol] == "extended-remote" } {
+require !use_gdb_stub
+if { [target_info gdb_protocol] == "extended-remote" } {
     untested "not supported"
     return
 }
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 33/79] Use require can_spawn_for_attach
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (31 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 32/79] Use require use_gdb_stub Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 34/79] Use require isnative Tom Tromey
                   ` (47 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require can_spawn_for_attach".
---
 gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp           | 4 +---
 gdb/testsuite/gdb.base/attach-pie-noexec.exp                | 4 +---
 gdb/testsuite/gdb.base/attach-twice.exp                     | 4 +---
 gdb/testsuite/gdb.base/attach.exp                           | 4 +---
 gdb/testsuite/gdb.base/dlmopen.exp                          | 5 +----
 gdb/testsuite/gdb.base/interrupt-daemon-attach.exp          | 4 +---
 gdb/testsuite/gdb.base/jit-attach-pie.exp                   | 4 +---
 gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp        | 4 +---
 gdb/testsuite/gdb.base/run-after-attach.exp                 | 4 +---
 gdb/testsuite/gdb.base/solib-overlap.exp                    | 6 +-----
 gdb/testsuite/gdb.base/watchpoint-hw-attach.exp             | 4 +---
 gdb/testsuite/gdb.mi/list-thread-groups-available.exp       | 4 +---
 gdb/testsuite/gdb.multi/attach-no-multi-process.exp         | 4 +---
 gdb/testsuite/gdb.multi/multi-attach.exp                    | 4 +---
 gdb/testsuite/gdb.multi/multi-term-settings.exp             | 4 +---
 gdb/testsuite/gdb.python/py-sync-interp.exp                 | 4 +---
 gdb/testsuite/gdb.server/attach-flag.exp                    | 4 +---
 gdb/testsuite/gdb.server/ext-attach.exp                     | 4 +---
 .../gdb.threads/attach-many-short-lived-threads.exp         | 4 +---
 gdb/testsuite/gdb.threads/attach-non-stop.exp               | 4 +---
 gdb/testsuite/gdb.threads/clone-attach-detach.exp           | 4 +---
 gdb/testsuite/gdb.threads/detach-step-over.exp              | 4 +---
 22 files changed, 22 insertions(+), 69 deletions(-)

diff --git a/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp b/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp
index e5576512081..c35ce882383 100644
--- a/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp
+++ b/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp
@@ -18,9 +18,7 @@
 # call any of setpgrp/setpgid/setsid to move itself to a new process
 # group.
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/attach-pie-noexec.exp b/gdb/testsuite/gdb.base/attach-pie-noexec.exp
index f32fce2bddf..a949dab521f 100644
--- a/gdb/testsuite/gdb.base/attach-pie-noexec.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-noexec.exp
@@ -13,9 +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 {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile .c
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.base/attach-twice.exp b/gdb/testsuite/gdb.base/attach-twice.exp
index e140657278c..faca8c02c58 100644
--- a/gdb/testsuite/gdb.base/attach-twice.exp
+++ b/gdb/testsuite/gdb.base/attach-twice.exp
@@ -13,9 +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 {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index dc0af932024..03214885082 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -13,9 +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 {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile attach.c attach2.c attach3.c
 set binfile2 ${binfile}2
diff --git a/gdb/testsuite/gdb.base/dlmopen.exp b/gdb/testsuite/gdb.base/dlmopen.exp
index 4bbe37eb39d..54a5eadee2d 100644
--- a/gdb/testsuite/gdb.base/dlmopen.exp
+++ b/gdb/testsuite/gdb.base/dlmopen.exp
@@ -144,10 +144,7 @@ gdb_breakpoint $srcfile:$bp_main
 test_dlmopen
 
 # Try the same again when attaching after dlmopen().
-if { ![can_spawn_for_attach] } {
-    unsupported "target does not support attach"
-    return -1
-}
+require can_spawn_for_attach
 
 clean_restart $binfile
 
diff --git a/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp b/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp
index b2411c9ab59..0448de1de77 100644
--- a/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp
+++ b/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp
@@ -24,9 +24,7 @@ if [target_info exists gdb,nointerrupts] {
     return
 }
 
-if { ![can_spawn_for_attach] } {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/jit-attach-pie.exp b/gdb/testsuite/gdb.base/jit-attach-pie.exp
index 6b2d4879eb8..df92cb772d8 100644
--- a/gdb/testsuite/gdb.base/jit-attach-pie.exp
+++ b/gdb/testsuite/gdb.base/jit-attach-pie.exp
@@ -13,9 +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 {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile .c
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp b/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp
index e416586b20c..f093736fcd7 100644
--- a/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp
+++ b/gdb/testsuite/gdb.base/kill-detach-inferiors-cmd.exp
@@ -18,9 +18,7 @@
 # Test the basic operation of the "kill inferiors" and "detach inferiors"
 # commands.
 
-if ![can_spawn_for_attach] {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.base/run-after-attach.exp b/gdb/testsuite/gdb.base/run-after-attach.exp
index b3ae58b48e4..549275c27a3 100644
--- a/gdb/testsuite/gdb.base/run-after-attach.exp
+++ b/gdb/testsuite/gdb.base/run-after-attach.exp
@@ -16,9 +16,7 @@
 # Check that forking a process after a previous process was attached to unsets
 # attach_flag.  This is done indirectly by inspecting GDB's quit prompt.
 
-if ![can_spawn_for_attach] {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp
index 084047b709f..2c0e6f87286 100644
--- a/gdb/testsuite/gdb.base/solib-overlap.exp
+++ b/gdb/testsuite/gdb.base/solib-overlap.exp
@@ -27,11 +27,7 @@
 #   difference appears to be caused by prelink, adjusting expectations
 # In such case both disk libraries will be loaded at VMAs starting at zero.
 
-require !skip_shlib_tests
-
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require !skip_shlib_tests can_spawn_for_attach
 
 # Library file.
 set libname "solib-overlap-lib"
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
index e1a9c94d94c..e8720458072 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
@@ -18,9 +18,7 @@
 
 require !skip_hw_watchpoint_tests
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index e9713248774..646d74ed0a6 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -35,9 +35,7 @@ if [mi_gdb_start] {
     return
 }
 
-if ![can_spawn_for_attach] {
-    return
-}
+require can_spawn_for_attach
 
 set string_re {(?:[^\\"]|\\.)*}
 
diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
index f0a96436315..882ab69e14d 100644
--- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
+++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
@@ -26,9 +26,7 @@ if { [skip_gdbserver_tests] } {
     return 0
 }
 
-if {![can_spawn_for_attach]} {
-    return
-}
+require can_spawn_for_attach
 
 if {[build_executable "build" $testfile $srcfile {debug}] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.multi/multi-attach.exp b/gdb/testsuite/gdb.multi/multi-attach.exp
index 1c99ac85d8e..81230a03dc7 100644
--- a/gdb/testsuite/gdb.multi/multi-attach.exp
+++ b/gdb/testsuite/gdb.multi/multi-attach.exp
@@ -19,9 +19,7 @@
 
 standard_testfile
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
     return -1
diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.exp b/gdb/testsuite/gdb.multi/multi-term-settings.exp
index a69ed5b76eb..a55bc9b435a 100644
--- a/gdb/testsuite/gdb.multi/multi-term-settings.exp
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp
@@ -25,9 +25,7 @@
 
 standard_testfile
 
-if ![can_spawn_for_attach] {
-    return 0
-}
+require can_spawn_for_attach
 
 if [build_executable "failed to prepare" $testfile $srcfile {debug}] {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-sync-interp.exp b/gdb/testsuite/gdb.python/py-sync-interp.exp
index add962ff1df..408a165e648 100644
--- a/gdb/testsuite/gdb.python/py-sync-interp.exp
+++ b/gdb/testsuite/gdb.python/py-sync-interp.exp
@@ -20,9 +20,7 @@
 
 standard_testfile
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp
index 5f9019df6a7..ea4c87ee077 100644
--- a/gdb/testsuite/gdb.server/attach-flag.exp
+++ b/gdb/testsuite/gdb.server/attach-flag.exp
@@ -25,9 +25,7 @@ if { [skip_gdbserver_tests] } {
     return 0
 }
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 # Start the test program, attach to it using gdbserver's --attach flag, connect
 # to it with GDB, check that what we see makes sense.
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp
index 7a5221188d8..62296d091fa 100644
--- a/gdb/testsuite/gdb.server/ext-attach.exp
+++ b/gdb/testsuite/gdb.server/ext-attach.exp
@@ -26,9 +26,7 @@ if { [skip_gdbserver_tests] } {
     return 0
 }
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
index bf5fe08f093..1dcf04d8b5d 100644
--- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
+++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
@@ -49,9 +49,7 @@ if {[bad_dejagnu]} {
     return 0
 }
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.threads/attach-non-stop.exp b/gdb/testsuite/gdb.threads/attach-non-stop.exp
index 3c3f2fafaf3..478032e09a1 100644
--- a/gdb/testsuite/gdb.threads/attach-non-stop.exp
+++ b/gdb/testsuite/gdb.threads/attach-non-stop.exp
@@ -19,9 +19,7 @@
 #  - maint target non-stop off/on
 #  - "attach" vs "attach &"
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.threads/clone-attach-detach.exp b/gdb/testsuite/gdb.threads/clone-attach-detach.exp
index d9642051d17..ac9b92d5f57 100644
--- a/gdb/testsuite/gdb.threads/clone-attach-detach.exp
+++ b/gdb/testsuite/gdb.threads/clone-attach-detach.exp
@@ -23,9 +23,7 @@ if ![istarget *-*-linux*] {
     return
 }
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.threads/detach-step-over.exp b/gdb/testsuite/gdb.threads/detach-step-over.exp
index b71059229fc..ed9dc1aab88 100644
--- a/gdb/testsuite/gdb.threads/detach-step-over.exp
+++ b/gdb/testsuite/gdb.threads/detach-step-over.exp
@@ -48,9 +48,7 @@
 # a breakpoint, which has helped with exposing further corner case
 # bugs.
 
-if {![can_spawn_for_attach]} {
-    return 0
-}
+require can_spawn_for_attach
 
 standard_testfile
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 34/79] Use require isnative
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (32 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 33/79] Use require can_spawn_for_attach Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 35/79] Use require skip_gdbserver_tests Tom Tromey
                   ` (46 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require isnative".
---
 gdb/testsuite/gdb.arch/s390-multiarch.exp         | 3 ++-
 gdb/testsuite/gdb.base/argv0-symlink.exp          | 5 +----
 gdb/testsuite/gdb.base/attach-pie-misread.exp     | 5 ++---
 gdb/testsuite/gdb.base/bigcore.exp                | 5 +----
 gdb/testsuite/gdb.base/break-interp.exp           | 5 ++---
 gdb/testsuite/gdb.base/corefile.exp               | 4 +---
 gdb/testsuite/gdb.base/corefile2.exp              | 4 +---
 gdb/testsuite/gdb.base/jit-reader.exp             | 6 +-----
 gdb/testsuite/gdb.base/prelink.exp                | 3 ++-
 gdb/testsuite/gdb.base/skip-solib.exp             | 4 ++--
 gdb/testsuite/gdb.mi/mi-async.exp                 | 3 ++-
 gdb/testsuite/gdb.mi/mi-corefile.exp              | 4 +---
 gdb/testsuite/gdb.threads/attach-into-signal.exp  | 4 ++--
 gdb/testsuite/gdb.threads/attach-slow-waitpid.exp | 4 ++--
 gdb/testsuite/gdb.threads/attach-stopped.exp      | 4 ++--
 gdb/testsuite/gdb.threads/corethreads.exp         | 3 ++-
 16 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/s390-multiarch.exp b/gdb/testsuite/gdb.arch/s390-multiarch.exp
index f08c5770744..b82cf159011 100644
--- a/gdb/testsuite/gdb.arch/s390-multiarch.exp
+++ b/gdb/testsuite/gdb.arch/s390-multiarch.exp
@@ -23,7 +23,8 @@
 # running native.  It should be executed on a sufficiently new Linux
 # kernel that provides the 'system_call' regset.
 
-if { ![isnative] || ![istarget s390x-*-* ] } {
+require isnative
+if { ![istarget s390x-*-* ] } {
     verbose "Skipping s390 multi-arch tests."
     return
 }
diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
index 82e77cbe080..b321a244221 100644
--- a/gdb/testsuite/gdb.base/argv0-symlink.exp
+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
@@ -20,10 +20,7 @@
 # Therefore, it can't work reliably on anything other than configurations 
 # where build/host/target are all the same.
 
-if { ![isnative] } {
-    unsupported "argv0-symlink.exp not supported on non-native target"
-    return -1
-}
+require isnative
 
 if { [is_remote host] } {
     unsupported "argv0-symlink.exp not supported on remote host"
diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
index cd96a6ea76a..4e0d549351c 100644
--- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
@@ -14,9 +14,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-require !use_gdb_stub
-if { ![isnative] || [is_remote host]
-     || ![istarget *-linux*] || [skip_shlib_tests]} {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index f3e7467e942..743dc1dfbec 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -20,10 +20,7 @@
 # Are we on a target board?  As of 2004-02-12, GDB didn't have a
 # mechanism that would let it efficiently access a remote corefile.
 
-if {![isnative]} {
-    untested "remote system"
-    return
-}
+require isnative
 
 # Can the system run this test (in particular support sparse
 # corefiles)?  On systems that lack sparse corefile support this test
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 02a5685802e..2cee092b184 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -14,9 +14,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-require !use_gdb_stub
-if { ![isnative] || [is_remote host]
-     || ![istarget *-linux*] || [skip_shlib_tests]} {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index 2888e2d5e41..4da4b0de684 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -17,9 +17,7 @@
 
 
 # are we on a target board
-if {![isnative]} {
-    return
-}
+require isnative
 
 standard_testfile coremaker.c
 
diff --git a/gdb/testsuite/gdb.base/corefile2.exp b/gdb/testsuite/gdb.base/corefile2.exp
index 75981ac42ab..51732d61bf5 100644
--- a/gdb/testsuite/gdb.base/corefile2.exp
+++ b/gdb/testsuite/gdb.base/corefile2.exp
@@ -18,9 +18,7 @@
 # coremaker2.c for details.
 
 # are we on a target board
-if {![isnative]} {
-    return
-}
+require isnative
 
 # Some of these tests will only work on GNU/Linux due to the
 # fact that Linux core files includes a section describing
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 1d02233406e..1ff3f2a0c21 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -22,11 +22,7 @@ if { (![istarget x86_64-*-*] && ![istarget i?86-*-*]) || ![is_lp64_target] } {
     return -1;
 }
 
-require !skip_shlib_tests
-
-if { ![isnative] } {
-    return -1
-}
+require !skip_shlib_tests isnative
 
 # Increase this to see more detail.
 set test_verbose 0
diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp
index a89aaa1b370..9c5b777b4a2 100644
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -19,7 +19,8 @@
 # This file was written by Alexandre Oliva <aoliva@redhat.com>
 
 
-if { ![isnative] || [is_remote host] || [skip_shlib_tests]} {
+require isnative
+if { [is_remote host] || [skip_shlib_tests]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp
index 60d5dffe527..22a1e8746e7 100644
--- a/gdb/testsuite/gdb.base/skip-solib.exp
+++ b/gdb/testsuite/gdb.base/skip-solib.exp
@@ -20,8 +20,8 @@
 #
 
 # This only works on GNU/Linux.
-if { ![isnative] || [is_remote host] || ![istarget *-linux*]
-     || [skip_shlib_tests]} {
+require isnative
+if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp
index 880db6de68b..5ca7c5dccc3 100644
--- a/gdb/testsuite/gdb.mi/mi-async.exp
+++ b/gdb/testsuite/gdb.mi/mi-async.exp
@@ -21,7 +21,8 @@
 # mi_run_cmd, it ignores whatever target the rest of GDB testsuite is
 # using, and always tries to run natively.  So, don't do anything unless
 # we're actually testing native.
-if {!([isnative] && [istarget *-linux*])} {
+require isnative
+if {![istarget *-linux*]} {
   return
 }
 
diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi-corefile.exp
index 9f9cac56779..0c791888117 100644
--- a/gdb/testsuite/gdb.mi/mi-corefile.exp
+++ b/gdb/testsuite/gdb.mi/mi-corefile.exp
@@ -18,9 +18,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-if {![isnative]} {
-    return
-}
+require isnative
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp
index c778d31719c..4a5caaa2e85 100644
--- a/gdb/testsuite/gdb.threads/attach-into-signal.exp
+++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp
@@ -17,8 +17,8 @@
 # This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
 # This test only works on Linux
-require !use_gdb_stub
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
index 823614e5ba3..7512a672890 100644
--- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
+++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
@@ -37,8 +37,8 @@
 # during the attach phase.
 
 # This test only works on Linux
-require !use_gdb_stub
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
index 3904d4c087b..35b31afafaf 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
@@ -18,8 +18,8 @@
 # This file was updated by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
 # This test only works on Linux
-require !use_gdb_stub
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.threads/corethreads.exp b/gdb/testsuite/gdb.threads/corethreads.exp
index d1f70959e18..026499e30d3 100644
--- a/gdb/testsuite/gdb.threads/corethreads.exp
+++ b/gdb/testsuite/gdb.threads/corethreads.exp
@@ -15,7 +15,8 @@
 
 # Are we on a target board?  And non-Linux targets seem to identify the thread
 # differently.
-if {![isnative] || ![istarget "*-*-linux*"]} {
+require isnative
+if {![istarget "*-*-linux*"]} {
     return
 }
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 35/79] Use require skip_gdbserver_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (33 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 34/79] Use require isnative Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 36/79] Use require skip_shlib_tests Tom Tromey
                   ` (45 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_gdbserver_tests".
---
 gdb/testsuite/gdb.btrace/reconnect.exp                     | 5 +----
 gdb/testsuite/gdb.mi/mi-file-transfer.exp                  | 4 +---
 gdb/testsuite/gdb.multi/attach-no-multi-process.exp        | 4 +---
 gdb/testsuite/gdb.python/py-send-packet.exp                | 4 +---
 gdb/testsuite/gdb.server/abspath.exp                       | 4 +---
 gdb/testsuite/gdb.server/attach-flag.exp                   | 4 +---
 gdb/testsuite/gdb.server/bkpt-other-inferior.exp           | 4 +---
 gdb/testsuite/gdb.server/connect-stopped-target.exp        | 4 +---
 gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp   | 4 +---
 gdb/testsuite/gdb.server/connect-without-multi-process.exp | 4 +---
 gdb/testsuite/gdb.server/exit-multiple-threads.exp         | 5 +----
 gdb/testsuite/gdb.server/ext-attach.exp                    | 4 +---
 gdb/testsuite/gdb.server/ext-restart.exp                   | 4 +---
 gdb/testsuite/gdb.server/ext-run.exp                       | 4 +---
 gdb/testsuite/gdb.server/ext-wrapper.exp                   | 4 +---
 gdb/testsuite/gdb.server/file-transfer.exp                 | 4 +---
 gdb/testsuite/gdb.server/monitor-exit-quit.exp             | 4 +---
 gdb/testsuite/gdb.server/multi-ui-errors.exp               | 4 +---
 gdb/testsuite/gdb.server/no-thread-db.exp                  | 4 +---
 gdb/testsuite/gdb.server/non-existing-program.exp          | 4 +---
 gdb/testsuite/gdb.server/reconnect-ctrl-c.exp              | 5 +----
 gdb/testsuite/gdb.server/run-without-local-binary.exp      | 4 +---
 gdb/testsuite/gdb.server/server-connect.exp                | 4 +---
 gdb/testsuite/gdb.server/server-kill-python.exp            | 4 +---
 gdb/testsuite/gdb.server/server-kill.exp                   | 4 +---
 gdb/testsuite/gdb.server/server-mon.exp                    | 4 +---
 gdb/testsuite/gdb.server/server-pipe.exp                   | 4 +---
 gdb/testsuite/gdb.server/server-run.exp                    | 4 +---
 gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp    | 5 +----
 gdb/testsuite/gdb.server/stop-reply-no-thread.exp          | 5 +----
 gdb/testsuite/gdb.server/sysroot.exp                       | 5 +----
 gdb/testsuite/gdb.server/twice-connect.exp                 | 4 +---
 gdb/testsuite/gdb.server/unittest.exp                      | 4 +---
 gdb/testsuite/gdb.server/wrapper.exp                       | 4 +---
 34 files changed, 34 insertions(+), 108 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp
index 868cf1f0680..548aa16ed29 100644
--- a/gdb/testsuite/gdb.btrace/reconnect.exp
+++ b/gdb/testsuite/gdb.btrace/reconnect.exp
@@ -20,10 +20,7 @@
 load_lib gdbserver-support.exp
 
 require !skip_btrace_tests
-if { [skip_gdbserver_tests] } {
-    unsupported "target does not support gdbserver"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.mi/mi-file-transfer.exp b/gdb/testsuite/gdb.mi/mi-file-transfer.exp
index ec914d18043..71aa2f83cc0 100644
--- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp
+++ b/gdb/testsuite/gdb.mi/mi-file-transfer.exp
@@ -20,9 +20,7 @@ load_lib gdbserver-support.exp
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 standard_testfile basics.c
 
diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
index 882ab69e14d..50b04ad6761 100644
--- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
+++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 require can_spawn_for_attach
 
diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp
index baec66d5b0c..c6305ed6291 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.exp
+++ b/gdb/testsuite/gdb.python/py-send-packet.exp
@@ -24,9 +24,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.server/abspath.exp b/gdb/testsuite/gdb.server/abspath.exp
index ddfd7221273..58d9b39efc1 100644
--- a/gdb/testsuite/gdb.server/abspath.exp
+++ b/gdb/testsuite/gdb.server/abspath.exp
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile normal.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 # Because we're relying on being able to change our CWD before
 # executing gdbserver, we just run if we're not testing with a remote
diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp
index ea4c87ee077..bb6f3673e4e 100644
--- a/gdb/testsuite/gdb.server/attach-flag.exp
+++ b/gdb/testsuite/gdb.server/attach-flag.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 require can_spawn_for_attach
 
diff --git a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp
index e52139fc27d..fe561d8e924 100644
--- a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp
+++ b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [prepare_for_testing "failed to prepare" ${binfile} "${srcfile}" \
 	  {debug pthreads}] } {
diff --git a/gdb/testsuite/gdb.server/connect-stopped-target.exp b/gdb/testsuite/gdb.server/connect-stopped-target.exp
index dade80134ff..ed193f8599c 100644
--- a/gdb/testsuite/gdb.server/connect-stopped-target.exp
+++ b/gdb/testsuite/gdb.server/connect-stopped-target.exp
@@ -20,9 +20,7 @@
 load_lib gdbserver-support.exp
 load_lib prelink-support.exp
 
-if {[skip_gdbserver_tests]} {
-    return
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
index b0804445f7a..159f82f6c3b 100644
--- a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
+++ b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
@@ -25,9 +25,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
     return -1
diff --git a/gdb/testsuite/gdb.server/connect-without-multi-process.exp b/gdb/testsuite/gdb.server/connect-without-multi-process.exp
index 816d367baa6..831ccd6f876 100644
--- a/gdb/testsuite/gdb.server/connect-without-multi-process.exp
+++ b/gdb/testsuite/gdb.server/connect-without-multi-process.exp
@@ -18,9 +18,7 @@
 
 load_lib gdbserver-support.exp
 
-if {[skip_gdbserver_tests]} {
-    return
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.server/exit-multiple-threads.exp b/gdb/testsuite/gdb.server/exit-multiple-threads.exp
index d53651e115b..88c4df11ccd 100644
--- a/gdb/testsuite/gdb.server/exit-multiple-threads.exp
+++ b/gdb/testsuite/gdb.server/exit-multiple-threads.exp
@@ -25,10 +25,7 @@
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp
index 62296d091fa..81b324d4c5f 100644
--- a/gdb/testsuite/gdb.server/ext-attach.exp
+++ b/gdb/testsuite/gdb.server/ext-attach.exp
@@ -22,9 +22,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 require can_spawn_for_attach
 
diff --git a/gdb/testsuite/gdb.server/ext-restart.exp b/gdb/testsuite/gdb.server/ext-restart.exp
index 0d133ca2993..df26c91fa25 100644
--- a/gdb/testsuite/gdb.server/ext-restart.exp
+++ b/gdb/testsuite/gdb.server/ext-restart.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 save_vars { GDBFLAGS } {
     # If GDB and GDBserver are both running locally, set the sysroot to avoid
diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp
index bfc68673540..7cfd2bf717f 100644
--- a/gdb/testsuite/gdb.server/ext-run.exp
+++ b/gdb/testsuite/gdb.server/ext-run.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/ext-wrapper.exp b/gdb/testsuite/gdb.server/ext-wrapper.exp
index 98aa889edcd..4f150cfc0a5 100644
--- a/gdb/testsuite/gdb.server/ext-wrapper.exp
+++ b/gdb/testsuite/gdb.server/ext-wrapper.exp
@@ -19,9 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile wrapper.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp
index ea9298f3a23..cd98ffee90d 100644
--- a/gdb/testsuite/gdb.server/file-transfer.exp
+++ b/gdb/testsuite/gdb.server/file-transfer.exp
@@ -20,9 +20,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.server/monitor-exit-quit.exp b/gdb/testsuite/gdb.server/monitor-exit-quit.exp
index 8fa41e3f07f..88eb2e483b9 100644
--- a/gdb/testsuite/gdb.server/monitor-exit-quit.exp
+++ b/gdb/testsuite/gdb.server/monitor-exit-quit.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/multi-ui-errors.exp b/gdb/testsuite/gdb.server/multi-ui-errors.exp
index e5aad88f140..95a08c9bca6 100644
--- a/gdb/testsuite/gdb.server/multi-ui-errors.exp
+++ b/gdb/testsuite/gdb.server/multi-ui-errors.exp
@@ -24,9 +24,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 save_vars { GDBFLAGS } {
     # If GDB and GDBserver are both running locally, set the sysroot to avoid
diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp
index d0b43f9cf79..0e2fbae80be 100644
--- a/gdb/testsuite/gdb.server/no-thread-db.exp
+++ b/gdb/testsuite/gdb.server/no-thread-db.exp
@@ -25,9 +25,7 @@ load_lib gdbserver-support.exp
 standard_testfile
 set unresolvable_thread_db_path "/foo/bar"
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     return -1
diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp
index d4fceeab88a..60ca0a43dfb 100644
--- a/gdb/testsuite/gdb.server/non-existing-program.exp
+++ b/gdb/testsuite/gdb.server/non-existing-program.exp
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 set gdbserver [find_gdbserver]
 if { $gdbserver == "" } {
diff --git a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
index f316609b609..42707692c4b 100644
--- a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
+++ b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
@@ -19,10 +19,7 @@
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 if [target_info exists gdb,nointerrupts] {
     verbose "Skipping reconnect-ctrl-c.exp because of nointerrupts."
diff --git a/gdb/testsuite/gdb.server/run-without-local-binary.exp b/gdb/testsuite/gdb.server/run-without-local-binary.exp
index 21682a58c77..4f3f0d9af4e 100644
--- a/gdb/testsuite/gdb.server/run-without-local-binary.exp
+++ b/gdb/testsuite/gdb.server/run-without-local-binary.exp
@@ -15,9 +15,7 @@
 
 load_lib gdbserver-support.exp
 
-if {[skip_gdbserver_tests]} {
-    return
-}
+require !skip_gdbserver_tests
 
 standard_testfile normal.c
 
diff --git a/gdb/testsuite/gdb.server/server-connect.exp b/gdb/testsuite/gdb.server/server-connect.exp
index a6d469e54d5..76570f34232 100644
--- a/gdb/testsuite/gdb.server/server-connect.exp
+++ b/gdb/testsuite/gdb.server/server-connect.exp
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile normal.c
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 # We want to have control over where we start gdbserver.
 if { [is_remote target] } {
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index dbf52189915..1eb9e2e51c5 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -23,9 +23,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile multi-ui-errors.c
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 # Gdb needs to be running for skip_python_tests, but exit once we're done,
 # we'll start a custom gdb after this.
diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index f59e11a43b5..04b7f62561a 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [build_executable "failed to prepare" ${testfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.server/server-mon.exp b/gdb/testsuite/gdb.server/server-mon.exp
index b9ae0083a36..4b728cb8038 100644
--- a/gdb/testsuite/gdb.server/server-mon.exp
+++ b/gdb/testsuite/gdb.server/server-mon.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp
index 662ff0a39c7..2038ca9140d 100644
--- a/gdb/testsuite/gdb.server/server-pipe.exp
+++ b/gdb/testsuite/gdb.server/server-pipe.exp
@@ -32,9 +32,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 set gdbserver [find_gdbserver]
 if { $gdbserver == "" } {
diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-run.exp
index 522719dc6a5..55b40057f91 100644
--- a/gdb/testsuite/gdb.server/server-run.exp
+++ b/gdb/testsuite/gdb.server/server-run.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
index 8ea8344ad00..066f2a1b736 100644
--- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
+++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
@@ -30,10 +30,7 @@
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if { [build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1 } {
diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp
index 685ef17bd3d..134ab6a9c29 100644
--- a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp
+++ b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp
@@ -22,10 +22,7 @@
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if { [build_executable "failed to prepare" $testfile $srcfile] == -1 } {
diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp
index 0c7e97c11d8..9845a7a8333 100644
--- a/gdb/testsuite/gdb.server/sysroot.exp
+++ b/gdb/testsuite/gdb.server/sysroot.exp
@@ -20,10 +20,7 @@
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if {[build_executable "failed to prepare" $testfile $srcfile "additional_flags=--no-builtin"] == -1} {
diff --git a/gdb/testsuite/gdb.server/twice-connect.exp b/gdb/testsuite/gdb.server/twice-connect.exp
index adaef53d2ec..a8318c0de4a 100644
--- a/gdb/testsuite/gdb.server/twice-connect.exp
+++ b/gdb/testsuite/gdb.server/twice-connect.exp
@@ -19,9 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [build_executable "failed to prepare" $::testfile $::srcfile \
 	  {debug}] } {
diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp
index 4fc134ddd83..f727892fdc8 100644
--- a/gdb/testsuite/gdb.server/unittest.exp
+++ b/gdb/testsuite/gdb.server/unittest.exp
@@ -19,9 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 global server_spawn_id
 
diff --git a/gdb/testsuite/gdb.server/wrapper.exp b/gdb/testsuite/gdb.server/wrapper.exp
index e85609bdeca..caaa4f69afb 100644
--- a/gdb/testsuite/gdb.server/wrapper.exp
+++ b/gdb/testsuite/gdb.server/wrapper.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [istarget *-*-mingw*]
      || [istarget *-*-cygwin*] } {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 36/79] Use require skip_shlib_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (34 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 35/79] Use require skip_gdbserver_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 37/79] Use require is_c_compiler_gcc Tom Tromey
                   ` (44 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_shlib_tests".  This patch
cleans up a few spots that were missed in the earlier patch.
---
 gdb/testsuite/gdb.base/attach-pie-misread.exp | 4 ++--
 gdb/testsuite/gdb.base/break-interp.exp       | 4 ++--
 gdb/testsuite/gdb.base/info-fun.exp           | 3 ++-
 gdb/testsuite/gdb.base/prelink.exp            | 4 ++--
 gdb/testsuite/gdb.base/skip-solib.exp         | 4 ++--
 gdb/testsuite/gdb.base/solib-search.exp       | 3 ++-
 6 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
index 4e0d549351c..9adf107ad92 100644
--- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
@@ -14,8 +14,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-require !use_gdb_stub isnative
-if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
+require !use_gdb_stub isnative !skip_shlib_tests
+if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 2cee092b184..21452d8569e 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -14,8 +14,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-require !use_gdb_stub isnative
-if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
+require !use_gdb_stub isnative !skip_shlib_tests
+if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/info-fun.exp b/gdb/testsuite/gdb.base/info-fun.exp
index 5bae3e22656..07520049244 100644
--- a/gdb/testsuite/gdb.base/info-fun.exp
+++ b/gdb/testsuite/gdb.base/info-fun.exp
@@ -12,7 +12,8 @@
 # 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_shlib_tests] || [is_remote target] } {
+require !skip_shlib_tests
+if { [is_remote target] } {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp
index 9c5b777b4a2..1e40aecc92b 100644
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -19,8 +19,8 @@
 # This file was written by Alexandre Oliva <aoliva@redhat.com>
 
 
-require isnative
-if { [is_remote host] || [skip_shlib_tests]} {
+require isnative !skip_shlib_tests
+if { [is_remote host] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp
index 22a1e8746e7..f5850c7a0b1 100644
--- a/gdb/testsuite/gdb.base/skip-solib.exp
+++ b/gdb/testsuite/gdb.base/skip-solib.exp
@@ -20,8 +20,8 @@
 #
 
 # This only works on GNU/Linux.
-require isnative
-if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
+require isnative !skip_shlib_tests
+if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp
index 8d2dacfb947..c77fcc4f5ca 100644
--- a/gdb/testsuite/gdb.base/solib-search.exp
+++ b/gdb/testsuite/gdb.base/solib-search.exp
@@ -16,7 +16,8 @@
 # Test solib-search-path, and in the case of solib-svr4.c whether l_addr_p
 # is properly reset when the path is changed.
 
-if {[is_remote target] || [skip_shlib_tests]} {
+require !skip_shlib_tests
+if {[is_remote target]} {
     untested "skipping remote target and shared library tests"
     return -1
 }
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 37/79] Use require is_c_compiler_gcc
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (35 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 36/79] Use require skip_shlib_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 38/79] Use require gdb_debug_enabled Tom Tromey
                   ` (43 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require is_c_compiler_gcc".
---
 gdb/testsuite/gdb.base/morestack.exp                       | 5 +----
 gdb/testsuite/gdb.base/prelink.exp                         | 7 +------
 gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp      | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp        | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp         | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp           | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp                 | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp                   | 4 +---
 gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp          | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp       | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp   | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp               | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp               | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp            | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp               | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-ranges.exp                    | 5 +----
 .../gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp        | 5 +----
 gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp    | 5 +----
 21 files changed, 21 insertions(+), 77 deletions(-)

diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp
index 5c1f0307ffe..a60a3de5a3a 100644
--- a/gdb/testsuite/gdb.base/morestack.exp
+++ b/gdb/testsuite/gdb.base/morestack.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 {![is_c_compiler_gcc]} {
-    unsupported "gcc compiler is required"
-    return
-}
+require is_c_compiler_gcc
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp
index 1e40aecc92b..4d61686c530 100644
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -19,16 +19,11 @@
 # This file was written by Alexandre Oliva <aoliva@redhat.com>
 
 
-require isnative !skip_shlib_tests
+require isnative !skip_shlib_tests is_c_compiler_gcc
 if { [is_remote host] } {
     return
 }
 
-if {![is_c_compiler_gcc]} {
-    unsupported "gcc compiler is required"
-    return -1
-}
-
 load_lib prelink-support.exp
 
 set testfile "prelink"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index 5a92fdf16d0..2fae105cbc8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -28,9 +28,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 # Reuse many of the test source files from dw2-inline-header-1.exp.
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index 3293d6152c0..2494489549f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -56,9 +56,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 # Prepare and run the test.
 proc do_test { start_label func_name tag } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index 5caa9cc9469..bbc14d4a2f6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -51,9 +51,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
     dw2-inline-header.c dw2-inline-header.h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index b98d6003c96..682778479cb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -40,9 +40,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
     dw2-inline-header.c dw2-inline-header.h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 9f5007765eb..29598cb02e7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index c3120a28223..fcde45f80a2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -30,9 +30,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile -lbls.c .S \
     .c .h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index 87c70a4e1fc..d3dc4484073 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index 7e9151da73f..d149efdca1c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index 74faf112594..79e6de789aa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -29,9 +29,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index 2b473776599..68696f0b634 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
index 317ea21574e..888a20c23c5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
@@ -22,10 +22,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index 5e44badb179..c0a33b95b65 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -22,10 +22,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index 6fd837c97df..147e943361e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -21,10 +21,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index 7db7cd2e3f6..c3a1261d133 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -19,10 +19,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if ![is_c_compiler_gcc] {
-    unsupported "gcc required for this test"
-    return 0
-}
+require is_c_compiler_gcc
 
 proc do_test {suffix} {
     global gdb_test_file_name
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
index bb92d7e66d6..b9466eecd3b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
@@ -25,10 +25,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index e195969fd68..75c6b874fc9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -20,10 +20,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if ![is_c_compiler_gcc] {
-    unsupported "gcc required for this test"
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile main.c .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
index de272c875fd..7845ea6a22a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
@@ -21,10 +21,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0  
-}
+require is_c_compiler_gcc
 
 standard_testfile .c -2.c -3.c
 set asmfile [standard_output_file ${testfile}.s]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index 5073611e230..a02e670c5b5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -31,10 +31,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index c5a59f04aa8..be925887c05 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
 require dwarf2_support
 
 # The .c files use __attribute__.
-if ![is_c_compiler_gcc] {
-    verbose "Skipping $gdb_test_file_name."
-    return 0
-}
+require is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 38/79] Use require gdb_debug_enabled
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (36 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 37/79] Use require is_c_compiler_gcc Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 39/79] Use require gdb_skip_xml_test Tom Tromey
                   ` (42 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require gdb_debug_enabled".
---
 gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp           | 5 +----
 gdb/testsuite/gdb.base/debug-expr.exp                        | 5 +----
 gdb/testsuite/gdb.base/foll-fork.exp                         | 5 +----
 gdb/testsuite/gdb.base/fork-print-inferior-events.exp        | 5 +----
 gdb/testsuite/gdb.base/gdb-sigterm.exp                       | 5 +----
 gdb/testsuite/gdb.base/gdbinit-history.exp                   | 5 +----
 gdb/testsuite/gdb.base/osabi.exp                             | 5 +----
 gdb/testsuite/gdb.base/page-logging.exp                      | 5 +----
 gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp               | 5 +----
 gdb/testsuite/gdb.base/style-logging.exp                     | 5 +----
 gdb/testsuite/gdb.base/ui-redirect.exp                       | 5 +----
 gdb/testsuite/gdb.fortran/debug-expr.exp                     | 5 +----
 gdb/testsuite/gdb.gdb/unittest.exp                           | 5 +----
 gdb/testsuite/gdb.mi/new-ui-mi-sync.exp                      | 5 +----
 gdb/testsuite/gdb.mi/user-selected-context-sync.exp          | 5 +----
 gdb/testsuite/gdb.threads/check-libthread-db.exp             | 5 +----
 .../signal-while-stepping-over-bp-other-thread.exp           | 4 +---
 gdb/testsuite/gdb.threads/stepi-random-signal.exp            | 5 +----
 18 files changed, 18 insertions(+), 71 deletions(-)

diff --git a/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp b/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp
index 00a4fe5af5b..0330cfa345a 100644
--- a/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp
+++ b/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp
@@ -17,10 +17,7 @@
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/debug-expr.exp b/gdb/testsuite/gdb.base/debug-expr.exp
index a2fbf7470b1..c7e2afce5a0 100644
--- a/gdb/testsuite/gdb.base/debug-expr.exp
+++ b/gdb/testsuite/gdb.base/debug-expr.exp
@@ -17,10 +17,7 @@
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/foll-fork.exp b/gdb/testsuite/gdb.base/foll-fork.exp
index 59a664952c3..51dfcce7ff5 100644
--- a/gdb/testsuite/gdb.base/foll-fork.exp
+++ b/gdb/testsuite/gdb.base/foll-fork.exp
@@ -15,10 +15,7 @@
 
 # Test relies on checking follow-fork output. Do not run if gdb debug is
 # enabled as it will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
index 1b0ff149b31..33ac172c53b 100644
--- a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
+++ b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
@@ -24,10 +24,7 @@ require !use_gdb_stub
 
 # Test relies on checking follow-fork output. Do not run if gdb debug is
 # enabled as it will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/gdb-sigterm.exp b/gdb/testsuite/gdb.base/gdb-sigterm.exp
index d2392394aaf..e9dc5f2ea27 100644
--- a/gdb/testsuite/gdb.base/gdb-sigterm.exp
+++ b/gdb/testsuite/gdb.base/gdb-sigterm.exp
@@ -17,10 +17,7 @@
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp
index b4f0d1b6eef..46d76b0e239 100644
--- a/gdb/testsuite/gdb.base/gdbinit-history.exp
+++ b/gdb/testsuite/gdb.base/gdbinit-history.exp
@@ -22,10 +22,7 @@
 # local machine.
 
 # Do not run if gdb debug is enabled - it interferes with the command history.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 if { [is_remote host] } {
     unsupported "can't set environment variables on remote host"
diff --git a/gdb/testsuite/gdb.base/osabi.exp b/gdb/testsuite/gdb.base/osabi.exp
index e9f761902b5..a412d932f7d 100644
--- a/gdb/testsuite/gdb.base/osabi.exp
+++ b/gdb/testsuite/gdb.base/osabi.exp
@@ -17,10 +17,7 @@
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 # Test that choosing "set osabi none" really requests a gdbarch with no osabi.
 
diff --git a/gdb/testsuite/gdb.base/page-logging.exp b/gdb/testsuite/gdb.base/page-logging.exp
index a45c5d5c902..ec54ba12c65 100644
--- a/gdb/testsuite/gdb.base/page-logging.exp
+++ b/gdb/testsuite/gdb.base/page-logging.exp
@@ -14,10 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Do not run if gdb debug is enabled as it will interfere with log redirect.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp b/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
index 1bf2e139326..85976c211dd 100644
--- a/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
+++ b/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
@@ -33,10 +33,7 @@
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/style-logging.exp b/gdb/testsuite/gdb.base/style-logging.exp
index 75b07086d36..dcf13575a17 100644
--- a/gdb/testsuite/gdb.base/style-logging.exp
+++ b/gdb/testsuite/gdb.base/style-logging.exp
@@ -16,10 +16,7 @@
 # Test that logging does not style.
 
 # Do not run if gdb debug is enabled as it will interfere with log redirect.
-if {[gdb_debug_enabled]} {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 if {[is_remote host]} {
     untested "does not work on remote host"
diff --git a/gdb/testsuite/gdb.base/ui-redirect.exp b/gdb/testsuite/gdb.base/ui-redirect.exp
index 2c9fc1aec77..c0ba4f11809 100644
--- a/gdb/testsuite/gdb.base/ui-redirect.exp
+++ b/gdb/testsuite/gdb.base/ui-redirect.exp
@@ -14,10 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Do not run if gdb debug is enabled as it will interfere with log redirect.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 if { [prepare_for_testing "failed to prepare" ui-redirect start.c] } {
     return -1
diff --git a/gdb/testsuite/gdb.fortran/debug-expr.exp b/gdb/testsuite/gdb.fortran/debug-expr.exp
index 75324ac4607..2a45214d89f 100644
--- a/gdb/testsuite/gdb.fortran/debug-expr.exp
+++ b/gdb/testsuite/gdb.fortran/debug-expr.exp
@@ -19,10 +19,7 @@ require !skip_fortran_tests
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/unittest.exp
index c8a68469767..ff532856e40 100644
--- a/gdb/testsuite/gdb.gdb/unittest.exp
+++ b/gdb/testsuite/gdb.gdb/unittest.exp
@@ -15,10 +15,7 @@
 
 # Do not run if gdb debug is enabled as maintenance output will be
 # redirected to the log files.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 load_lib completion-support.exp
 
diff --git a/gdb/testsuite/gdb.mi/new-ui-mi-sync.exp b/gdb/testsuite/gdb.mi/new-ui-mi-sync.exp
index e9a85394130..07b316c8ce9 100644
--- a/gdb/testsuite/gdb.mi/new-ui-mi-sync.exp
+++ b/gdb/testsuite/gdb.mi/new-ui-mi-sync.exp
@@ -21,10 +21,7 @@
 # stops again.  See PR gdb/20418.
 
 # Do not run if gdb debug is enabled as it doesn't work for separate-mi-tty.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 load_lib mi-support.exp
 
diff --git a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
index 55dab46fba8..91ca9b16bf8 100644
--- a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
+++ b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
@@ -30,10 +30,7 @@
 #   are using all-stop, or running, if we are using non-stop.
 
 # Do not run if gdb debug is enabled as it doesn't work for separate-mi-tty.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 load_lib mi-support.exp
 
diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/check-libthread-db.exp
index c93706e3818..2324b7f27e6 100644
--- a/gdb/testsuite/gdb.threads/check-libthread-db.exp
+++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp
@@ -20,10 +20,7 @@ if {[target_info gdb_protocol] != "" || ![istarget *-linux*]} {
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
index 0bb26f36cbb..65ecdcd5e33 100644
--- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
@@ -20,9 +20,7 @@
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    return
-}
+require !gdb_debug_enabled
 
 standard_testfile
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
index 113e0f737ee..bccc319b6f5 100644
--- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp
+++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
@@ -15,10 +15,7 @@
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-if [gdb_debug_enabled] {
-    untested "debug is enabled"
-    return 0
-}
+require !gdb_debug_enabled
 
 standard_testfile
 set executable ${testfile}
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 39/79] Use require gdb_skip_xml_test
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (37 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 38/79] Use require gdb_debug_enabled Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 40/79] Use require gdb_trace_common_supports_arch Tom Tromey
                   ` (41 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require gdb_skip_xml_test".
---
 gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp              | 5 +----
 gdb/testsuite/gdb.base/info-os.exp                    | 5 +----
 gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 5 +----
 gdb/testsuite/gdb.mi/mi-info-os.exp                   | 5 +----
 gdb/testsuite/gdb.xml/maint-xml-dump.exp              | 5 +----
 gdb/testsuite/gdb.xml/maint_print_struct.exp          | 5 +----
 gdb/testsuite/gdb.xml/tdesc-arch.exp                  | 5 +----
 gdb/testsuite/gdb.xml/tdesc-errors.exp                | 5 +----
 gdb/testsuite/gdb.xml/tdesc-regs.exp                  | 5 +----
 gdb/testsuite/gdb.xml/tdesc-reload.exp                | 5 +----
 gdb/testsuite/gdb.xml/tdesc-xinclude.exp              | 5 +----
 11 files changed, 11 insertions(+), 44 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp b/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp
index 42c94d97c46..6819c302187 100644
--- a/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp
+++ b/gdb/testsuite/gdb.arch/arc-tdesc-cpu.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 {[gdb_skip_xml_test]} {
-    unsupported "arc-tdesc-cpu.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index 81db8a15608..58f7126678e 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -22,10 +22,7 @@ if {![istarget *-*-linux*]} {
 }
 
 # Support for XML-output is needed to run this test.
-if {[gdb_skip_xml_test]} {
-    unsupported "info-os.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 # Compile test program.
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] } {
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index 646d74ed0a6..1a77b96f2f8 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -21,10 +21,7 @@ set MIFLAGS "-i=mi"
 standard_testfile
 
 # Support for XML is needed to run this test.
-if {[gdb_skip_xml_test]} {
-    unsupported "list-thread-groups-available.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.mi/mi-info-os.exp b/gdb/testsuite/gdb.mi/mi-info-os.exp
index dc70c4cd1f6..7e7db550af7 100644
--- a/gdb/testsuite/gdb.mi/mi-info-os.exp
+++ b/gdb/testsuite/gdb.mi/mi-info-os.exp
@@ -23,10 +23,7 @@ if {![istarget *-*-linux*]} {
 }
 
 # Support for XML-output is needed to run this test.
-if {[gdb_skip_xml_test]} {
-    unsupported "mi-info-os.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.xml/maint-xml-dump.exp b/gdb/testsuite/gdb.xml/maint-xml-dump.exp
index 69b21646832..0bf785537b1 100644
--- a/gdb/testsuite/gdb.xml/maint-xml-dump.exp
+++ b/gdb/testsuite/gdb.xml/maint-xml-dump.exp
@@ -37,10 +37,7 @@
 #
 # 4. Indentation of lines will be preserved so your input file needs
 #    to follow the expected indentation.
-if {[gdb_skip_xml_test]} {
-    unsupported "xml tests not being run"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/maint_print_struct.exp b/gdb/testsuite/gdb.xml/maint_print_struct.exp
index 3260fbc2c1a..f4d32d6623e 100644
--- a/gdb/testsuite/gdb.xml/maint_print_struct.exp
+++ b/gdb/testsuite/gdb.xml/maint_print_struct.exp
@@ -17,10 +17,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 {[gdb_skip_xml_test]} {
-    unsupported "maint_print_struct.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/tdesc-arch.exp
index 023f9c44ec5..9825320b024 100644
--- a/gdb/testsuite/gdb.xml/tdesc-arch.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-arch.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 {[gdb_skip_xml_test]} {
-    unsupported "tdesc-arch.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-errors.exp b/gdb/testsuite/gdb.xml/tdesc-errors.exp
index 5454d26b851..b3243064e9c 100644
--- a/gdb/testsuite/gdb.xml/tdesc-errors.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-errors.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 {[gdb_skip_xml_test]} {
-    unsupported "tdesc-errors.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 902671ebeba..13fafa1477e 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.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 {[gdb_skip_xml_test]} {
-    unsupported "tdesc-regs.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp
index b8cf39030d2..997b1f4e0ad 100644
--- a/gdb/testsuite/gdb.xml/tdesc-reload.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp
@@ -16,10 +16,7 @@
 # Testing for 'maint print xml-tdesc'.  Check we can print out the
 # current target description and load it back in again.
 
-if {[gdb_skip_xml_test]} {
-    unsupported "xml tests not being run"
-    return -1
-}
+require !gdb_skip_xml_test
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-xinclude.exp b/gdb/testsuite/gdb.xml/tdesc-xinclude.exp
index 361039f1389..3a757126799 100644
--- a/gdb/testsuite/gdb.xml/tdesc-xinclude.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-xinclude.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 {[gdb_skip_xml_test]} {
-    unsupported "tdesc-errors.exp"
-    return -1
-}
+require !gdb_skip_xml_test
 
 gdb_start
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 40/79] Use require gdb_trace_common_supports_arch
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (38 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 39/79] Use require gdb_skip_xml_test Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 41/79] Use require skip_perf_tests Tom Tromey
                   ` (40 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require gdb_trace_common_supports_arch".
---
 gdb/testsuite/gdb.trace/actions-changed.exp          | 5 +----
 gdb/testsuite/gdb.trace/actions.exp                  | 5 +----
 gdb/testsuite/gdb.trace/ax.exp                       | 5 +----
 gdb/testsuite/gdb.trace/backtrace.exp                | 5 +----
 gdb/testsuite/gdb.trace/change-loc.exp               | 5 +----
 gdb/testsuite/gdb.trace/deltrace.exp                 | 5 +----
 gdb/testsuite/gdb.trace/ftrace-lock.exp              | 5 +----
 gdb/testsuite/gdb.trace/ftrace.exp                   | 5 +----
 gdb/testsuite/gdb.trace/infotrace.exp                | 5 +----
 gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp | 5 +----
 gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp    | 5 +----
 gdb/testsuite/gdb.trace/mi-tsv-changed.exp           | 5 +----
 gdb/testsuite/gdb.trace/packetlen.exp                | 5 +----
 gdb/testsuite/gdb.trace/passc-dyn.exp                | 5 +----
 gdb/testsuite/gdb.trace/passcount.exp                | 5 +----
 gdb/testsuite/gdb.trace/pending.exp                  | 5 +----
 gdb/testsuite/gdb.trace/report.exp                   | 5 +----
 gdb/testsuite/gdb.trace/save-trace.exp               | 5 +----
 gdb/testsuite/gdb.trace/tfind.exp                    | 5 +----
 gdb/testsuite/gdb.trace/trace-break.exp              | 5 +----
 gdb/testsuite/gdb.trace/trace-condition.exp          | 5 +----
 gdb/testsuite/gdb.trace/trace-enable-disable.exp     | 5 +----
 gdb/testsuite/gdb.trace/trace-mt.exp                 | 5 +----
 gdb/testsuite/gdb.trace/tracecmd.exp                 | 5 +----
 gdb/testsuite/gdb.trace/tstatus.exp                  | 5 +----
 gdb/testsuite/gdb.trace/tsv.exp                      | 5 +----
 gdb/testsuite/gdb.trace/while-dyn.exp                | 5 +----
 gdb/testsuite/gdb.trace/while-stepping.exp           | 5 +----
 28 files changed, 28 insertions(+), 112 deletions(-)

diff --git a/gdb/testsuite/gdb.trace/actions-changed.exp b/gdb/testsuite/gdb.trace/actions-changed.exp
index 40563d91989..0c1542f82c8 100644
--- a/gdb/testsuite/gdb.trace/actions-changed.exp
+++ b/gdb/testsuite/gdb.trace/actions-changed.exp
@@ -17,10 +17,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.trace/actions.exp b/gdb/testsuite/gdb.trace/actions.exp
index e2254e8f48d..cf7efbbd4fd 100644
--- a/gdb/testsuite/gdb.trace/actions.exp
+++ b/gdb/testsuite/gdb.trace/actions.exp
@@ -22,10 +22,7 @@ gdb_exit
 gdb_start
 
 standard_testfile
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/ax.exp b/gdb/testsuite/gdb.trace/ax.exp
index 2c9d3db787c..9dee743c8dd 100644
--- a/gdb/testsuite/gdb.trace/ax.exp
+++ b/gdb/testsuite/gdb.trace/ax.exp
@@ -25,10 +25,7 @@ gdb_exit
 gdb_start
 standard_testfile actions.c
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp
index 08445b13bef..5462267f700 100644
--- a/gdb/testsuite/gdb.trace/backtrace.exp
+++ b/gdb/testsuite/gdb.trace/backtrace.exp
@@ -21,10 +21,7 @@ standard_testfile actions.c
 set executable $testfile
 set expfile $testfile.exp
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug nowarnings nopie]] {
diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp
index 75d381db3e9..2bab45da37e 100644
--- a/gdb/testsuite/gdb.trace/change-loc.exp
+++ b/gdb/testsuite/gdb.trace/change-loc.exp
@@ -16,10 +16,7 @@ load_lib "trace-support.exp"
 
 require !skip_shlib_tests
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 standard_testfile
 set libfile1 "change-loc-1"
diff --git a/gdb/testsuite/gdb.trace/deltrace.exp b/gdb/testsuite/gdb.trace/deltrace.exp
index 876a90fc1c2..cfcb81e8c91 100644
--- a/gdb/testsuite/gdb.trace/deltrace.exp
+++ b/gdb/testsuite/gdb.trace/deltrace.exp
@@ -23,10 +23,7 @@ gdb_start
 
 standard_testfile actions.c
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
diff --git a/gdb/testsuite/gdb.trace/ftrace-lock.exp b/gdb/testsuite/gdb.trace/ftrace-lock.exp
index e5e8638b306..92374c9fdc7 100644
--- a/gdb/testsuite/gdb.trace/ftrace-lock.exp
+++ b/gdb/testsuite/gdb.trace/ftrace-lock.exp
@@ -31,10 +31,7 @@ set options [list debug [gdb_target_symbol_prefix_flags] \
 	     additional_flags=-DNUM_THREADS=$NUM_THREADS]
 
 # Check that the target supports trace.
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
     untested "failed to compile"
     return -1
diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
index bab97cbe605..7d7d684f8af 100644
--- a/gdb/testsuite/gdb.trace/ftrace.exp
+++ b/gdb/testsuite/gdb.trace/ftrace.exp
@@ -23,10 +23,7 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug $additional_flags]] {
diff --git a/gdb/testsuite/gdb.trace/infotrace.exp b/gdb/testsuite/gdb.trace/infotrace.exp
index 3b779ba90c7..1252b30c0f5 100644
--- a/gdb/testsuite/gdb.trace/infotrace.exp
+++ b/gdb/testsuite/gdb.trace/infotrace.exp
@@ -23,10 +23,7 @@ gdb_start
 
 standard_testfile actions.c
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
diff --git a/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp b/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp
index ab66b3ead23..f87a6cf5dde 100644
--- a/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp
+++ b/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp
@@ -17,10 +17,7 @@ load_lib trace-support.exp
 
 standard_testfile actions.c
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] } {
     return -1
diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
index 1ea8e728fb9..f6b12b59eba 100644
--- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
+++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
@@ -16,10 +16,7 @@
 load_lib trace-support.exp
 
 require !skip_shlib_tests
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 standard_testfile pending.c
 set libfile1 "pendshr1"
diff --git a/gdb/testsuite/gdb.trace/mi-tsv-changed.exp b/gdb/testsuite/gdb.trace/mi-tsv-changed.exp
index 2deb9885f9c..57bedd686f6 100644
--- a/gdb/testsuite/gdb.trace/mi-tsv-changed.exp
+++ b/gdb/testsuite/gdb.trace/mi-tsv-changed.exp
@@ -18,10 +18,7 @@ load_lib mi-support.exp
 
 standard_testfile actions.c
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
diff --git a/gdb/testsuite/gdb.trace/packetlen.exp b/gdb/testsuite/gdb.trace/packetlen.exp
index f4e0005b047..31686bcb3bb 100644
--- a/gdb/testsuite/gdb.trace/packetlen.exp
+++ b/gdb/testsuite/gdb.trace/packetlen.exp
@@ -22,10 +22,7 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/passc-dyn.exp b/gdb/testsuite/gdb.trace/passc-dyn.exp
index 78c5f070803..c005c79053b 100644
--- a/gdb/testsuite/gdb.trace/passc-dyn.exp
+++ b/gdb/testsuite/gdb.trace/passc-dyn.exp
@@ -21,10 +21,7 @@ load_lib "trace-support.exp"
 gdb_exit
 gdb_start
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/passcount.exp b/gdb/testsuite/gdb.trace/passcount.exp
index 5aa8f48baee..3f711496083 100644
--- a/gdb/testsuite/gdb.trace/passcount.exp
+++ b/gdb/testsuite/gdb.trace/passcount.exp
@@ -21,10 +21,7 @@ load_lib "trace-support.exp"
 gdb_exit
 gdb_start
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index deaaeef1926..8778c1f9bcf 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -16,10 +16,7 @@ load_lib "trace-support.exp"
 
 require !skip_shlib_tests
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 standard_testfile
 set libfile1 "pendshr1"
diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp
index 76b74a97891..33bccaa1a6a 100644
--- a/gdb/testsuite/gdb.trace/report.exp
+++ b/gdb/testsuite/gdb.trace/report.exp
@@ -22,10 +22,7 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings nopie}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/save-trace.exp b/gdb/testsuite/gdb.trace/save-trace.exp
index 76c208cd59e..71a094a25dc 100644
--- a/gdb/testsuite/gdb.trace/save-trace.exp
+++ b/gdb/testsuite/gdb.trace/save-trace.exp
@@ -22,10 +22,7 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp
index fc04a0560c2..4579e85ed86 100644
--- a/gdb/testsuite/gdb.trace/tfind.exp
+++ b/gdb/testsuite/gdb.trace/tfind.exp
@@ -23,10 +23,7 @@ gdb_start
 
 standard_testfile actions.c
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
 	  executable {debug nowarnings nopie}] != "" } {
diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp
index 3630aae9d69..6e5415cbe35 100644
--- a/gdb/testsuite/gdb.trace/trace-break.exp
+++ b/gdb/testsuite/gdb.trace/trace-break.exp
@@ -21,10 +21,7 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug $additional_flags]] {
diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
index d6f7fc0302a..d49b792143e 100644
--- a/gdb/testsuite/gdb.trace/trace-condition.exp
+++ b/gdb/testsuite/gdb.trace/trace-condition.exp
@@ -23,10 +23,7 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug $additional_flags]] {
diff --git a/gdb/testsuite/gdb.trace/trace-enable-disable.exp b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
index e42f6f75225..76b5b9a4d74 100644
--- a/gdb/testsuite/gdb.trace/trace-enable-disable.exp
+++ b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
@@ -24,10 +24,7 @@ set expfile $testfile.exp
 set options [list debug [gdb_target_symbol_prefix_flags]]
 
 # Check that the target supports trace.
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
     untested "failed to compile"
     return -1
diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp
index e57cad8090c..0fc2f0069c2 100644
--- a/gdb/testsuite/gdb.trace/trace-mt.exp
+++ b/gdb/testsuite/gdb.trace/trace-mt.exp
@@ -21,10 +21,7 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile \
 	  executable [list debug $additional_flags] ] != "" } {
diff --git a/gdb/testsuite/gdb.trace/tracecmd.exp b/gdb/testsuite/gdb.trace/tracecmd.exp
index f94b14e348c..7ce6f59e2c9 100644
--- a/gdb/testsuite/gdb.trace/tracecmd.exp
+++ b/gdb/testsuite/gdb.trace/tracecmd.exp
@@ -21,10 +21,7 @@ load_lib "trace-support.exp"
 gdb_exit
 gdb_start
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp
index 8b55a7492f7..a847a036941 100644
--- a/gdb/testsuite/gdb.trace/tstatus.exp
+++ b/gdb/testsuite/gdb.trace/tstatus.exp
@@ -18,10 +18,7 @@ standard_testfile actions.c
 set executable $testfile
 set expfile tstatus.exp
 
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug]] {
diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp
index a104c1b5498..ea7ad55143a 100644
--- a/gdb/testsuite/gdb.trace/tsv.exp
+++ b/gdb/testsuite/gdb.trace/tsv.exp
@@ -19,10 +19,7 @@ load_lib "trace-support.exp"
 gdb_exit
 gdb_start
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/while-dyn.exp b/gdb/testsuite/gdb.trace/while-dyn.exp
index e8583156807..960a95926b7 100644
--- a/gdb/testsuite/gdb.trace/while-dyn.exp
+++ b/gdb/testsuite/gdb.trace/while-dyn.exp
@@ -23,10 +23,7 @@ gdb_start
 
 standard_testfile actions.c
 set executable $testfile
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.trace/while-stepping.exp b/gdb/testsuite/gdb.trace/while-stepping.exp
index 583bba15d2c..64c0c9ed84f 100644
--- a/gdb/testsuite/gdb.trace/while-stepping.exp
+++ b/gdb/testsuite/gdb.trace/while-stepping.exp
@@ -22,10 +22,7 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
-if ![gdb_trace_common_supports_arch] {
-    unsupported "no trace-common.h support for arch"
-    return -1
-}
+require gdb_trace_common_supports_arch
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
 	  executable {debug nowarnings}] != "" } {
     untested "failed to compile"
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 41/79] Use require skip_perf_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (39 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 40/79] Use require gdb_trace_common_supports_arch Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 42/79] Use require skip_opencl_tests Tom Tromey
                   ` (39 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_perf_tests".
---
 gdb/testsuite/gdb.perf/backtrace.exp                   | 4 +---
 gdb/testsuite/gdb.perf/disassemble.exp                 | 4 +---
 gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp       | 4 +---
 gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp | 4 +---
 gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp        | 4 +---
 gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp      | 4 +---
 gdb/testsuite/gdb.perf/gmonster1-runto-main.exp        | 4 +---
 gdb/testsuite/gdb.perf/gmonster1-select-file.exp       | 4 +---
 gdb/testsuite/gdb.perf/gmonster1.exp                   | 4 +---
 gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp       | 4 +---
 gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp | 4 +---
 gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp        | 4 +---
 gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp      | 4 +---
 gdb/testsuite/gdb.perf/gmonster2-runto-main.exp        | 4 +---
 gdb/testsuite/gdb.perf/gmonster2-select-file.exp       | 4 +---
 gdb/testsuite/gdb.perf/gmonster2.exp                   | 4 +---
 gdb/testsuite/gdb.perf/single-step.exp                 | 4 +---
 gdb/testsuite/gdb.perf/skip-command.exp                | 4 +---
 gdb/testsuite/gdb.perf/skip-prologue.exp               | 4 +---
 gdb/testsuite/gdb.perf/solib.exp                       | 4 +---
 gdb/testsuite/gdb.perf/template-breakpoints.exp        | 4 +---
 21 files changed, 21 insertions(+), 63 deletions(-)

diff --git a/gdb/testsuite/gdb.perf/backtrace.exp b/gdb/testsuite/gdb.perf/backtrace.exp
index 0602beca648..d8b046b5cd1 100644
--- a/gdb/testsuite/gdb.perf/backtrace.exp
+++ b/gdb/testsuite/gdb.perf/backtrace.exp
@@ -21,9 +21,7 @@
 
 load_lib perftest.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/disassemble.exp b/gdb/testsuite/gdb.perf/disassemble.exp
index 1886028d32b..ee33dcf0481 100644
--- a/gdb/testsuite/gdb.perf/disassemble.exp
+++ b/gdb/testsuite/gdb.perf/disassemble.exp
@@ -17,9 +17,7 @@
 # some large functions in GDB.
 load_lib perftest.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 global GDB
 
diff --git a/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp b/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp
index b3b3948fa42..1c17cd7f450 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp
@@ -19,8 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-null-lookup.py NullLookup
diff --git a/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp b/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp
index 7f7ca513298..ae175f3a1ef 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp
@@ -21,8 +21,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-pervasive-typedef.py PervasiveTypedef
diff --git a/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp b/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp
index e5fbe93f4cd..54f7f00b42b 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp
@@ -19,8 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-print-cerr.py PrintCerr
diff --git a/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp b/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp
index a9217625754..f37cead361f 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp
@@ -19,8 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-ptype-string.py GmonsterPtypeString
diff --git a/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp b/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp
index f416af13d24..8b4311ed43d 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp
@@ -19,8 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-runto-main.py GmonsterRuntoMain
diff --git a/gdb/testsuite/gdb.perf/gmonster1-select-file.exp b/gdb/testsuite/gdb.perf/gmonster1-select-file.exp
index e89e76c1a81..71b3d61b772 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-select-file.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-select-file.exp
@@ -19,8 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-select-file.py GmonsterSelectFile
diff --git a/gdb/testsuite/gdb.perf/gmonster1.exp b/gdb/testsuite/gdb.perf/gmonster1.exp
index e918d9cd9de..900452501eb 100644
--- a/gdb/testsuite/gdb.perf/gmonster1.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1.exp
@@ -36,9 +36,7 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 if ![info exists MONSTER] {
     set MONSTER "n"
diff --git a/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp b/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp
index e8d1631b422..353e6f12202 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp
@@ -20,8 +20,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-null-lookup.py NullLookup
diff --git a/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp b/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp
index 63eecc461aa..e37c1a4b2f6 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp
@@ -21,8 +21,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-pervasive-typedef.py PervasiveTypedef
diff --git a/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp b/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp
index 375f5b472e3..ccb9e733fb4 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp
@@ -19,8 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-print-cerr.py PrintCerr
diff --git a/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp b/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp
index 5ab0dfc6dd3..a21fa349b7a 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp
@@ -20,8 +20,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-ptype-string.py GmonsterPtypeString
diff --git a/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp b/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp
index 641e185ec09..05e2ec37dca 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp
@@ -19,8 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-runto-main.py GmonsterRuntoMain
diff --git a/gdb/testsuite/gdb.perf/gmonster2-select-file.exp b/gdb/testsuite/gdb.perf/gmonster2-select-file.exp
index 2aabfde0340..869f048e091 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-select-file.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-select-file.exp
@@ -20,8 +20,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-select-file.py GmonsterSelectFile
diff --git a/gdb/testsuite/gdb.perf/gmonster2.exp b/gdb/testsuite/gdb.perf/gmonster2.exp
index 618b5ce6116..bb0b76994b9 100644
--- a/gdb/testsuite/gdb.perf/gmonster2.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2.exp
@@ -36,9 +36,7 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 if ![info exists MONSTER] {
     set MONSTER "n"
diff --git a/gdb/testsuite/gdb.perf/single-step.exp b/gdb/testsuite/gdb.perf/single-step.exp
index 64d1a907fc8..b46f838ea8c 100644
--- a/gdb/testsuite/gdb.perf/single-step.exp
+++ b/gdb/testsuite/gdb.perf/single-step.exp
@@ -19,9 +19,7 @@
 
 load_lib perftest.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/skip-command.exp b/gdb/testsuite/gdb.perf/skip-command.exp
index 07498ecd687..c0019331cac 100644
--- a/gdb/testsuite/gdb.perf/skip-command.exp
+++ b/gdb/testsuite/gdb.perf/skip-command.exp
@@ -25,9 +25,7 @@
 
 load_lib perftest.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 standard_testfile .cc skip-funcs.cc
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/skip-prologue.exp b/gdb/testsuite/gdb.perf/skip-prologue.exp
index 49356ec81a5..aaa0bbfe6ff 100644
--- a/gdb/testsuite/gdb.perf/skip-prologue.exp
+++ b/gdb/testsuite/gdb.perf/skip-prologue.exp
@@ -21,9 +21,7 @@
 
 load_lib perftest.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/solib.exp b/gdb/testsuite/gdb.perf/solib.exp
index 5ebc08be763..95d014090f8 100644
--- a/gdb/testsuite/gdb.perf/solib.exp
+++ b/gdb/testsuite/gdb.perf/solib.exp
@@ -24,9 +24,7 @@
 
 load_lib perftest.exp
 
-if [skip_perf_tests] {
-    return 0
-}
+require !skip_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/template-breakpoints.exp b/gdb/testsuite/gdb.perf/template-breakpoints.exp
index f3aa124d3be..fae5c24681c 100644
--- a/gdb/testsuite/gdb.perf/template-breakpoints.exp
+++ b/gdb/testsuite/gdb.perf/template-breakpoints.exp
@@ -21,9 +21,7 @@
 
 load_lib perftest.exp
 
-if [skip_perf_tests] {
-	return 0
-}
+require !skip_perf_tests
 
 standard_testfile .cc
 set executable $testfile
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 42/79] Use require skip_opencl_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (40 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 41/79] Use require skip_perf_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 43/79] Use require target_can_use_run_cmd Tom Tromey
                   ` (38 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_opencl_tests".
---
 gdb/testsuite/gdb.opencl/callfuncs.exp   | 5 +----
 gdb/testsuite/gdb.opencl/convs_casts.exp | 5 +----
 gdb/testsuite/gdb.opencl/datatypes.exp   | 5 +----
 gdb/testsuite/gdb.opencl/operators.exp   | 5 +----
 gdb/testsuite/gdb.opencl/vec_comps.exp   | 5 +----
 5 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/gdb/testsuite/gdb.opencl/callfuncs.exp b/gdb/testsuite/gdb.opencl/callfuncs.exp
index f5bd28f66a0..98b34ab08cd 100644
--- a/gdb/testsuite/gdb.opencl/callfuncs.exp
+++ b/gdb/testsuite/gdb.opencl/callfuncs.exp
@@ -19,10 +19,7 @@
 
 load_lib opencl.exp
 
-if { [skip_opencl_tests] } {
-    unsupported "OpenCL support not detected"
-    return 0
-}
+require !skip_opencl_tests
 
 set testfile "callfuncs"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/convs_casts.exp b/gdb/testsuite/gdb.opencl/convs_casts.exp
index adfc2982613..9764d75fcb5 100644
--- a/gdb/testsuite/gdb.opencl/convs_casts.exp
+++ b/gdb/testsuite/gdb.opencl/convs_casts.exp
@@ -19,10 +19,7 @@
 
 load_lib opencl.exp
 
-if { [skip_opencl_tests] } {
-    unsupported "OpenCL support not detected"
-    return 0
-}
+require !skip_opencl_tests
 
 set testfile "convs_casts"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/datatypes.exp b/gdb/testsuite/gdb.opencl/datatypes.exp
index 07558537744..69d07e7b695 100644
--- a/gdb/testsuite/gdb.opencl/datatypes.exp
+++ b/gdb/testsuite/gdb.opencl/datatypes.exp
@@ -19,10 +19,7 @@
 
 load_lib opencl.exp
 
-if { [skip_opencl_tests] } {
-    unsupported "OpenCL support not detected"
-    return 0
-}
+require !skip_opencl_tests
 
 set testfile "datatypes"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/operators.exp b/gdb/testsuite/gdb.opencl/operators.exp
index fd1bf87482d..31a7ee87873 100644
--- a/gdb/testsuite/gdb.opencl/operators.exp
+++ b/gdb/testsuite/gdb.opencl/operators.exp
@@ -19,10 +19,7 @@
 
 load_lib opencl.exp
 
-if { [skip_opencl_tests] } {
-    unsupported "OpenCL support not detected"
-    return 0
-}
+require !skip_opencl_tests
 
 set testfile "operators"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/vec_comps.exp b/gdb/testsuite/gdb.opencl/vec_comps.exp
index 7eb2e8f92ae..1ea2bd9d7ec 100644
--- a/gdb/testsuite/gdb.opencl/vec_comps.exp
+++ b/gdb/testsuite/gdb.opencl/vec_comps.exp
@@ -19,10 +19,7 @@
 
 load_lib opencl.exp
 
-if { [skip_opencl_tests] } {
-    unsupported "OpenCL support not detected"
-    return 0
-}
+require !skip_opencl_tests
 
 set testfile "vec_comps"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 43/79] Use require target_can_use_run_cmd
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (41 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 42/79] Use require skip_opencl_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 44/79] Use require using_fission Tom Tromey
                   ` (37 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require target_can_use_run_cmd".
---
 gdb/testsuite/gdb.base/annota1.exp                    | 4 +---
 gdb/testsuite/gdb.base/annota3.exp                    | 4 +---
 gdb/testsuite/gdb.base/dprintf-execution-x-script.exp | 4 +---
 gdb/testsuite/gdb.cp/annota2.exp                      | 4 +---
 gdb/testsuite/gdb.cp/annota3.exp                      | 4 +---
 gdb/testsuite/gdb.multi/bkpt-multi-exec.exp           | 4 +---
 6 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 49cbd6856d6..96698642675 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -19,9 +19,7 @@
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n"
 
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
index 7aaf6df6dee..62efd1aff66 100644
--- a/gdb/testsuite/gdb.base/annota3.exp
+++ b/gdb/testsuite/gdb.base/annota3.exp
@@ -19,9 +19,7 @@
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 
 #
diff --git a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
index 5a343fc9ad4..5b410f32a1f 100644
--- a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
+++ b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
@@ -20,9 +20,7 @@
 # part of this test.
 
 # Bail out if the target can't use the 'run' command.
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 160d26903d8..5116355049f 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -32,9 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n"
 set frames_invalid "\r\n\032\032frames-invalid\r\n"
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index 5a5f3ff38a4..5d8c152d33d 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -32,9 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 #
 # line number where we need to stop in main
diff --git a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
index 30d049daa38..9ab1ef18559 100644
--- a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
+++ b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
@@ -13,9 +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 ![target_can_use_run_cmd] {
-    return
-}
+require target_can_use_run_cmd
 
 # Until "catch exec" is implemented on other targets...
 #
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 44/79] Use require using_fission
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (42 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 43/79] Use require target_can_use_run_cmd Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 45/79] Use require skip_debuginfod_tests Tom Tromey
                   ` (36 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require using_fission".
---
 gdb/testsuite/gdb.base/info-macros.exp        | 5 +----
 gdb/testsuite/gdb.linespec/macro-relative.exp | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.base/info-macros.exp b/gdb/testsuite/gdb.base/info-macros.exp
index 803e026ae3a..38eb35f1df8 100644
--- a/gdb/testsuite/gdb.base/info-macros.exp
+++ b/gdb/testsuite/gdb.base/info-macros.exp
@@ -16,10 +16,7 @@
 standard_testfile .c
 
 # Fission doesn't support macros yet.  Bug 15954.
-if [using_fission] {
-    untested "fission does not support macros yet"
-    return -1
-}
+require !using_fission
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug macros}] } {
     return -1
diff --git a/gdb/testsuite/gdb.linespec/macro-relative.exp b/gdb/testsuite/gdb.linespec/macro-relative.exp
index d0e2cdae1d8..41159431ddc 100644
--- a/gdb/testsuite/gdb.linespec/macro-relative.exp
+++ b/gdb/testsuite/gdb.linespec/macro-relative.exp
@@ -16,10 +16,7 @@
 standard_testfile
 
 # Fission doesn't support macros yet.  Bug 15954.
-if [using_fission] {
-    unsupported "fission"
-    return -1
-}
+require !using_fission
 
 if [is_remote host] {
     unsupported "compiling on a remote host does not support a filename with directory."
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 45/79] Use require skip_debuginfod_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (43 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 44/79] Use require using_fission Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 46/79] Use require gnat_runtime_has_debug_info Tom Tromey
                   ` (35 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require skip_debuginfod_tests".
---
 gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index bfe6e639e4f..e2c77eb109f 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -20,7 +20,7 @@ standard_testfile
 load_lib dwarf.exp
 load_lib debuginfod-support.exp
 
-if { [skip_debuginfod_tests] } { return -1 }
+require !skip_debuginfod_tests
 
 set sourcetmp [standard_output_file tmp-${srcfile}]
 set outputdir [standard_output_file {}]
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 46/79] Use require gnat_runtime_has_debug_info
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (44 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 45/79] Use require skip_debuginfod_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 47/79] Rewrite skip_python_tests Tom Tromey
                   ` (34 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes some tests to use "require gnat_runtime_has_debug_info".
---
 gdb/testsuite/gdb.ada/dynamic-iface.exp | 5 +----
 gdb/testsuite/gdb.ada/interface.exp     | 5 +----
 gdb/testsuite/gdb.ada/iwide.exp         | 5 +----
 gdb/testsuite/gdb.ada/mi_interface.exp  | 5 +----
 gdb/testsuite/gdb.ada/tagged.exp        | 5 +----
 gdb/testsuite/gdb.ada/tagged_access.exp | 5 +----
 6 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/dynamic-iface.exp b/gdb/testsuite/gdb.ada/dynamic-iface.exp
index 13e93966819..d4d7ba45ab4 100644
--- a/gdb/testsuite/gdb.ada/dynamic-iface.exp
+++ b/gdb/testsuite/gdb.ada/dynamic-iface.exp
@@ -17,10 +17,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if {![gnat_runtime_has_debug_info]} {
-    untested "GNAT runtime debuginfo required for this test"
-    return -1
-}
+require gnat_runtime_has_debug_info
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp
index c1b2bf87e15..93a0bd5e8b6 100644
--- a/gdb/testsuite/gdb.ada/interface.exp
+++ b/gdb/testsuite/gdb.ada/interface.exp
@@ -17,10 +17,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if {![gnat_runtime_has_debug_info]} {
-    untested "GNAT runtime debuginfo required for this test"
-    return -1
-}
+require gnat_runtime_has_debug_info
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp
index 89386c5a851..40c45d88117 100644
--- a/gdb/testsuite/gdb.ada/iwide.exp
+++ b/gdb/testsuite/gdb.ada/iwide.exp
@@ -17,10 +17,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if {![gnat_runtime_has_debug_info]} {
-    untested "GNAT runtime debuginfo required for this test"
-    return -1
-}
+require gnat_runtime_has_debug_info
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp
index 88829faf457..50e6df7851f 100644
--- a/gdb/testsuite/gdb.ada/mi_interface.exp
+++ b/gdb/testsuite/gdb.ada/mi_interface.exp
@@ -17,10 +17,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if {![gnat_runtime_has_debug_info]} {
-    untested "GNAT runtime debuginfo required for this test"
-    return -1
-}
+require gnat_runtime_has_debug_info
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp
index bbefa8d966d..319252922af 100644
--- a/gdb/testsuite/gdb.ada/tagged.exp
+++ b/gdb/testsuite/gdb.ada/tagged.exp
@@ -17,10 +17,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if {![gnat_runtime_has_debug_info]} {
-    untested "GNAT runtime debuginfo required for this test"
-    return -1
-}
+require gnat_runtime_has_debug_info
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp
index 17e5f6d971e..69eb6702b25 100644
--- a/gdb/testsuite/gdb.ada/tagged_access.exp
+++ b/gdb/testsuite/gdb.ada/tagged_access.exp
@@ -17,10 +17,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if {![gnat_runtime_has_debug_info]} {
-    untested "GNAT runtime debuginfo required for this test"
-    return -1
-}
+require gnat_runtime_has_debug_info
 
 standard_ada_testfile p
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 47/79] Rewrite skip_python_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (45 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 46/79] Use require gnat_runtime_has_debug_info Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 48/79] Remove mi_skip_python_tests Tom Tromey
                   ` (33 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This rewrites skip_python_tests to examine the output of
"gdb --configuration".  This is a bit nicer because it
does not require an already-running gdb.
---
 gdb/testsuite/lib/gdb.exp        | 24 +++---------------------
 gdb/testsuite/lib/mi-support.exp |  5 +----
 2 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3d416f902b8..64eef9701c2 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2449,28 +2449,10 @@ proc skip_rust_tests {} {
 }
 
 # Return a 1 for configurations that do not support Python scripting.
-# PROMPT_REGEXP is the expected prompt.
 
-proc skip_python_tests_prompt { prompt_regexp } {
-    gdb_test_multiple "python print ('test')" "verify python support" \
-	-prompt "$prompt_regexp" {
-	    -re "not supported.*$prompt_regexp" {
-		unsupported "Python support is disabled."
-		return 1
-	    }
-	    -re "$prompt_regexp" {}
-	}
-
-    return 0
-}
-
-# Return a 1 for configurations that do not support Python scripting.
-# Note: This also sets various globals that specify which version of Python
-# is in use.  See skip_python_tests_prompt.
-
-proc skip_python_tests {} {
-    global gdb_prompt
-    return [skip_python_tests_prompt "$gdb_prompt $"]
+gdb_caching_proc skip_python_tests {
+    set output [remote_exec host $::GDB --configuration]
+    return [expr {[string first "--with-python" $output] == -1}]
 }
 
 # Return a 1 if we should skip shared library tests.
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 1ee087d8127..f756cbe2d73 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -2735,12 +2735,9 @@ proc mi_make_breakpoint_table {bp_list} {
 }
 
 # Return a 1 for configurations that do not support Python scripting.
-# Note: This also sets various globals that specify which version of Python
-# is in use.  See skip_python_tests_prompt.
 
 proc mi_skip_python_tests {} {
-    global mi_gdb_prompt
-    return [skip_python_tests_prompt "$mi_gdb_prompt$"]
+    return [skip_python_tests]
 }
 
 # As skip_libstdcxx_probe_tests_prompt, with mi_gdb_prompt.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 48/79] Remove mi_skip_python_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (46 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 47/79] Rewrite skip_python_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 49/79] Fix latent bug in default_prompt_gdb_start Tom Tromey
                   ` (32 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

mi_skip_python_tests was necessary because skip_python_tests used the
running gdb, and so needed to know what prompt to expect.  Now that
skip_python_tests has been rewritten, mi_skip_python_tests is no
longer needed.
---
 gdb/testsuite/gdb.python/py-mi-events.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-mi-objfile.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp | 2 +-
 gdb/testsuite/lib/mi-support.exp                            | 6 ------
 4 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-mi-events.exp b/gdb/testsuite/gdb.python/py-mi-events.exp
index 48cead34752..d3ffb154d91 100644
--- a/gdb/testsuite/gdb.python/py-mi-events.exp
+++ b/gdb/testsuite/gdb.python/py-mi-events.exp
@@ -31,7 +31,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     return -1
 }
 
-if { [mi_skip_python_tests] } { return }
+if { [skip_python_tests] } { return }
 
 set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
 
diff --git a/gdb/testsuite/gdb.python/py-mi-objfile.exp b/gdb/testsuite/gdb.python/py-mi-objfile.exp
index 5dbb3b71f92..2aaf65d0b7c 100644
--- a/gdb/testsuite/gdb.python/py-mi-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-mi-objfile.exp
@@ -31,7 +31,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     return -1
 }
 
-if { [mi_skip_python_tests] } { return }
+if { [skip_python_tests] } { return }
 
 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
diff --git a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
index 9d9810f2077..77227b60e34 100644
--- a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
+++ b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
@@ -30,7 +30,7 @@ if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" }
 mi_clean_restart $binfile
 
 # Skip all tests if Python scripting is not enabled.
-if { [mi_skip_python_tests] } { continue }
+if { [skip_python_tests] } { continue }
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 mi_gdb_test "source ${pyfile}" \
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index f756cbe2d73..b6da2c4baf0 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -2734,12 +2734,6 @@ proc mi_make_breakpoint_table {bp_list} {
     return "BreakpointTable={nr_rows=\"$nr\",nr_cols=\"$nc\",$header,$body}"
 }
 
-# Return a 1 for configurations that do not support Python scripting.
-
-proc mi_skip_python_tests {} {
-    return [skip_python_tests]
-}
-
 # As skip_libstdcxx_probe_tests_prompt, with mi_gdb_prompt.
 
 proc mi_skip_libstdcxx_probe_tests {} {
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 49/79] Fix latent bug in default_prompt_gdb_start
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (47 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 48/79] Remove mi_skip_python_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 50/79] Use "require" for Python tests Tom Tromey
                   ` (31 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

default_prompt_gdb_start mimics default_gdb_start, but does not set
the use_gdb_stub global.  This caused one Python test to work only
because it used the ordinary gdb_start before later using
default_prompt_gdb_start.

This patch updates default_prompt_gdb_start to set this global as
well.
---
 gdb/testsuite/lib/prompt.exp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gdb/testsuite/lib/prompt.exp b/gdb/testsuite/lib/prompt.exp
index a7c34fae2ec..56cafa4dd93 100644
--- a/gdb/testsuite/lib/prompt.exp
+++ b/gdb/testsuite/lib/prompt.exp
@@ -24,6 +24,7 @@
 # uses pass if it sees $gdb_prompt, and fail if it sees $gdb_prompt_fail.
 #
 proc default_prompt_gdb_start { } {
+    global use_gdb_stub
     global GDB
     global INTERNAL_GDBFLAGS GDBFLAGS
     global gdb_prompt
@@ -31,7 +32,17 @@ proc default_prompt_gdb_start { } {
     global timeout
     global gdb_spawn_id
 
+    # Set the default value, it may be overriden later by specific testfile.
+    #
+    # Use `set_board_info use_gdb_stub' for the board file to flag the inferior
+    # is already started after connecting and run/attach are not supported.
+    # This is used for the "remote" protocol.  After GDB starts you should
+    # check global $use_gdb_stub instead of the board as the testfile may force
+    # a specific different target protocol itself.
+    set use_gdb_stub [target_info exists use_gdb_stub]
+
     verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
+    gdb_write_cmd_file "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
 
     if [info exists gdb_spawn_id] {
 	return 0
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 50/79] Use "require" for Python tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (48 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 49/79] Fix latent bug in default_prompt_gdb_start Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 51/79] Rename to allow_xml_test Tom Tromey
                   ` (30 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes various tests to use "require" for the Python feature.
---
 gdb/testsuite/gdb.ada/pp-rec-component.exp           |  5 +----
 gdb/testsuite/gdb.ada/py_range.exp                   |  5 +----
 gdb/testsuite/gdb.ada/py_taft.exp                    |  5 +----
 gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp |  5 ++---
 .../gdb.base/premature-dummy-frame-removal.exp       |  5 ++---
 gdb/testsuite/gdb.dwarf2/symtab-producer.exp         |  8 +-------
 gdb/testsuite/gdb.gdb/python-helper.exp              | 10 ++--------
 gdb/testsuite/gdb.python/compare-enum-type.exp       |  4 ++--
 gdb/testsuite/gdb.python/flexible-array-member.exp   |  5 ++---
 gdb/testsuite/gdb.python/lib-types.exp               |  5 ++---
 .../gdb.python/pretty-print-call-by-hand.exp         | 10 ++--------
 gdb/testsuite/gdb.python/py-arch-reg-groups.exp      |  4 +---
 gdb/testsuite/gdb.python/py-arch-reg-names.exp       |  4 +---
 gdb/testsuite/gdb.python/py-arch.exp                 |  4 +---
 gdb/testsuite/gdb.python/py-as-string.exp            |  4 ++--
 gdb/testsuite/gdb.python/py-auto-load-chaining.exp   |  5 ++---
 ...utoloaded-pretty-printers-in-newobjfile-event.exp | 10 ++++------
 gdb/testsuite/gdb.python/py-bad-printers.exp         |  5 ++---
 gdb/testsuite/gdb.python/py-block.exp                |  5 ++---
 gdb/testsuite/gdb.python/py-bp-locations.exp         |  4 ++--
 .../gdb.python/py-breakpoint-create-fail.exp         |  5 ++---
 gdb/testsuite/gdb.python/py-breakpoint.exp           |  5 ++---
 gdb/testsuite/gdb.python/py-caller-is.exp            |  5 ++---
 gdb/testsuite/gdb.python/py-charset.exp              |  5 ++---
 gdb/testsuite/gdb.python/py-cmd.exp                  |  5 ++---
 gdb/testsuite/gdb.python/py-completion.exp           |  5 ++---
 gdb/testsuite/gdb.python/py-connection-removed.exp   |  5 ++---
 gdb/testsuite/gdb.python/py-connection.exp           |  5 ++---
 gdb/testsuite/gdb.python/py-disasm.exp               |  5 ++---
 gdb/testsuite/gdb.python/py-doc-reformat.exp         |  4 ++--
 gdb/testsuite/gdb.python/py-error.exp                |  5 ++---
 gdb/testsuite/gdb.python/py-event-load.exp           |  4 +---
 gdb/testsuite/gdb.python/py-events.exp               |  4 +---
 gdb/testsuite/gdb.python/py-evsignal.exp             |  4 ++--
 gdb/testsuite/gdb.python/py-evthreads.exp            |  4 +---
 gdb/testsuite/gdb.python/py-explore-cc.exp           |  5 +----
 gdb/testsuite/gdb.python/py-explore.exp              |  5 ++---
 .../gdb.python/py-finish-breakpoint-deletion.exp     |  5 ++---
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp    |  4 +---
 gdb/testsuite/gdb.python/py-finish-breakpoint2.exp   |  5 ++---
 gdb/testsuite/gdb.python/py-format-address.exp       |  4 +---
 gdb/testsuite/gdb.python/py-format-string.exp        |  4 ++--
 gdb/testsuite/gdb.python/py-frame-args.exp           |  5 ++---
 gdb/testsuite/gdb.python/py-frame-inline.exp         |  5 ++---
 gdb/testsuite/gdb.python/py-frame.exp                |  5 ++---
 gdb/testsuite/gdb.python/py-framefilter-addr.exp     |  5 ++---
 .../gdb.python/py-framefilter-invalidarg.exp         |  5 ++---
 gdb/testsuite/gdb.python/py-framefilter.exp          |  8 ++------
 gdb/testsuite/gdb.python/py-function.exp             |  5 ++---
 gdb/testsuite/gdb.python/py-inferior-leak.exp        |  5 ++---
 gdb/testsuite/gdb.python/py-inferior.exp             |  5 ++---
 gdb/testsuite/gdb.python/py-infthread.exp            |  5 ++---
 gdb/testsuite/gdb.python/py-label-symbol-value.exp   |  4 +---
 gdb/testsuite/gdb.python/py-lazy-string.exp          |  5 ++---
 gdb/testsuite/gdb.python/py-linetable.exp            |  4 +---
 gdb/testsuite/gdb.python/py-lookup-type.exp          |  5 ++---
 gdb/testsuite/gdb.python/py-mi-events.exp            |  4 ++--
 gdb/testsuite/gdb.python/py-mi-objfile.exp           |  4 ++--
 .../gdb.python/py-mi-var-info-path-expression.exp    |  5 ++---
 gdb/testsuite/gdb.python/py-nested-maps.exp          |  9 +--------
 gdb/testsuite/gdb.python/py-objfile-script.exp       |  5 ++---
 gdb/testsuite/gdb.python/py-objfile.exp              |  5 ++---
 gdb/testsuite/gdb.python/py-parameter.exp            |  5 ++---
 gdb/testsuite/gdb.python/py-pending-frame-level.exp  |  5 ++---
 gdb/testsuite/gdb.python/py-pp-integral.exp          |  5 ++---
 gdb/testsuite/gdb.python/py-pp-maint.exp             |  5 ++---
 gdb/testsuite/gdb.python/py-pp-re-notag.exp          |  5 ++---
 gdb/testsuite/gdb.python/py-pp-registration.exp      |  5 ++---
 gdb/testsuite/gdb.python/py-prettyprint.exp          |  5 ++---
 gdb/testsuite/gdb.python/py-progspace.exp            |  5 ++---
 gdb/testsuite/gdb.python/py-prompt.exp               | 10 +---------
 gdb/testsuite/gdb.python/py-rbreak.exp               |  5 ++---
 .../gdb.python/py-record-btrace-threads.exp          | 12 ++----------
 gdb/testsuite/gdb.python/py-record-btrace.exp        |  9 +--------
 gdb/testsuite/gdb.python/py-record-full.exp          |  9 +--------
 gdb/testsuite/gdb.python/py-recurse-unwind.exp       |  5 ++---
 gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp  |  5 +----
 gdb/testsuite/gdb.python/py-section-script.exp       |  5 ++---
 gdb/testsuite/gdb.python/py-send-packet.exp          |  6 +-----
 gdb/testsuite/gdb.python/py-shared.exp               |  5 +----
 gdb/testsuite/gdb.python/py-startup-opt.exp          |  7 +------
 gdb/testsuite/gdb.python/py-strfns.exp               |  5 ++---
 gdb/testsuite/gdb.python/py-symbol.exp               |  5 ++---
 gdb/testsuite/gdb.python/py-symtab.exp               |  5 ++---
 gdb/testsuite/gdb.python/py-sync-interp.exp          | 12 +-----------
 gdb/testsuite/gdb.python/py-template.exp             |  5 +----
 gdb/testsuite/gdb.python/py-thrhandle.exp            |  5 ++---
 gdb/testsuite/gdb.python/py-typeprint.exp            |  4 +---
 gdb/testsuite/gdb.python/py-unwind-inline.exp        |  5 ++---
 gdb/testsuite/gdb.python/py-unwind-maint.exp         |  5 ++---
 gdb/testsuite/gdb.python/py-unwind-user-regs.exp     |  5 ++---
 gdb/testsuite/gdb.python/py-unwind.exp               |  5 ++---
 gdb/testsuite/gdb.python/py-value-cc.exp             |  5 +----
 gdb/testsuite/gdb.python/py-value.exp                |  5 ++---
 gdb/testsuite/gdb.python/py-xmethods.exp             |  8 +-------
 gdb/testsuite/gdb.python/tui-window-names.exp        |  7 ++-----
 gdb/testsuite/gdb.python/tui-window.exp              |  4 +---
 gdb/testsuite/gdb.rust/pp.exp                        |  4 +---
 gdb/testsuite/gdb.server/server-kill-python.exp      | 10 +---------
 gdb/testsuite/gdb.threads/tls.exp                    |  5 +----
 100 files changed, 170 insertions(+), 374 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp
index f5963fff799..b57bde330cf 100644
--- a/gdb/testsuite/gdb.ada/pp-rec-component.exp
+++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require !skip_ada_tests !skip_python_tests
 
 standard_ada_testfile foo
 
@@ -25,9 +25,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
 
 clean_restart ${testfile}
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set remote_python_file \
     [gdb_remote_download host ${srcdir}/${subdir}/${gdb_test_file_name}.py]
 gdb_test_no_output "source ${remote_python_file}" \
diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp
index d1a84b617fa..b2c91fb4e3c 100644
--- a/gdb/testsuite/gdb.ada/py_range.exp
+++ b/gdb/testsuite/gdb.ada/py_range.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require !skip_ada_tests
+require !skip_ada_tests !skip_python_tests
 
 standard_ada_testfile foo
 
@@ -26,9 +26,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
 
 clean_restart ${testfile}
 
-# Skip this testcase if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
 runto "foo.adb:$bp_location"
 
diff --git a/gdb/testsuite/gdb.ada/py_taft.exp b/gdb/testsuite/gdb.ada/py_taft.exp
index ea9e7b1db5c..543bc728e3c 100644
--- a/gdb/testsuite/gdb.ada/py_taft.exp
+++ b/gdb/testsuite/gdb.ada/py_taft.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require !skip_ada_tests
+require !skip_ada_tests !skip_python_tests
 
 standard_ada_testfile main
 
@@ -26,9 +26,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
 
 clean_restart ${testfile}
 
-# Skip this testcase if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set bp_location [gdb_get_line_number "STOP" ${testdir}/main.adb]
 runto "main.adb:$bp_location"
 
diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
index f525b1af33a..88e95d13ae2 100644
--- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
+++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
@@ -51,13 +51,12 @@
 
 standard_testfile
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return -1
 }
 
-# Skip this test if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
index e21ff2efab9..f5c55f58425 100644
--- a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
+++ b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
@@ -36,6 +36,8 @@
 
 standard_testfile .c
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
@@ -44,9 +46,6 @@ if {![runto_main]} {
     return 0
 }
 
-# Skip this test if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 gdb_test_no_output "source ${pyfile}" "load python file"
 
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index 50cb428dae5..545d76f1246 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -17,10 +17,7 @@ load_lib dwarf.exp
 load_lib gdb-python.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-# This test can also only be run when we have python support in gdb,
-# but that test can only be done after gdb has started, below.
+require dwarf2_support !skip_python_tests
 
 standard_testfile main.c -dw.S
 
@@ -87,9 +84,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 
 set GDBFLAGS $saved_gdbflags
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_py_test_silent_cmd "python with_producer = gdb.lookup_global_symbol(\"with_producer\")" \
     "get with_producer symbol" 0
 
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
index d6c316caf85..3c0e2e57304 100644
--- a/gdb/testsuite/gdb.gdb/python-helper.exp
+++ b/gdb/testsuite/gdb.gdb/python-helper.exp
@@ -24,6 +24,8 @@ if [target_info exists gdb,noinferiorio] {
     return
 }
 
+require !skip_python_tests
+
 standard_testfile .cc
 
 if { [build_executable "failed to build" $testfile $srcfile {debug c++}] } {
@@ -38,14 +40,6 @@ if { ![file readable $py_helper_script] \
     return
 }
 
-# Start GDB and check that we have python support.
-gdb_start
-if { [skip_python_tests] } {
-    untested "skipped gdb-gdb.py tests due to lack of python support"
-    return
-}
-gdb_exit
-
 # The main test.  This is called by the self-test framework once GDB
 # has been started on a copy of itself.
 proc test_python_helper {} {
diff --git a/gdb/testsuite/gdb.python/compare-enum-type.exp b/gdb/testsuite/gdb.python/compare-enum-type.exp
index 8d5d65e25f6..0cc6bd93daa 100644
--- a/gdb/testsuite/gdb.python/compare-enum-type.exp
+++ b/gdb/testsuite/gdb.python/compare-enum-type.exp
@@ -17,11 +17,11 @@
 
 standard_testfile -a.c -b.c
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" "compare-enum-type" \
 	  [list $srcfile $srcfile2]] } {
     return
 }
 
-if { [skip_python_tests] } { continue }
-
 gdb_test "py print(gdb.parse_and_eval('e1').type == gdb.parse_and_eval('e2').type)" "True"
diff --git a/gdb/testsuite/gdb.python/flexible-array-member.exp b/gdb/testsuite/gdb.python/flexible-array-member.exp
index bed3c972d94..23f1da067a5 100644
--- a/gdb/testsuite/gdb.python/flexible-array-member.exp
+++ b/gdb/testsuite/gdb.python/flexible-array-member.exp
@@ -17,14 +17,13 @@
 
 standard_testfile
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" \
 	${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if { ![runto break_here] } {
     untested "could not run to break_here"
     return
diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp
index bf3aff1e2e3..92359c941a6 100644
--- a/gdb/testsuite/gdb.python/lib-types.exp
+++ b/gdb/testsuite/gdb.python/lib-types.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile .cc
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
index f58044e273d..64414a3c23b 100644
--- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
+++ b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
@@ -19,15 +19,9 @@
 
 load_lib gdb-python.exp
 
-standard_testfile
-
-# gdb needs to be started here for skip_python_tests to work.
-# prepare_for_testing could be used instead, but it could compile the program
-# unnecessarily, so starting GDB like this is preferable.
-gdb_start
+require !skip_python_tests
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
+standard_testfile
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
index a4cafdccdc8..5a0077d020d 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
@@ -16,15 +16,13 @@
 # Check the gdb.Architecture.register_groups functionality.
 
 load_lib gdb-python.exp
+require !skip_python_tests
 standard_testfile py-arch.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-names.exp b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
index 67ceeff09b8..73e41401f51 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-names.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
@@ -16,15 +16,13 @@
 # Check the gdb.Architecture.registers functionality.
 
 load_lib gdb-python.exp
+require !skip_python_tests
 standard_testfile py-arch.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-arch.exp b/gdb/testsuite/gdb.python/py-arch.exp
index e9967ae0006..449613bc0fb 100644
--- a/gdb/testsuite/gdb.python/py-arch.exp
+++ b/gdb/testsuite/gdb.python/py-arch.exp
@@ -13,15 +13,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 load_lib gdb-python.exp
+require !skip_python_tests
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-as-string.exp b/gdb/testsuite/gdb.python/py-as-string.exp
index 9ae6f5d929a..8bf248a59ad 100644
--- a/gdb/testsuite/gdb.python/py-as-string.exp
+++ b/gdb/testsuite/gdb.python/py-as-string.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
@@ -28,8 +30,6 @@ if ![runto_main] {
     return 0
 }
 
-if { [skip_python_tests] } { continue }
-
 proc test_as_string { } {
     gdb_test "p \$_as_string(2)" "\"2\""
     gdb_test "p \$_as_string(enum_valid)" "\"ENUM_VALUE_B\""
diff --git a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
index 9b7b0b5c202..aac6eb305b9 100644
--- a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
+++ b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
@@ -19,6 +19,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile .c -f1.c -f2.c
 
 # Two additional object files needed for this test.
@@ -47,9 +49,6 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
index 97a0f24732b..a67ae48b316 100644
--- a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
+++ b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
@@ -19,6 +19,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile -main.cc
 
 set srcfile_lib "${testfile}-lib.cc"
@@ -27,12 +29,6 @@ set libname "lib${testfile}"
 set python_autoload_file "${srcdir}/${subdir}/${libname}.so-gdb.py"
 set binfile_lib [standard_output_file "${libname}.so"]
 
-# Start GDB first - needed for skip_python_tests.
-clean_restart
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # Compile library.
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} \
       {debug c++}] != "" } {
@@ -47,6 +43,8 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} \
     return -1
 }
 
+clean_restart
+
 # Make the -gdb.py script available to gdb, it is automatically loaded by
 # gdb if it is put in the same directory as the library.
 set remote_python_autoload_file \
diff --git a/gdb/testsuite/gdb.python/py-bad-printers.exp b/gdb/testsuite/gdb.python/py-bad-printers.exp
index 7249639dc7c..26e6a97916c 100644
--- a/gdb/testsuite/gdb.python/py-bad-printers.exp
+++ b/gdb/testsuite/gdb.python/py-bad-printers.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp
index bbf9eafa10b..90c3b4d0fb0 100644
--- a/gdb/testsuite/gdb.python/py-block.exp
+++ b/gdb/testsuite/gdb.python/py-block.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-bp-locations.exp b/gdb/testsuite/gdb.python/py-bp-locations.exp
index a3894436b2c..55aca67eb9d 100644
--- a/gdb/testsuite/gdb.python/py-bp-locations.exp
+++ b/gdb/testsuite/gdb.python/py-bp-locations.exp
@@ -15,6 +15,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
@@ -25,8 +27,6 @@ save_vars { GDBFLAGS } {
     clean_restart $testfile
 }
 
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
index ec9d553dc0e..6c1a262ad47 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 clean_restart "${testfile}"
 if ![runto_main] {
     return
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index 49c09795206..0995ae49ead 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -26,6 +26,8 @@ set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 set options {debug c++}
@@ -34,9 +36,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${options}]
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 proc_with_prefix test_bkpt_basic { } {
     global srcfile testfile hex decimal
 
diff --git a/gdb/testsuite/gdb.python/py-caller-is.exp b/gdb/testsuite/gdb.python/py-caller-is.exp
index d1bf56fda67..66e0ce516e4 100644
--- a/gdb/testsuite/gdb.python/py-caller-is.exp
+++ b/gdb/testsuite/gdb.python/py-caller-is.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
@@ -28,9 +30,6 @@ if ![runto_main] {
     return 0
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_breakpoint "bottom_func"
 gdb_continue_to_breakpoint "bottom_func"
 
diff --git a/gdb/testsuite/gdb.python/py-charset.exp b/gdb/testsuite/gdb.python/py-charset.exp
index b49617823ba..9e831954cdd 100644
--- a/gdb/testsuite/gdb.python/py-charset.exp
+++ b/gdb/testsuite/gdb.python/py-charset.exp
@@ -15,12 +15,11 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # Each test data has 4 parts:
 # 1. The string used in 'show XXX-charset' command,
 # 2. The string expected in the output of the command used in #1,
diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp
index 707068899fa..0eb785f6d4d 100644
--- a/gdb/testsuite/gdb.python/py-cmd.exp
+++ b/gdb/testsuite/gdb.python/py-cmd.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-completion.exp b/gdb/testsuite/gdb.python/py-completion.exp
index f466853353f..bf1abf32ee2 100644
--- a/gdb/testsuite/gdb.python/py-completion.exp
+++ b/gdb/testsuite/gdb.python/py-completion.exp
@@ -17,14 +17,13 @@ set testfile "py-completion"
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 set discard 0
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # Tab completion tests require readline support, and this set of tests
 # doesn't work on a remote host either.
 if { [readline_is_used] && ![is_remote host] } {
diff --git a/gdb/testsuite/gdb.python/py-connection-removed.exp b/gdb/testsuite/gdb.python/py-connection-removed.exp
index 8ffd99567ac..efbcf46516f 100644
--- a/gdb/testsuite/gdb.python/py-connection-removed.exp
+++ b/gdb/testsuite/gdb.python/py-connection-removed.exp
@@ -25,15 +25,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile py-connection.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] then {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-connection.exp b/gdb/testsuite/gdb.python/py-connection.exp
index 0719fe3b1f6..78710fd27de 100644
--- a/gdb/testsuite/gdb.python/py-connection.exp
+++ b/gdb/testsuite/gdb.python/py-connection.exp
@@ -20,15 +20,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-disasm.exp b/gdb/testsuite/gdb.python/py-disasm.exp
index 3aa77d44b61..57f8fdfce41 100644
--- a/gdb/testsuite/gdb.python/py-disasm.exp
+++ b/gdb/testsuite/gdb.python/py-disasm.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug"] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     fail "can't run to main"
     return 0
diff --git a/gdb/testsuite/gdb.python/py-doc-reformat.exp b/gdb/testsuite/gdb.python/py-doc-reformat.exp
index 5af64d61d5d..3829873c4cc 100644
--- a/gdb/testsuite/gdb.python/py-doc-reformat.exp
+++ b/gdb/testsuite/gdb.python/py-doc-reformat.exp
@@ -19,9 +19,9 @@
 
 load_lib gdb-python.exp
 
-# Check that Python is supported.
+require !skip_python_tests
+
 clean_restart
-if { [skip_python_tests] } { continue }
 
 # A global counter used to number the tests.
 set idx 0
diff --git a/gdb/testsuite/gdb.python/py-error.exp b/gdb/testsuite/gdb.python/py-error.exp
index b04be6a774f..0a8fd190c18 100644
--- a/gdb/testsuite/gdb.python/py-error.exp
+++ b/gdb/testsuite/gdb.python/py-error.exp
@@ -20,13 +20,12 @@ set testfile "py-error"
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set charset "IBM1047"
 
 set test2 "main reached"
diff --git a/gdb/testsuite/gdb.python/py-event-load.exp b/gdb/testsuite/gdb.python/py-event-load.exp
index 8dce6f19e5a..f3631251148 100644
--- a/gdb/testsuite/gdb.python/py-event-load.exp
+++ b/gdb/testsuite/gdb.python/py-event-load.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests
+require !skip_shlib_tests !skip_python_tests
 
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
@@ -49,8 +49,6 @@ if {![runto_main]} {
     return
 }
 
-if { [skip_python_tests] } { return }
-
 gdb_test_no_output "set var libname = \"$binfile2_dlopen\""
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-event-load.py]
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
index 109f8c1ca4e..ea1a6f502ff 100644
--- a/gdb/testsuite/gdb.python/py-events.exp
+++ b/gdb/testsuite/gdb.python/py-events.exp
@@ -13,7 +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/>.
 
-require !use_gdb_stub
+require !use_gdb_stub !skip_python_tests
 
 load_lib gdb-python.exp
 
@@ -34,8 +34,6 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
-if { [skip_python_tests] } { continue }
-
 gdb_test_no_output "python import gdb.events"
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
diff --git a/gdb/testsuite/gdb.python/py-evsignal.exp b/gdb/testsuite/gdb.python/py-evsignal.exp
index 03e2f8b0f80..2f0e791884e 100644
--- a/gdb/testsuite/gdb.python/py-evsignal.exp
+++ b/gdb/testsuite/gdb.python/py-evsignal.exp
@@ -22,6 +22,8 @@ if {[target_info gdb_protocol] == "remote"
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile py-evthreads.c
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
@@ -29,8 +31,6 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 }
 clean_restart $testfile
 
-if { [skip_python_tests] } { continue }
-
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
 gdb_test_no_output "source ${pyfile}" "load python file"
 
diff --git a/gdb/testsuite/gdb.python/py-evthreads.exp b/gdb/testsuite/gdb.python/py-evthreads.exp
index fde5501b1db..e993c6fe9b2 100644
--- a/gdb/testsuite/gdb.python/py-evthreads.exp
+++ b/gdb/testsuite/gdb.python/py-evthreads.exp
@@ -13,7 +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/>.
 
-require support_displaced_stepping
+require support_displaced_stepping !skip_python_tests
 
 load_lib gdb-python.exp
 
@@ -28,8 +28,6 @@ save_vars { GDBFLAGS } {
     clean_restart $testfile
 }
 
-if { [skip_python_tests] } { continue }
-
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
 gdb_test_no_output "source ${pyfile}" "load python file"
 
diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp
index bb42b56b5a8..d3678cf71ca 100644
--- a/gdb/testsuite/gdb.python/py-explore-cc.exp
+++ b/gdb/testsuite/gdb.python/py-explore-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
 
 standard_testfile py-explore.cc
 
@@ -24,9 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set int_ptr_ref_desc "The value of 'int_ptr_ref' is of type 'int_ptr' which is a typedef of type 'int \\*'.*\'int_ptr_ref' is a pointer to a value of type 'int'.*"
 
 set b_desc "The value of 'b' is a struct/class of type 'B' with the following fields:.*\
diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp
index 8b6e677446b..dd36740bac5 100644
--- a/gdb/testsuite/gdb.python/py-explore.exp
+++ b/gdb/testsuite/gdb.python/py-explore.exp
@@ -15,13 +15,12 @@
 
 standard_testfile
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set SS "struct SimpleStruct"
 set SU "union SimpleUnion"
 set CS "struct ComplexStruct"
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
index 7855714c781..d414268b1cb 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
@@ -17,15 +17,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] then {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index 7cc2c40a299..d37508c7d5c 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_shlib_tests
+require !skip_shlib_tests !skip_python_tests
 
 load_lib gdb-python.exp
 
@@ -37,8 +37,6 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
-if { [skip_python_tests] } { continue }
-
 #
 # Test FinishBreakpoint in normal conditions
 #
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
index 7eb394ee29a..300020553a1 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile .cc
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-format-address.exp b/gdb/testsuite/gdb.python/py-format-address.exp
index c90acad56c8..d9fed3f6ef2 100644
--- a/gdb/testsuite/gdb.python/py-format-address.exp
+++ b/gdb/testsuite/gdb.python/py-format-address.exp
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 load_lib gdb-python.exp
+require !skip_python_tests
 standard_testfile
 
 foreach func_name { foo bar } {
@@ -31,9 +32,6 @@ set binary_bar [standard_output_file "${testfile}-bar"]
 
 clean_restart $binary_foo
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp
index 6599fe31876..30a57b2254f 100644
--- a/gdb/testsuite/gdb.python/py-format-string.exp
+++ b/gdb/testsuite/gdb.python/py-format-string.exp
@@ -18,12 +18,12 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
-# Skip all tests if Python scripting is not enabled.
 gdb_exit
 gdb_start
-if { [skip_python_tests] } { continue }
 
 # Build inferior to language specification.
 proc build_inferior {exefile lang} {
diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsuite/gdb.python/py-frame-args.exp
index 2ecc80ddae8..091e26dd5b1 100644
--- a/gdb/testsuite/gdb.python/py-frame-args.exp
+++ b/gdb/testsuite/gdb.python/py-frame-args.exp
@@ -15,13 +15,12 @@
 
 standard_testfile
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-frame-inline.exp b/gdb/testsuite/gdb.python/py-frame-inline.exp
index d755c663fe8..719ec18aa37 100644
--- a/gdb/testsuite/gdb.python/py-frame-inline.exp
+++ b/gdb/testsuite/gdb.python/py-frame-inline.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index fca732cf142..f17e2f9844a 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # The following tests require execution.
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.python/py-framefilter-addr.exp b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
index 2cda4e596e8..5dad3bd0f2d 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-addr.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
@@ -19,15 +19,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
index 43bb53540ae..86a830d5eef 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
@@ -15,6 +15,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile amd64-py-framefilter-invalidarg.S
 
 if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
@@ -32,9 +34,6 @@ if {[build_executable $testfile.exp $testfile $srcfile {}] == -1} {
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index ac214fc6cbc..81101c11809 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 # We cannot use prepare_for_testing as we have to set the safe-patch
@@ -30,9 +32,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_test "info frame-filter" \
     "No frame filters\\." \
     "info frame filter before loading filters"
@@ -291,9 +290,6 @@ if {[build_executable $testfile.exp $testfile $srcfile {nodebug}] == -1} {
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp
index 358a0855fb8..7c48f7a0bd8 100644
--- a/gdb/testsuite/gdb.python/py-function.exp
+++ b/gdb/testsuite/gdb.python/py-function.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 # Start with a fresh gdb.
 
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_test_multiline "input convenience function" \
   "python" "" \
   "class test_func (gdb.Function):" "" \
diff --git a/gdb/testsuite/gdb.python/py-inferior-leak.exp b/gdb/testsuite/gdb.python/py-inferior-leak.exp
index 1eff7ae0316..4e2fa641545 100644
--- a/gdb/testsuite/gdb.python/py-inferior-leak.exp
+++ b/gdb/testsuite/gdb.python/py-inferior-leak.exp
@@ -18,13 +18,12 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 clean_restart
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { return }
-
 # Skip this test if the tracemalloc module is not available.
 if { ![gdb_py_module_available "tracemalloc"] } {
     unsupported "tracemalloc module not available"
diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp
index ee6b9fc97c5..0286d82394c 100644
--- a/gdb/testsuite/gdb.python/py-inferior.exp
+++ b/gdb/testsuite/gdb.python/py-inferior.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
@@ -27,9 +29,6 @@ if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 switch [get_endianness] {
     little { set python_pack_char "<" }
     big { set python_pack_char ">" }
diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp
index 4e468bfef18..47c6b19dbfc 100644
--- a/gdb/testsuite/gdb.python/py-infthread.exp
+++ b/gdb/testsuite/gdb.python/py-infthread.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_test_multiline "install new_thread event handler" \
     "python" "" \
     "seen_a_thread = False" "" \
diff --git a/gdb/testsuite/gdb.python/py-label-symbol-value.exp b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
index 3aea2bb4f2c..f3e91b74a46 100644
--- a/gdb/testsuite/gdb.python/py-label-symbol-value.exp
+++ b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
@@ -17,15 +17,13 @@
 # symbol (i.e. a symbol for a goto label).
 
 load_lib gdb-python.exp
+require !skip_python_tests
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-lazy-string.exp b/gdb/testsuite/gdb.python/py-lazy-string.exp
index 57c6c1c87b7..9f3bad5c660 100644
--- a/gdb/testsuite/gdb.python/py-lazy-string.exp
+++ b/gdb/testsuite/gdb.python/py-lazy-string.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main ] {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-linetable.exp b/gdb/testsuite/gdb.python/py-linetable.exp
index 19c3e745676..ff438216cf3 100644
--- a/gdb/testsuite/gdb.python/py-linetable.exp
+++ b/gdb/testsuite/gdb.python/py-linetable.exp
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 load_lib gdb-python.exp
+require !skip_python_tests
 set opts {}
 standard_testfile .S
 
@@ -34,9 +35,6 @@ if ![runto_main] {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_py_test_silent_cmd "python lt = gdb.selected_frame().find_sal().symtab.linetable()" \
     "get instruction" 0
 
diff --git a/gdb/testsuite/gdb.python/py-lookup-type.exp b/gdb/testsuite/gdb.python/py-lookup-type.exp
index d81b3520b5c..7527c13a925 100644
--- a/gdb/testsuite/gdb.python/py-lookup-type.exp
+++ b/gdb/testsuite/gdb.python/py-lookup-type.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 # Note that the purpose of this testcase is to test the behavior
 # of gdb.lookup_type searching for the primitive types internally
 # created by each language since GDB.  So, we must start GDB without
@@ -27,9 +29,6 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 proc test_lookup_type { lang type_name } {
     gdb_test_no_output "set language ${lang}"
     gdb_test "python print(gdb.lookup_type('${type_name}').name)" \
diff --git a/gdb/testsuite/gdb.python/py-mi-events.exp b/gdb/testsuite/gdb.python/py-mi-events.exp
index d3ffb154d91..4ed3405730a 100644
--- a/gdb/testsuite/gdb.python/py-mi-events.exp
+++ b/gdb/testsuite/gdb.python/py-mi-events.exp
@@ -18,6 +18,8 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
+require !skip_python_tests
+
 gdb_exit
 if [mi_gdb_start] {
     return
@@ -31,8 +33,6 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     return -1
 }
 
-if { [skip_python_tests] } { return }
-
 set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
 
 mi_delete_breakpoints
diff --git a/gdb/testsuite/gdb.python/py-mi-objfile.exp b/gdb/testsuite/gdb.python/py-mi-objfile.exp
index 2aaf65d0b7c..1b258623fb8 100644
--- a/gdb/testsuite/gdb.python/py-mi-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-mi-objfile.exp
@@ -18,6 +18,8 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
+require !skip_python_tests
+
 gdb_exit
 if [mi_gdb_start] {
     return
@@ -31,8 +33,6 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     return -1
 }
 
-if { [skip_python_tests] } { return }
-
 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
index 77227b60e34..b618b08e393 100644
--- a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
+++ b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
@@ -18,6 +18,8 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
+require !skip_python_tests
+
 #
 # Start here
 #
@@ -29,9 +31,6 @@ if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" }
 
 mi_clean_restart $binfile
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 mi_gdb_test "source ${pyfile}" \
   ".*\\^done" \
diff --git a/gdb/testsuite/gdb.python/py-nested-maps.exp b/gdb/testsuite/gdb.python/py-nested-maps.exp
index 35cb1007bb5..76e38c2555c 100644
--- a/gdb/testsuite/gdb.python/py-nested-maps.exp
+++ b/gdb/testsuite/gdb.python/py-nested-maps.exp
@@ -19,14 +19,7 @@
 
 load_lib gdb-python.exp
 
-standard_testfile
-
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
+require !skip_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-objfile-script.exp b/gdb/testsuite/gdb.python/py-objfile-script.exp
index 33068a72c8c..550a68447b8 100644
--- a/gdb/testsuite/gdb.python/py-objfile-script.exp
+++ b/gdb/testsuite/gdb.python/py-objfile-script.exp
@@ -18,6 +18,8 @@
 
 standard_testfile
 
+require !skip_python_tests
+
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
 }
@@ -26,9 +28,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp
index 811db0c7eb9..cf9d5aedc19 100644
--- a/gdb/testsuite/gdb.python/py-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-objfile.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-parameter.exp b/gdb/testsuite/gdb.python/py-parameter.exp
index 3a117072e3a..ab99817b5f3 100644
--- a/gdb/testsuite/gdb.python/py-parameter.exp
+++ b/gdb/testsuite/gdb.python/py-parameter.exp
@@ -18,12 +18,11 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 # Start with a fresh gdb.
 clean_restart
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 proc py_param_test_maybe_no_output { command pattern args } {
     if [string length $pattern] {
 	gdb_test $command $pattern $args
diff --git a/gdb/testsuite/gdb.python/py-pending-frame-level.exp b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
index a00a23c40c2..b83eaa31095 100644
--- a/gdb/testsuite/gdb.python/py-pending-frame-level.exp
+++ b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
@@ -17,15 +17,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-pp-integral.exp b/gdb/testsuite/gdb.python/py-pp-integral.exp
index a576bcb0f39..3fa247661ae 100644
--- a/gdb/testsuite/gdb.python/py-pp-integral.exp
+++ b/gdb/testsuite/gdb.python/py-pp-integral.exp
@@ -15,13 +15,12 @@
 
 standard_testfile
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto tick_tock] {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp
index 7e8afa4d49b..5e6f23aeb9d 100644
--- a/gdb/testsuite/gdb.python/py-pp-maint.exp
+++ b/gdb/testsuite/gdb.python/py-pp-maint.exp
@@ -23,15 +23,14 @@ if [is_remote host] {
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-pp-re-notag.exp b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
index a576bcb0f39..3fa247661ae 100644
--- a/gdb/testsuite/gdb.python/py-pp-re-notag.exp
+++ b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
@@ -15,13 +15,12 @@
 
 standard_testfile
 
+require !skip_python_tests
+
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto tick_tock] {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-pp-registration.exp b/gdb/testsuite/gdb.python/py-pp-registration.exp
index 32bd2acf5ec..c85fc4a1a79 100644
--- a/gdb/testsuite/gdb.python/py-pp-registration.exp
+++ b/gdb/testsuite/gdb.python/py-pp-registration.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index bdd92ec4bfd..8166e118693 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 proc run_lang_tests {exefile lang} {
     global srcdir subdir srcfile testfile hex
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
diff --git a/gdb/testsuite/gdb.python/py-progspace.exp b/gdb/testsuite/gdb.python/py-progspace.exp
index 33460b80b32..23b328aa680 100644
--- a/gdb/testsuite/gdb.python/py-progspace.exp
+++ b/gdb/testsuite/gdb.python/py-progspace.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
@@ -30,9 +32,6 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_test "python print (gdb.current_progspace().filename)" "None" \
   "current progspace filename (None)"
 gdb_test "python print (gdb.progspaces())" "\\\[<gdb.Progspace object at $hex>\\\]"
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index 03a730bcd46..56a0b47c78d 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -21,15 +21,7 @@ standard_testfile
 load_lib gdb-python.exp
 load_lib prompt.exp
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-gdb_exit
+require !skip_python_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-rbreak.exp b/gdb/testsuite/gdb.python/py-rbreak.exp
index 2d39141285f..6c5f77ef3b1 100644
--- a/gdb/testsuite/gdb.python/py-rbreak.exp
+++ b/gdb/testsuite/gdb.python/py-rbreak.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile py-rbreak.c py-rbreak-func2.c
 
 if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
     return 1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
index ef14edceded..f0845f8bbd5 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
@@ -15,9 +15,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Skip this test if btrace is disabled.
+load_lib gdb-python.exp
 
-require !skip_btrace_tests
+require !skip_btrace_tests !skip_python_tests
 
 standard_testfile
 
@@ -27,14 +27,6 @@ if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {deb
 }
 clean_restart $testfile
 
-# Skip this test if python is disabled.
-
-load_lib gdb-python.exp
-if { [skip_python_tests] } {
-    untested "skipping python tests"
-    return -1
-}
-
 if { ![runto_main] } {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 38c326f555f..1326e8283b9 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -17,7 +17,7 @@
 
 # Skip this test if btrace is disabled.
 
-require !skip_btrace_tests
+require !skip_btrace_tests !skip_python_tests
 
 load_lib gdb-python.exp
 
@@ -25,13 +25,6 @@ standard_testfile
 
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
 
-# Skip this test if python is disabled.
-
-if { [skip_python_tests] } {
-    untested "skipping python tests"
-    return -1
-}
-
 if {![runto_main]} {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp
index fe19d6b207c..eb40d51f218 100644
--- a/gdb/testsuite/gdb.python/py-record-full.exp
+++ b/gdb/testsuite/gdb.python/py-record-full.exp
@@ -17,7 +17,7 @@
 
 # Skip this test if target does not support recording.
 
-require supports_process_record
+require supports_process_record !skip_python_tests
 
 load_lib gdb-python.exp
 
@@ -25,13 +25,6 @@ standard_testfile
 
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
 
-# Skip this test if python is disabled.
-
-if { [skip_python_tests] } {
-    untested "skipping python tests"
-    return -1
-}
-
 if {![runto_main]} {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.exp b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
index 6e623933f6c..498443e9e54 100644
--- a/gdb/testsuite/gdb.python/py-recurse-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
@@ -24,15 +24,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 
 gdb_test "source ${pyfile}" "Python script imported" \
diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
index 98eb94f5d2c..66a010108f4 100644
--- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
@@ -17,7 +17,7 @@
 # exposing rvalue reference values to Python.  It is based on
 # gdb.python/py-value-cc.exp.
 
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
 
 standard_testfile .cc
 
@@ -26,9 +26,6 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile \
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if {[skip_python_tests]} { continue }
-
 if {![runto_main]} {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index d3d2a6ccd60..96dafdbfd67 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -28,6 +28,8 @@ if {![istarget *-*-linux*]
     return
 }
 
+require !skip_python_tests
+
 standard_testfile
 
 # Make this available to gdb before the program starts, it is
@@ -48,9 +50,6 @@ if {[build_executable $testfile.exp $testfile $srcfile \
 gdb_exit
 gdb_start
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 gdb_reinitialize_dir $srcdir/$subdir
 
 # Try first with a restrictive safe-path.
diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp
index c6305ed6291..e09dbb05fd4 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.exp
+++ b/gdb/testsuite/gdb.python/py-send-packet.exp
@@ -24,16 +24,12 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require !skip_gdbserver_tests !skip_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-if { [skip_python_tests] } {
-    return 0
-}
-
 # Make sure we're disconnected, in case we're testing with an
 # extended-remote board, therefore already connected.
 gdb_test "disconnect" ".*"
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp
index ac68e2cbd07..fdec1df2cc8 100644
--- a/gdb/testsuite/gdb.python/py-shared.exp
+++ b/gdb/testsuite/gdb.python/py-shared.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests
+require !skip_shlib_tests !skip_python_tests
 
 standard_testfile
 
@@ -41,9 +41,6 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opt
 clean_restart $testfile
 gdb_load_shlib ${library}
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # The following tests require execution.
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.python/py-startup-opt.exp b/gdb/testsuite/gdb.python/py-startup-opt.exp
index 89f97fd729c..2d9fd2a0444 100644
--- a/gdb/testsuite/gdb.python/py-startup-opt.exp
+++ b/gdb/testsuite/gdb.python/py-startup-opt.exp
@@ -16,12 +16,7 @@
 # Test the flags within GDB that can be used to control how Python is
 # initialized.
 
-gdb_start
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
-gdb_exit
+require !skip_python_tests
 
 # Return a list containing two directory paths for newly created home
 # directories.
diff --git a/gdb/testsuite/gdb.python/py-strfns.exp b/gdb/testsuite/gdb.python/py-strfns.exp
index 94d71800584..162e1026eb5 100644
--- a/gdb/testsuite/gdb.python/py-strfns.exp
+++ b/gdb/testsuite/gdb.python/py-strfns.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
@@ -28,9 +30,6 @@ if ![runto_main] {
     return 0
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 proc test_all_strfns { } {
     gdb_test "p \$_streq (str1, str2)" " = 1"
     gdb_test "p \$_streq (str1, str3)" " = 0"
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
index d2192bf5d88..a0bf34d8aa1 100644
--- a/gdb/testsuite/gdb.python/py-symbol.exp
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile py-symbol.c py-symbol-2.c
 
 set opts { debug additional_flags=-DUSE_TWO_FILES }
@@ -26,9 +28,6 @@ if {[prepare_for_testing "failed to prepare" $testfile \
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set readnow_p [readnow]
 
 # Check that we find all static symbols before the inferior has
diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index 43d693e16f3..5b68524140e 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile py-symbol.c
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-sync-interp.exp b/gdb/testsuite/gdb.python/py-sync-interp.exp
index 408a165e648..1e994bf7393 100644
--- a/gdb/testsuite/gdb.python/py-sync-interp.exp
+++ b/gdb/testsuite/gdb.python/py-sync-interp.exp
@@ -20,20 +20,10 @@
 
 standard_testfile
 
-require can_spawn_for_attach
+require can_spawn_for_attach !skip_python_tests
 
 load_lib gdb-python.exp
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-gdb_exit
-
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp
index 1383e3a1089..14ebb670188 100644
--- a/gdb/testsuite/gdb.python/py-template.exp
+++ b/gdb/testsuite/gdb.python/py-template.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
 
 standard_testfile .cc
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
@@ -31,9 +31,6 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 proc test_template_arg {exefile type} {
     global testfile srcdir subdir srcfile
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" \
diff --git a/gdb/testsuite/gdb.python/py-thrhandle.exp b/gdb/testsuite/gdb.python/py-thrhandle.exp
index d8fa2e6f1a2..0806f8995c1 100644
--- a/gdb/testsuite/gdb.python/py-thrhandle.exp
+++ b/gdb/testsuite/gdb.python/py-thrhandle.exp
@@ -21,6 +21,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
@@ -29,9 +31,6 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 
 clean_restart ${binfile}
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 runto_main
 
 gdb_test "break after_mc_barrier" \
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index abf95e5c486..37e29294805 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
 
 load_lib gdb-python.exp
 load_lib cp-support.exp
@@ -24,8 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-if { [skip_python_tests] } { continue }
-
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 
diff --git a/gdb/testsuite/gdb.python/py-unwind-inline.exp b/gdb/testsuite/gdb.python/py-unwind-inline.exp
index 964d90a75f2..c0dc7f2f49b 100644
--- a/gdb/testsuite/gdb.python/py-unwind-inline.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-inline.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
@@ -25,9 +27,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # The following tests require execution.
 if {![runto_main]} {
     return 0
diff --git a/gdb/testsuite/gdb.python/py-unwind-maint.exp b/gdb/testsuite/gdb.python/py-unwind-maint.exp
index f0506691ec2..3fcbe4f6054 100644
--- a/gdb/testsuite/gdb.python/py-unwind-maint.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-maint.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
index c62d4f0bde8..1598f865699 100644
--- a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
@@ -38,15 +38,14 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if {![runto_main]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
index 1810214082a..2d279bf71b1 100644
--- a/gdb/testsuite/gdb.python/py-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 # Stack protection can make the stack look a bit different, breaking the
@@ -29,9 +31,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug $fla
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 # This test runs on a specific platform.
 if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
 
diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp
index f62c1df4aa5..4085a87440e 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-value-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
 
 standard_testfile .cc
 
@@ -24,9 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
index a4964e11dd2..8ab188c7ea5 100644
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 standard_testfile
 
 set has_argv0 [gdb_has_argv0]
@@ -634,9 +636,6 @@ if { [build_inferior "${binfile}" "c"] < 0 } {
 # Start with a fresh gdb.
 clean_restart ${binfile}
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 test_history_count
 test_value_creation
 test_value_reinit
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index 8db5c39080b..6a9e5f22dc1 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
 
 standard_testfile py-xmethods.cc
 
@@ -26,12 +26,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } {
-    untested "skipping Python tests"
-    return
-}
-
 if ![runto_main] {
    return -1
 }
diff --git a/gdb/testsuite/gdb.python/tui-window-names.exp b/gdb/testsuite/gdb.python/tui-window-names.exp
index 9fcd8649117..48f3c6b07cd 100644
--- a/gdb/testsuite/gdb.python/tui-window-names.exp
+++ b/gdb/testsuite/gdb.python/tui-window-names.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-python.exp
 
+require !skip_python_tests
+
 tuiterm_env
 
 clean_restart
@@ -26,11 +28,6 @@ if {[skip_tui_tests]} {
     return
 }
 
-if { [skip_python_tests] } {
-    untested "skipping Python tests"
-    return
-}
-
 # Define a function we can use as a window constructor.  If this ever
 # gets called we'll throw an error, but that's OK, this test doesn't
 # actually try to create any windows.
diff --git a/gdb/testsuite/gdb.python/tui-window.exp b/gdb/testsuite/gdb.python/tui-window.exp
index 1dd8e373c24..2f0415557bd 100644
--- a/gdb/testsuite/gdb.python/tui-window.exp
+++ b/gdb/testsuite/gdb.python/tui-window.exp
@@ -16,6 +16,7 @@
 # Test a TUI window implemented in Python.
 
 load_lib gdb-python.exp
+require !skip_python_tests
 tuiterm_env
 
 # This test doesn't care about the inferior.
@@ -32,9 +33,6 @@ if {[skip_tui_tests]} {
 
 Term::clean_restart 24 80 $testfile
 
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 gdb_test_no_output "source ${remote_python_file}" \
diff --git a/gdb/testsuite/gdb.rust/pp.exp b/gdb/testsuite/gdb.rust/pp.exp
index a456afc1b35..d23463e89dd 100644
--- a/gdb/testsuite/gdb.rust/pp.exp
+++ b/gdb/testsuite/gdb.rust/pp.exp
@@ -17,15 +17,13 @@
 
 load_lib gdb-python.exp
 load_lib rust-support.exp
-require !skip_rust_tests
+require !skip_rust_tests !skip_python_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
     return -1
 }
 
-if { [skip_python_tests] } { return }
-
 set remote_python_file [gdb_remote_download host \
 			    ${srcdir}/${subdir}/${testfile}.py]
 gdb_test_no_output "source ${remote_python_file}" "load python file"
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index 1eb9e2e51c5..4ef70daaf90 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -23,15 +23,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile multi-ui-errors.c
 
-require !skip_gdbserver_tests
-
-# Gdb needs to be running for skip_python_tests, but exit once we're done,
-# we'll start a custom gdb after this.
-clean_restart
-if { [skip_python_tests] } {
-    return 0
-}
-gdb_exit
+require !skip_gdbserver_tests !skip_python_tests
 
 if {[build_executable "failed to prepare" ${testfile} \
 	 ${srcfile}] == -1} {
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index d2c55db0cac..78ce9879b42 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -72,7 +72,7 @@ proc check_thread_local {number} {
 	    "= $expected_value" \
 	    "${number} thread local storage"
 
-    if {!$::has_python_support} {
+    if {![skip_python_tests]} {
 	gdb_test_no_output \
 	    "python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
 	    "${number} look up a_thread_local symbol"
@@ -155,9 +155,6 @@ proc check_thread_stack {number spin_threads spin_threads_level} {
 
 clean_restart ${binfile}
 
-# Set this to avoid calling skip_python_tests repeatedly.
-set has_python_support [skip_python_tests]
-
 gdb_test_multiple "print a_thread_local" "" {
     -re -wrap "Cannot find thread-local variables on this target" {
 	kfail "gdb/25807" $gdb_test_name
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 51/79] Rename to allow_xml_test
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (49 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 50/79] Use "require" for Python tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 52/79] Rename to allow_aarch64_sve_tests Tom Tromey
                   ` (29 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes gdb_skip_xml_test to invert the sense, and renames it to
allow_xml_test.
---
 gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp              | 2 +-
 gdb/testsuite/gdb.base/catch-syscall.exp              | 2 +-
 gdb/testsuite/gdb.base/info-os.exp                    | 2 +-
 gdb/testsuite/gdb.base/valgrind-bt.exp                | 2 +-
 gdb/testsuite/gdb.base/valgrind-disp-step.exp         | 2 +-
 gdb/testsuite/gdb.base/valgrind-infcall-2.exp         | 2 +-
 gdb/testsuite/gdb.base/valgrind-infcall.exp           | 2 +-
 gdb/testsuite/gdb.gdb/unittest.exp                    | 2 +-
 gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 2 +-
 gdb/testsuite/gdb.mi/mi-info-os.exp                   | 2 +-
 gdb/testsuite/gdb.server/ext-run.exp                  | 4 ++--
 gdb/testsuite/gdb.xml/maint-xml-dump.exp              | 2 +-
 gdb/testsuite/gdb.xml/maint_print_struct.exp          | 2 +-
 gdb/testsuite/gdb.xml/tdesc-arch.exp                  | 2 +-
 gdb/testsuite/gdb.xml/tdesc-errors.exp                | 2 +-
 gdb/testsuite/gdb.xml/tdesc-regs.exp                  | 2 +-
 gdb/testsuite/gdb.xml/tdesc-reload.exp                | 2 +-
 gdb/testsuite/gdb.xml/tdesc-xinclude.exp              | 2 +-
 gdb/testsuite/lib/gdb.exp                             | 9 ++++-----
 gdb/testsuite/lib/gdbserver-support.exp               | 2 +-
 20 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp b/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp
index 6819c302187..0373bfaf13c 100644
--- a/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp
+++ b/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp
@@ -13,7 +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/>.
 
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
index 9144945e789..22181bc884e 100644
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
@@ -781,7 +781,7 @@ fill_all_syscalls_numbers
 
 # Execute the tests, using XML support
 gdb_exit
-if { ![gdb_skip_xml_test] } {
+if { [allow_xml_test] } {
   clean_restart $binfile
   do_syscall_tests
 
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index 58f7126678e..e191217681a 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -22,7 +22,7 @@ if {![istarget *-*-linux*]} {
 }
 
 # Support for XML-output is needed to run this test.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 # Compile test program.
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] } {
diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.base/valgrind-bt.exp
index 049b42f9b1e..da0261eabe6 100644
--- a/gdb/testsuite/gdb.base/valgrind-bt.exp
+++ b/gdb/testsuite/gdb.base/valgrind-bt.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Valgrind gdbserver requires gdb with xml support.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.base/valgrind-disp-step.exp b/gdb/testsuite/gdb.base/valgrind-disp-step.exp
index 05d0d8d6951..3fb4341d2c7 100644
--- a/gdb/testsuite/gdb.base/valgrind-disp-step.exp
+++ b/gdb/testsuite/gdb.base/valgrind-disp-step.exp
@@ -19,7 +19,7 @@
 # automatically instead of getting stuck or crashing.
 
 # Valgrind gdbserver requires gdb with xml support.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
index 13d290079cc..6ed6ecd1d42 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
@@ -30,7 +30,7 @@
 # Aborted (core dumped)
 
 # Valgrind gdbserver requires gdb with xml support.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp
index 48b3bb2c6c1..bcaca02c900 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Valgrind gdbserver requires gdb with xml support.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 load_lib valgrind.exp
 
diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/unittest.exp
index ff532856e40..a0e918c36f6 100644
--- a/gdb/testsuite/gdb.gdb/unittest.exp
+++ b/gdb/testsuite/gdb.gdb/unittest.exp
@@ -19,7 +19,7 @@ require !gdb_debug_enabled
 
 load_lib completion-support.exp
 
-set do_xml_test [expr ![gdb_skip_xml_test]]
+set do_xml_test [allow_xml_test]
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index 1a77b96f2f8..27224b5f96f 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -21,7 +21,7 @@ set MIFLAGS "-i=mi"
 standard_testfile
 
 # Support for XML is needed to run this test.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.mi/mi-info-os.exp b/gdb/testsuite/gdb.mi/mi-info-os.exp
index 7e7db550af7..2f243a7aac0 100644
--- a/gdb/testsuite/gdb.mi/mi-info-os.exp
+++ b/gdb/testsuite/gdb.mi/mi-info-os.exp
@@ -23,7 +23,7 @@ if {![istarget *-*-linux*]} {
 }
 
 # Support for XML-output is needed to run this test.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp
index 7cfd2bf717f..2add84e8b1b 100644
--- a/gdb/testsuite/gdb.server/ext-run.exp
+++ b/gdb/testsuite/gdb.server/ext-run.exp
@@ -27,8 +27,8 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
 }
 
-# gdb_skip_xml_test must be called while gdb is not running.
-set do_xml_test [expr ![gdb_skip_xml_test]]
+# allow_xml_test must be called while gdb is not running.
+set do_xml_test [allow_xml_test]
 
 save_vars { GDBFLAGS } {
     # If GDB and GDBserver are both running locally, set the sysroot to avoid
diff --git a/gdb/testsuite/gdb.xml/maint-xml-dump.exp b/gdb/testsuite/gdb.xml/maint-xml-dump.exp
index 0bf785537b1..cc0b889ab09 100644
--- a/gdb/testsuite/gdb.xml/maint-xml-dump.exp
+++ b/gdb/testsuite/gdb.xml/maint-xml-dump.exp
@@ -37,7 +37,7 @@
 #
 # 4. Indentation of lines will be preserved so your input file needs
 #    to follow the expected indentation.
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/maint_print_struct.exp b/gdb/testsuite/gdb.xml/maint_print_struct.exp
index f4d32d6623e..6f411895501 100644
--- a/gdb/testsuite/gdb.xml/maint_print_struct.exp
+++ b/gdb/testsuite/gdb.xml/maint_print_struct.exp
@@ -17,7 +17,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/>.
 
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/tdesc-arch.exp
index 9825320b024..e66335f2290 100644
--- a/gdb/testsuite/gdb.xml/tdesc-arch.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-arch.exp
@@ -13,7 +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/>.
 
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-errors.exp b/gdb/testsuite/gdb.xml/tdesc-errors.exp
index b3243064e9c..7e85cf67649 100644
--- a/gdb/testsuite/gdb.xml/tdesc-errors.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-errors.exp
@@ -13,7 +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/>.
 
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 13fafa1477e..4545cd1c9b5 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
@@ -13,7 +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/>.
 
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp
index 997b1f4e0ad..21dede88faa 100644
--- a/gdb/testsuite/gdb.xml/tdesc-reload.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp
@@ -16,7 +16,7 @@
 # Testing for 'maint print xml-tdesc'.  Check we can print out the
 # current target description and load it back in again.
 
-require !gdb_skip_xml_test
+require allow_xml_test
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.xml/tdesc-xinclude.exp b/gdb/testsuite/gdb.xml/tdesc-xinclude.exp
index 3a757126799..902e7e77098 100644
--- a/gdb/testsuite/gdb.xml/tdesc-xinclude.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-xinclude.exp
@@ -13,7 +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/>.
 
-require !gdb_skip_xml_test
+require allow_xml_test
 
 gdb_start
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 64eef9701c2..f293cbb19cc 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -6970,17 +6970,16 @@ proc gdb_skip_bogus_test { msg } {
     return 0
 }
 
-# Return true if a test should be skipped due to lack of XML support
-# in the host GDB.
+# Return true if XML support is enabled in the host GDB.
 # NOTE: This must be called while gdb is *not* running.
 
-gdb_caching_proc gdb_skip_xml_test {
+gdb_caching_proc allow_xml_test {
     global gdb_spawn_id
     global gdb_prompt
     global srcdir
 
     if { [info exists gdb_spawn_id] } {
-        error "GDB must not be running in gdb_skip_xml_tests."
+	error "GDB must not be running in allow_xml_tests."
     }
 
     set xml_file [gdb_remote_download host "${srcdir}/gdb.xml/trivial.xml"]
@@ -6994,7 +6993,7 @@ gdb_caching_proc gdb_skip_xml_test {
 	-re ".*$gdb_prompt $" { }
     }
     gdb_exit
-    return $xml_missing
+    return [expr {!$xml_missing}]
 }
 
 # Return true if argv[0] is available.
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 91a6bd70244..49ae56190c2 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -171,7 +171,7 @@ proc skip_gdbserver_tests { } {
     # multiple target descriptions, GDB doesn't know which target
     # description GDBserver uses, and may fail to parse 'g' packet
     # after connection.
-    if { [gdb_skip_xml_test]
+    if { ![allow_xml_test]
 	 && ([istarget "arm*-*-linux*"]
 	     || [istarget "aarch64*-*-linux*"]
 	     || [istarget "mips*-*-linux*"]
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 52/79] Rename to allow_aarch64_sve_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (50 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 51/79] Rename to allow_xml_test Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 53/79] Rename to allow_ada_tests Tom Tromey
                   ` (28 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_aarch64_sve_tests to invert the sense, and renames
it to allow_aarch64_sve_tests.
---
 .../gdb.arch/aarch64-sighandler-regs.exp       |  2 +-
 gdb/testsuite/gdb.arch/aarch64-sve.exp         |  2 +-
 gdb/testsuite/lib/gdb.exp                      | 18 +++++++++---------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp b/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
index d3f7d1f503e..57ebed3628f 100644
--- a/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
@@ -19,7 +19,7 @@ require is_aarch64_target
 
 set compile_flags {debug}
 
-if { [skip_aarch64_sve_tests] } {
+if { ![allow_aarch64_sve_tests] } {
     unsupported "target does not support SVE"
     set sve_hw 0
 } else {
diff --git a/gdb/testsuite/gdb.arch/aarch64-sve.exp b/gdb/testsuite/gdb.arch/aarch64-sve.exp
index 4a54b56105d..9b2755e569d 100644
--- a/gdb/testsuite/gdb.arch/aarch64-sve.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-sve.exp
@@ -15,7 +15,7 @@
 
 # Test a binary that uses SVE and exercise changing the SVE vector length.
 
-require !skip_aarch64_sve_tests
+require allow_aarch64_sve_tests
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index f293cbb19cc..9f7ec180189 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3906,15 +3906,15 @@ gdb_caching_proc skip_btrace_pt_tests {
 }
 
 # Run a test on the target to see if it supports Aarch64 SVE hardware.
-# Return 0 if so, 1 if it does not.  Note this causes a restart of GDB.
+# Return 1 if so, 0 if it does not.  Note this causes a restart of GDB.
 
-gdb_caching_proc skip_aarch64_sve_tests {
+gdb_caching_proc allow_aarch64_sve_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
     set me "skip_aarch64_sve_tests"
 
     if { ![is_aarch64_target]} {
-	return 1
+	return 0
     }
 
     set compile_flags "{additional_flags=-march=armv8-a+sve}"
@@ -3927,7 +3927,7 @@ gdb_caching_proc skip_aarch64_sve_tests {
 	}
     }
     if {![gdb_simple_compile $me $src executable $compile_flags]} {
-        return 1
+        return 0
     }
 
     # Compilation succeeded so now run it via gdb.
@@ -3936,22 +3936,22 @@ gdb_caching_proc skip_aarch64_sve_tests {
     gdb_expect {
         -re ".*Illegal instruction.*${gdb_prompt} $" {
             verbose -log "\n$me sve hardware not detected"
-            set skip_sve_tests 1
+            set allow_sve_tests 0
         }
         -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
             verbose -log "\n$me: sve hardware detected"
-            set skip_sve_tests 0
+            set allow_sve_tests 1
         }
         default {
           warning "\n$me: default case taken"
-            set skip_sve_tests 1
+            set allow_sve_tests 0
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_sve_tests" 2
-    return $skip_sve_tests
+    verbose "$me:  returning $allow_sve_tests" 2
+    return $allow_sve_tests
 }
 
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 53/79] Rename to allow_ada_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (51 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 52/79] Rename to allow_aarch64_sve_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 54/79] Rename to allow_avx512bf16_tests Tom Tromey
                   ` (27 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_ada_tests to invert the sense, and renames it to
allow_ada_tests.
---
 gdb/testsuite/gdb.ada/O2_float_param.exp              | 2 +-
 gdb/testsuite/gdb.ada/access_tagged_param.exp         | 2 +-
 gdb/testsuite/gdb.ada/access_to_packed_array.exp      | 2 +-
 gdb/testsuite/gdb.ada/access_to_unbounded_array.exp   | 2 +-
 gdb/testsuite/gdb.ada/addr_arith.exp                  | 2 +-
 gdb/testsuite/gdb.ada/aliased_array.exp               | 2 +-
 gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp           | 2 +-
 gdb/testsuite/gdb.ada/arr_arr.exp                     | 2 +-
 gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp          | 2 +-
 gdb/testsuite/gdb.ada/array_bounds.exp                | 2 +-
 gdb/testsuite/gdb.ada/array_char_idx.exp              | 2 +-
 gdb/testsuite/gdb.ada/array_of_symbolic_length.exp    | 2 +-
 gdb/testsuite/gdb.ada/array_of_variable_length.exp    | 2 +-
 gdb/testsuite/gdb.ada/array_of_variant.exp            | 2 +-
 gdb/testsuite/gdb.ada/array_ptr_renaming.exp          | 2 +-
 gdb/testsuite/gdb.ada/array_return.exp                | 2 +-
 gdb/testsuite/gdb.ada/array_subscript_addr.exp        | 2 +-
 gdb/testsuite/gdb.ada/arraydim.exp                    | 2 +-
 gdb/testsuite/gdb.ada/arrayidx.exp                    | 2 +-
 gdb/testsuite/gdb.ada/arrayparam.exp                  | 2 +-
 gdb/testsuite/gdb.ada/arrayptr.exp                    | 2 +-
 gdb/testsuite/gdb.ada/assign_1.exp                    | 2 +-
 gdb/testsuite/gdb.ada/assign_arr.exp                  | 2 +-
 gdb/testsuite/gdb.ada/atomic_enum.exp                 | 2 +-
 gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp        | 2 +-
 gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp         | 2 +-
 gdb/testsuite/gdb.ada/bias.exp                        | 2 +-
 gdb/testsuite/gdb.ada/big_packed_array.exp            | 2 +-
 gdb/testsuite/gdb.ada/boolean_expr.exp                | 2 +-
 gdb/testsuite/gdb.ada/bp_c_mixed_case.exp             | 2 +-
 gdb/testsuite/gdb.ada/bp_enum_homonym.exp             | 2 +-
 gdb/testsuite/gdb.ada/bp_fun_addr.exp                 | 2 +-
 gdb/testsuite/gdb.ada/bp_inlined_func.exp             | 2 +-
 gdb/testsuite/gdb.ada/bp_on_var.exp                   | 2 +-
 gdb/testsuite/gdb.ada/bp_range_type.exp               | 2 +-
 gdb/testsuite/gdb.ada/bp_reset.exp                    | 2 +-
 gdb/testsuite/gdb.ada/byte_packed_arr.exp             | 2 +-
 gdb/testsuite/gdb.ada/call_pn.exp                     | 2 +-
 gdb/testsuite/gdb.ada/catch_assert_if.exp             | 2 +-
 gdb/testsuite/gdb.ada/catch_ex.exp                    | 2 +-
 gdb/testsuite/gdb.ada/catch_ex_std.exp                | 2 +-
 gdb/testsuite/gdb.ada/char_enum.exp                   | 2 +-
 gdb/testsuite/gdb.ada/char_enum_overload.exp          | 2 +-
 gdb/testsuite/gdb.ada/char_enum_unicode.exp           | 2 +-
 gdb/testsuite/gdb.ada/char_param.exp                  | 2 +-
 gdb/testsuite/gdb.ada/complete.exp                    | 2 +-
 gdb/testsuite/gdb.ada/cond_lang.exp                   | 2 +-
 gdb/testsuite/gdb.ada/convvar_comp.exp                | 2 +-
 gdb/testsuite/gdb.ada/dgopt.exp                       | 2 +-
 gdb/testsuite/gdb.ada/disc_arr_bound.exp              | 2 +-
 gdb/testsuite/gdb.ada/discrete-char.exp               | 2 +-
 gdb/testsuite/gdb.ada/display_nested.exp              | 2 +-
 gdb/testsuite/gdb.ada/dot_all.exp                     | 2 +-
 gdb/testsuite/gdb.ada/dyn_arrayidx.exp                | 2 +-
 gdb/testsuite/gdb.ada/dyn_loc.exp                     | 2 +-
 gdb/testsuite/gdb.ada/dyn_stride.exp                  | 2 +-
 gdb/testsuite/gdb.ada/dynamic-iface.exp               | 2 +-
 gdb/testsuite/gdb.ada/enum_idx_packed.exp             | 2 +-
 gdb/testsuite/gdb.ada/enum_qual.exp                   | 2 +-
 gdb/testsuite/gdb.ada/enums_overload.exp              | 2 +-
 gdb/testsuite/gdb.ada/excep_handle.exp                | 2 +-
 gdb/testsuite/gdb.ada/exec_changed.exp                | 2 +-
 gdb/testsuite/gdb.ada/expr_delims.exp                 | 2 +-
 gdb/testsuite/gdb.ada/expr_with_funcall.exp           | 2 +-
 gdb/testsuite/gdb.ada/exprs.exp                       | 2 +-
 gdb/testsuite/gdb.ada/fin_fun_out.exp                 | 2 +-
 gdb/testsuite/gdb.ada/finish-var-size.exp             | 4 ++--
 gdb/testsuite/gdb.ada/fixed_cmp.exp                   | 2 +-
 gdb/testsuite/gdb.ada/fixed_points.exp                | 2 +-
 gdb/testsuite/gdb.ada/fixed_points_function.exp       | 2 +-
 gdb/testsuite/gdb.ada/float-bits.exp                  | 2 +-
 gdb/testsuite/gdb.ada/float_param.exp                 | 2 +-
 gdb/testsuite/gdb.ada/formatted_ref.exp               | 2 +-
 gdb/testsuite/gdb.ada/frame_arg_lang.exp              | 2 +-
 gdb/testsuite/gdb.ada/frame_args.exp                  | 2 +-
 gdb/testsuite/gdb.ada/fullname_bp.exp                 | 2 +-
 gdb/testsuite/gdb.ada/fun_addr.exp                    | 2 +-
 gdb/testsuite/gdb.ada/fun_in_declare.exp              | 2 +-
 gdb/testsuite/gdb.ada/fun_overload_menu.exp           | 2 +-
 gdb/testsuite/gdb.ada/fun_renaming.exp                | 2 +-
 gdb/testsuite/gdb.ada/funcall_char.exp                | 2 +-
 gdb/testsuite/gdb.ada/funcall_param.exp               | 2 +-
 gdb/testsuite/gdb.ada/funcall_ptr.exp                 | 2 +-
 gdb/testsuite/gdb.ada/funcall_ref.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ghost.exp                       | 2 +-
 gdb/testsuite/gdb.ada/homonym.exp                     | 2 +-
 gdb/testsuite/gdb.ada/info_addr_mixed_case.exp        | 2 +-
 gdb/testsuite/gdb.ada/info_auto_lang.exp              | 2 +-
 gdb/testsuite/gdb.ada/info_exc.exp                    | 2 +-
 gdb/testsuite/gdb.ada/info_locals_renaming.exp        | 2 +-
 gdb/testsuite/gdb.ada/info_types.exp                  | 2 +-
 gdb/testsuite/gdb.ada/inline-section-gc.exp           | 2 +-
 gdb/testsuite/gdb.ada/int_deref.exp                   | 2 +-
 gdb/testsuite/gdb.ada/interface.exp                   | 2 +-
 gdb/testsuite/gdb.ada/iwide.exp                       | 2 +-
 gdb/testsuite/gdb.ada/lang_switch.exp                 | 2 +-
 gdb/testsuite/gdb.ada/length_cond.exp                 | 2 +-
 gdb/testsuite/gdb.ada/literals.exp                    | 2 +-
 gdb/testsuite/gdb.ada/local-enum.exp                  | 2 +-
 gdb/testsuite/gdb.ada/maint_with_ada.exp              | 2 +-
 gdb/testsuite/gdb.ada/mi_catch_assert.exp             | 2 +-
 gdb/testsuite/gdb.ada/mi_catch_ex.exp                 | 2 +-
 gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp            | 2 +-
 gdb/testsuite/gdb.ada/mi_dyn_arr.exp                  | 2 +-
 gdb/testsuite/gdb.ada/mi_ex_cond.exp                  | 2 +-
 gdb/testsuite/gdb.ada/mi_exc_info.exp                 | 2 +-
 gdb/testsuite/gdb.ada/mi_interface.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_prot.exp                     | 2 +-
 gdb/testsuite/gdb.ada/mi_ref_changeable.exp           | 2 +-
 gdb/testsuite/gdb.ada/mi_string_access.exp            | 2 +-
 gdb/testsuite/gdb.ada/mi_task_arg.exp                 | 2 +-
 gdb/testsuite/gdb.ada/mi_task_info.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_var_access.exp               | 2 +-
 gdb/testsuite/gdb.ada/mi_var_array.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_var_union.exp                | 2 +-
 gdb/testsuite/gdb.ada/mi_variant.exp                  | 2 +-
 gdb/testsuite/gdb.ada/minsyms.exp                     | 2 +-
 gdb/testsuite/gdb.ada/mod_from_name.exp               | 2 +-
 gdb/testsuite/gdb.ada/multiarray.exp                  | 2 +-
 gdb/testsuite/gdb.ada/n_arr_bound.exp                 | 2 +-
 gdb/testsuite/gdb.ada/nested.exp                      | 2 +-
 gdb/testsuite/gdb.ada/non-ascii-latin-1.exp           | 2 +-
 gdb/testsuite/gdb.ada/non-ascii-latin-3.exp           | 2 +-
 gdb/testsuite/gdb.ada/non-ascii-utf-8.exp             | 2 +-
 gdb/testsuite/gdb.ada/notcplusplus.exp                | 2 +-
 gdb/testsuite/gdb.ada/null_array.exp                  | 2 +-
 gdb/testsuite/gdb.ada/null_overload.exp               | 2 +-
 gdb/testsuite/gdb.ada/null_record.exp                 | 2 +-
 gdb/testsuite/gdb.ada/operator_bp.exp                 | 2 +-
 gdb/testsuite/gdb.ada/operator_call.exp               | 2 +-
 gdb/testsuite/gdb.ada/optim_drec.exp                  | 2 +-
 gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp      | 2 +-
 gdb/testsuite/gdb.ada/overload_menu_crash.exp         | 2 +-
 gdb/testsuite/gdb.ada/packed_array.exp                | 2 +-
 gdb/testsuite/gdb.ada/packed_array_assign.exp         | 2 +-
 gdb/testsuite/gdb.ada/packed_record.exp               | 2 +-
 gdb/testsuite/gdb.ada/packed_tagged.exp               | 2 +-
 gdb/testsuite/gdb.ada/pckd_arr_ren.exp                | 2 +-
 gdb/testsuite/gdb.ada/pckd_neg.exp                    | 2 +-
 gdb/testsuite/gdb.ada/pkd_arr_elem.exp                | 2 +-
 gdb/testsuite/gdb.ada/pp-rec-component.exp            | 2 +-
 gdb/testsuite/gdb.ada/print_chars.exp                 | 2 +-
 gdb/testsuite/gdb.ada/print_pc.exp                    | 2 +-
 gdb/testsuite/gdb.ada/ptr_typedef.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ptype_arith_binop.exp           | 2 +-
 gdb/testsuite/gdb.ada/ptype_array.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ptype_field.exp                 | 2 +-
 gdb/testsuite/gdb.ada/ptype_tagged_param.exp          | 2 +-
 gdb/testsuite/gdb.ada/ptype_union.exp                 | 2 +-
 gdb/testsuite/gdb.ada/py_range.exp                    | 2 +-
 gdb/testsuite/gdb.ada/py_taft.exp                     | 2 +-
 gdb/testsuite/gdb.ada/rdv_wait.exp                    | 2 +-
 gdb/testsuite/gdb.ada/rec_comp.exp                    | 2 +-
 gdb/testsuite/gdb.ada/rec_ptype.exp                   | 2 +-
 gdb/testsuite/gdb.ada/rec_return.exp                  | 2 +-
 gdb/testsuite/gdb.ada/ref_param.exp                   | 2 +-
 gdb/testsuite/gdb.ada/ref_tick_size.exp               | 2 +-
 gdb/testsuite/gdb.ada/rename_subscript_param.exp      | 2 +-
 gdb/testsuite/gdb.ada/repeat_dyn.exp                  | 2 +-
 gdb/testsuite/gdb.ada/same_component_name.exp         | 2 +-
 gdb/testsuite/gdb.ada/same_enum.exp                   | 2 +-
 gdb/testsuite/gdb.ada/scalar_storage.exp              | 2 +-
 gdb/testsuite/gdb.ada/scoped_watch.exp                | 2 +-
 gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp            | 2 +-
 gdb/testsuite/gdb.ada/set_wstr.exp                    | 2 +-
 gdb/testsuite/gdb.ada/small_reg_param.exp             | 2 +-
 gdb/testsuite/gdb.ada/start.exp                       | 2 +-
 gdb/testsuite/gdb.ada/str_binop_equal.exp             | 2 +-
 gdb/testsuite/gdb.ada/str_ref_cmp.exp                 | 2 +-
 gdb/testsuite/gdb.ada/str_uninit.exp                  | 2 +-
 gdb/testsuite/gdb.ada/sub_variant.exp                 | 2 +-
 gdb/testsuite/gdb.ada/sym_print_name.exp              | 2 +-
 gdb/testsuite/gdb.ada/taft_type.exp                   | 2 +-
 gdb/testsuite/gdb.ada/tagged.exp                      | 2 +-
 gdb/testsuite/gdb.ada/tagged_access.exp               | 2 +-
 gdb/testsuite/gdb.ada/tagged_not_init.exp             | 2 +-
 gdb/testsuite/gdb.ada/task_bp.exp                     | 2 +-
 gdb/testsuite/gdb.ada/task_switch_in_core.exp         | 2 +-
 gdb/testsuite/gdb.ada/task_watch.exp                  | 2 +-
 gdb/testsuite/gdb.ada/tasks.exp                       | 2 +-
 gdb/testsuite/gdb.ada/tick_last_segv.exp              | 2 +-
 gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp  | 2 +-
 gdb/testsuite/gdb.ada/type_coercion.exp               | 2 +-
 gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp      | 2 +-
 gdb/testsuite/gdb.ada/unchecked_union.exp             | 2 +-
 gdb/testsuite/gdb.ada/uninitialized_vars.exp          | 2 +-
 gdb/testsuite/gdb.ada/unsigned_last.exp               | 2 +-
 gdb/testsuite/gdb.ada/unsigned_range.exp              | 2 +-
 gdb/testsuite/gdb.ada/var_arr_attrs.exp               | 2 +-
 gdb/testsuite/gdb.ada/var_arr_typedef.exp             | 2 +-
 gdb/testsuite/gdb.ada/var_rec_arr.exp                 | 2 +-
 gdb/testsuite/gdb.ada/variant-record.exp              | 2 +-
 gdb/testsuite/gdb.ada/variant.exp                     | 2 +-
 gdb/testsuite/gdb.ada/variant_record_packed_array.exp | 2 +-
 gdb/testsuite/gdb.ada/varsize_limit.exp               | 2 +-
 gdb/testsuite/gdb.ada/vla.exp                         | 2 +-
 gdb/testsuite/gdb.ada/voidctx.exp                     | 2 +-
 gdb/testsuite/gdb.ada/watch_arg.exp                   | 2 +-
 gdb/testsuite/gdb.ada/watch_minus_l.exp               | 2 +-
 gdb/testsuite/gdb.ada/whatis_array_val.exp            | 2 +-
 gdb/testsuite/gdb.ada/widewide.exp                    | 2 +-
 gdb/testsuite/gdb.ada/win_fu_syms.exp                 | 2 +-
 gdb/testsuite/lib/gdb.exp                             | 6 +++---
 203 files changed, 206 insertions(+), 206 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/O2_float_param.exp b/gdb/testsuite/gdb.ada/O2_float_param.exp
index 88ff578d19e..ac6df7e3ab9 100644
--- a/gdb/testsuite/gdb.ada/O2_float_param.exp
+++ b/gdb/testsuite/gdb.ada/O2_float_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/access_tagged_param.exp b/gdb/testsuite/gdb.ada/access_tagged_param.exp
index c9c6b3296d7..c3cc2092e7e 100644
--- a/gdb/testsuite/gdb.ada/access_tagged_param.exp
+++ b/gdb/testsuite/gdb.ada/access_tagged_param.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/access_to_packed_array.exp b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
index 0db9d525910..825968f3e2e 100644
--- a/gdb/testsuite/gdb.ada/access_to_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
index f7924ccf67d..6fc2357e84a 100644
--- a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/addr_arith.exp b/gdb/testsuite/gdb.ada/addr_arith.exp
index 59f66c11089..c82f66ae21a 100644
--- a/gdb/testsuite/gdb.ada/addr_arith.exp
+++ b/gdb/testsuite/gdb.ada/addr_arith.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_na07_019
 
diff --git a/gdb/testsuite/gdb.ada/aliased_array.exp b/gdb/testsuite/gdb.ada/aliased_array.exp
index 6c926c11263..c208e1868a2 100644
--- a/gdb/testsuite/gdb.ada/aliased_array.exp
+++ b/gdb/testsuite/gdb.ada/aliased_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp b/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
index 2cd664eaf38..502a5ab5fd9 100644
--- a/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
+++ b/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile enum_with_gap_main
 
diff --git a/gdb/testsuite/gdb.ada/arr_arr.exp b/gdb/testsuite/gdb.ada/arr_arr.exp
index 93ed4aafc49..a6594e3875d 100644
--- a/gdb/testsuite/gdb.ada/arr_arr.exp
+++ b/gdb/testsuite/gdb.ada/arr_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
index ba89c8a1186..dd817e6e75a 100644
--- a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
+++ b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_q418_043
 
diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp
index ef541f88ec9..daf21efb97d 100644
--- a/gdb/testsuite/gdb.ada/array_bounds.exp
+++ b/gdb/testsuite/gdb.ada/array_bounds.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/array_char_idx.exp b/gdb/testsuite/gdb.ada/array_char_idx.exp
index c94950aeba3..5cae900c8c9 100644
--- a/gdb/testsuite/gdb.ada/array_char_idx.exp
+++ b/gdb/testsuite/gdb.ada/array_char_idx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
index b8295214fe1..418a1a46cb8 100644
--- a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_of_variable_length.exp b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
index 7536f7e2da8..468f6c83cd7 100644
--- a/gdb/testsuite/gdb.ada/array_of_variable_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_of_variant.exp b/gdb/testsuite/gdb.ada/array_of_variant.exp
index 7b7a623bd0a..6110ec69b66 100644
--- a/gdb/testsuite/gdb.ada/array_of_variant.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variant.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib "gdb-python.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
index c64c612ae83..eca3ba30076 100644
--- a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
+++ b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp
index e101323279f..8d0fa029bd5 100644
--- a/gdb/testsuite/gdb.ada/array_return.exp
+++ b/gdb/testsuite/gdb.ada/array_return.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr.exp b/gdb/testsuite/gdb.ada/array_subscript_addr.exp
index 21f56578d1c..793bddb38eb 100644
--- a/gdb/testsuite/gdb.ada/array_subscript_addr.exp
+++ b/gdb/testsuite/gdb.ada/array_subscript_addr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/arraydim.exp b/gdb/testsuite/gdb.ada/arraydim.exp
index 93ea0eb1128..087e2c1e6b7 100644
--- a/gdb/testsuite/gdb.ada/arraydim.exp
+++ b/gdb/testsuite/gdb.ada/arraydim.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arrayidx.exp b/gdb/testsuite/gdb.ada/arrayidx.exp
index daf05827127..d48e245d131 100644
--- a/gdb/testsuite/gdb.ada/arrayidx.exp
+++ b/gdb/testsuite/gdb.ada/arrayidx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/arrayparam.exp b/gdb/testsuite/gdb.ada/arrayparam.exp
index 1f7b1387024..e1171ede4b1 100644
--- a/gdb/testsuite/gdb.ada/arrayparam.exp
+++ b/gdb/testsuite/gdb.ada/arrayparam.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp
index 4e92a110190..fcf9ad53f35 100644
--- a/gdb/testsuite/gdb.ada/arrayptr.exp
+++ b/gdb/testsuite/gdb.ada/arrayptr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/assign_1.exp b/gdb/testsuite/gdb.ada/assign_1.exp
index 2a3e5dae7fa..88ba9a54f40 100644
--- a/gdb/testsuite/gdb.ada/assign_1.exp
+++ b/gdb/testsuite/gdb.ada/assign_1.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.ada/assign_arr.exp b/gdb/testsuite/gdb.ada/assign_arr.exp
index 845a2400c2f..046b104ef23 100644
--- a/gdb/testsuite/gdb.ada/assign_arr.exp
+++ b/gdb/testsuite/gdb.ada/assign_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile main_p324_051
 
diff --git a/gdb/testsuite/gdb.ada/atomic_enum.exp b/gdb/testsuite/gdb.ada/atomic_enum.exp
index a306c416ba8..fd0b0c42cb3 100644
--- a/gdb/testsuite/gdb.ada/atomic_enum.exp
+++ b/gdb/testsuite/gdb.ada/atomic_enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
index aa502f8de9e..90431701def 100644
--- a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
+++ b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile "foo"
 
diff --git a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
index 0ac633a6801..e0b488a597c 100644
--- a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
+++ b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bias.exp b/gdb/testsuite/gdb.ada/bias.exp
index 522461590e0..b3e2269bb95 100644
--- a/gdb/testsuite/gdb.ada/bias.exp
+++ b/gdb/testsuite/gdb.ada/bias.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bias
 
diff --git a/gdb/testsuite/gdb.ada/big_packed_array.exp b/gdb/testsuite/gdb.ada/big_packed_array.exp
index 6b8cbd6f4ba..10ddea96978 100644
--- a/gdb/testsuite/gdb.ada/big_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/big_packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_ra24_010
 
diff --git a/gdb/testsuite/gdb.ada/boolean_expr.exp b/gdb/testsuite/gdb.ada/boolean_expr.exp
index 52977f87257..c3b854fd331 100644
--- a/gdb/testsuite/gdb.ada/boolean_expr.exp
+++ b/gdb/testsuite/gdb.ada/boolean_expr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
index a18513712eb..d87b185c0c3 100644
--- a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
+++ b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
@@ -20,7 +20,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_h731_021
 
diff --git a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
index ac9982b38f5..c7cc8f21112 100644
--- a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
+++ b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/bp_fun_addr.exp b/gdb/testsuite/gdb.ada/bp_fun_addr.exp
index e0a3b52ff79..7cb1471e7ed 100644
--- a/gdb/testsuite/gdb.ada/bp_fun_addr.exp
+++ b/gdb/testsuite/gdb.ada/bp_fun_addr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bp_fun_addr
 
diff --git a/gdb/testsuite/gdb.ada/bp_inlined_func.exp b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
index 9eaba4fec04..03d7a960888 100644
--- a/gdb/testsuite/gdb.ada/bp_inlined_func.exp
+++ b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bp_on_var.exp b/gdb/testsuite/gdb.ada/bp_on_var.exp
index 9f06781d2f1..84e59b3724e 100644
--- a/gdb/testsuite/gdb.ada/bp_on_var.exp
+++ b/gdb/testsuite/gdb.ada/bp_on_var.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bp_range_type.exp b/gdb/testsuite/gdb.ada/bp_range_type.exp
index 4e36edee805..ccde3aebfd5 100644
--- a/gdb/testsuite/gdb.ada/bp_range_type.exp
+++ b/gdb/testsuite/gdb.ada/bp_range_type.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/bp_reset.exp b/gdb/testsuite/gdb.ada/bp_reset.exp
index 21040e5fbab..f5b4230cc85 100644
--- a/gdb/testsuite/gdb.ada/bp_reset.exp
+++ b/gdb/testsuite/gdb.ada/bp_reset.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/byte_packed_arr.exp b/gdb/testsuite/gdb.ada/byte_packed_arr.exp
index 00eb19ce6f7..59f262450ab 100644
--- a/gdb/testsuite/gdb.ada/byte_packed_arr.exp
+++ b/gdb/testsuite/gdb.ada/byte_packed_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile reprod_main
 
diff --git a/gdb/testsuite/gdb.ada/call_pn.exp b/gdb/testsuite/gdb.ada/call_pn.exp
index 21e2a37c28e..2d294a98eed 100644
--- a/gdb/testsuite/gdb.ada/call_pn.exp
+++ b/gdb/testsuite/gdb.ada/call_pn.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp b/gdb/testsuite/gdb.ada/catch_assert_if.exp
index 81ebf33b435..f5b6096ecb0 100644
--- a/gdb/testsuite/gdb.ada/catch_assert_if.exp
+++ b/gdb/testsuite/gdb.ada/catch_assert_if.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bla
 
diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp
index 87583422418..de1e53243fb 100644
--- a/gdb/testsuite/gdb.ada/catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index 7bdbadc0fef..3621b798b7c 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -17,7 +17,7 @@ require !skip_shlib_tests
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_enum.exp b/gdb/testsuite/gdb.ada/char_enum.exp
index 054c2eaa452..d8539159125 100644
--- a/gdb/testsuite/gdb.ada/char_enum.exp
+++ b/gdb/testsuite/gdb.ada/char_enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_enum_overload.exp b/gdb/testsuite/gdb.ada/char_enum_overload.exp
index 66bf25fcb68..3f26bb832ee 100644
--- a/gdb/testsuite/gdb.ada/char_enum_overload.exp
+++ b/gdb/testsuite/gdb.ada/char_enum_overload.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_enum_unicode.exp b/gdb/testsuite/gdb.ada/char_enum_unicode.exp
index 09afb365312..f88834fb2b6 100644
--- a/gdb/testsuite/gdb.ada/char_enum_unicode.exp
+++ b/gdb/testsuite/gdb.ada/char_enum_unicode.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/char_param.exp b/gdb/testsuite/gdb.ada/char_param.exp
index fb5aeb47f6f..63e4f11b63f 100644
--- a/gdb/testsuite/gdb.ada/char_param.exp
+++ b/gdb/testsuite/gdb.ada/char_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp
index 2c4674de70e..57b65466012 100644
--- a/gdb/testsuite/gdb.ada/complete.exp
+++ b/gdb/testsuite/gdb.ada/complete.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/cond_lang.exp b/gdb/testsuite/gdb.ada/cond_lang.exp
index 37ec5a40774..df27e646976 100644
--- a/gdb/testsuite/gdb.ada/cond_lang.exp
+++ b/gdb/testsuite/gdb.ada/cond_lang.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile a
 
diff --git a/gdb/testsuite/gdb.ada/convvar_comp.exp b/gdb/testsuite/gdb.ada/convvar_comp.exp
index 7de4e567967..094391ccab9 100644
--- a/gdb/testsuite/gdb.ada/convvar_comp.exp
+++ b/gdb/testsuite/gdb.ada/convvar_comp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile pb16_063
 
diff --git a/gdb/testsuite/gdb.ada/dgopt.exp b/gdb/testsuite/gdb.ada/dgopt.exp
index 796595bb312..965821978c9 100644
--- a/gdb/testsuite/gdb.ada/dgopt.exp
+++ b/gdb/testsuite/gdb.ada/dgopt.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile x
 
diff --git a/gdb/testsuite/gdb.ada/disc_arr_bound.exp b/gdb/testsuite/gdb.ada/disc_arr_bound.exp
index a5b5527396f..94d0485a23d 100644
--- a/gdb/testsuite/gdb.ada/disc_arr_bound.exp
+++ b/gdb/testsuite/gdb.ada/disc_arr_bound.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_n612_026
 
diff --git a/gdb/testsuite/gdb.ada/discrete-char.exp b/gdb/testsuite/gdb.ada/discrete-char.exp
index 76ec90512d5..0fab02e9bf1 100644
--- a/gdb/testsuite/gdb.ada/discrete-char.exp
+++ b/gdb/testsuite/gdb.ada/discrete-char.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/display_nested.exp b/gdb/testsuite/gdb.ada/display_nested.exp
index 8ff40deffce..f1272b434eb 100644
--- a/gdb/testsuite/gdb.ada/display_nested.exp
+++ b/gdb/testsuite/gdb.ada/display_nested.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dot_all.exp b/gdb/testsuite/gdb.ada/dot_all.exp
index 91751f0d2b2..3ecbad9261a 100644
--- a/gdb/testsuite/gdb.ada/dot_all.exp
+++ b/gdb/testsuite/gdb.ada/dot_all.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
index db6e7c86507..74486317112 100644
--- a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
+++ b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dyn_loc.exp b/gdb/testsuite/gdb.ada/dyn_loc.exp
index 6693b9d05e1..5e656ca8ccf 100644
--- a/gdb/testsuite/gdb.ada/dyn_loc.exp
+++ b/gdb/testsuite/gdb.ada/dyn_loc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/dyn_stride.exp b/gdb/testsuite/gdb.ada/dyn_stride.exp
index 85f2bf03564..736ea90fbc8 100644
--- a/gdb/testsuite/gdb.ada/dyn_stride.exp
+++ b/gdb/testsuite/gdb.ada/dyn_stride.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/dynamic-iface.exp b/gdb/testsuite/gdb.ada/dynamic-iface.exp
index d4d7ba45ab4..431fa29d64f 100644
--- a/gdb/testsuite/gdb.ada/dynamic-iface.exp
+++ b/gdb/testsuite/gdb.ada/dynamic-iface.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 require gnat_runtime_has_debug_info
 
diff --git a/gdb/testsuite/gdb.ada/enum_idx_packed.exp b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
index a4232c75a82..c2d1ebd4f8c 100644
--- a/gdb/testsuite/gdb.ada/enum_idx_packed.exp
+++ b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/enum_qual.exp b/gdb/testsuite/gdb.ada/enum_qual.exp
index 807fd421e20..d74c581c43f 100644
--- a/gdb/testsuite/gdb.ada/enum_qual.exp
+++ b/gdb/testsuite/gdb.ada/enum_qual.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile qual
 
diff --git a/gdb/testsuite/gdb.ada/enums_overload.exp b/gdb/testsuite/gdb.ada/enums_overload.exp
index cb77f50620e..6fe232bc2a0 100644
--- a/gdb/testsuite/gdb.ada/enums_overload.exp
+++ b/gdb/testsuite/gdb.ada/enums_overload.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile enums_overload_main
 
diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp
index f02680ffd86..f8a6ded2cdf 100644
--- a/gdb/testsuite/gdb.ada/excep_handle.exp
+++ b/gdb/testsuite/gdb.ada/excep_handle.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp
index 1580077bb77..9e69d136e31 100644
--- a/gdb/testsuite/gdb.ada/exec_changed.exp
+++ b/gdb/testsuite/gdb.ada/exec_changed.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
diff --git a/gdb/testsuite/gdb.ada/expr_delims.exp b/gdb/testsuite/gdb.ada/expr_delims.exp
index 951cc7944e5..6301a5673c0 100644
--- a/gdb/testsuite/gdb.ada/expr_delims.exp
+++ b/gdb/testsuite/gdb.ada/expr_delims.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/expr_with_funcall.exp b/gdb/testsuite/gdb.ada/expr_with_funcall.exp
index 58e9577b4db..0e2b8deaf23 100644
--- a/gdb/testsuite/gdb.ada/expr_with_funcall.exp
+++ b/gdb/testsuite/gdb.ada/expr_with_funcall.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile expr_r821_013
 
diff --git a/gdb/testsuite/gdb.ada/exprs.exp b/gdb/testsuite/gdb.ada/exprs.exp
index a2da1f0f2d8..991baced120 100644
--- a/gdb/testsuite/gdb.ada/exprs.exp
+++ b/gdb/testsuite/gdb.ada/exprs.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/fin_fun_out.exp b/gdb/testsuite/gdb.ada/fin_fun_out.exp
index b5d3774e2d1..2020b3668f5 100644
--- a/gdb/testsuite/gdb.ada/fin_fun_out.exp
+++ b/gdb/testsuite/gdb.ada/fin_fun_out.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_o525_013
 
diff --git a/gdb/testsuite/gdb.ada/finish-var-size.exp b/gdb/testsuite/gdb.ada/finish-var-size.exp
index aab3fd6474e..c1cf6406433 100644
--- a/gdb/testsuite/gdb.ada/finish-var-size.exp
+++ b/gdb/testsuite/gdb.ada/finish-var-size.exp
@@ -1,4 +1,4 @@
-# Copyright 2022 Free Software Foundation, Inc.
+# Copyright 2022, 2023 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-if { [skip_ada_tests] } { return -1 }
+require allow_ada_tests
 
 # GCC 12 has the needed fix.
 if {![test_compiler_info {gcc-1[2-9]-*}]} {
diff --git a/gdb/testsuite/gdb.ada/fixed_cmp.exp b/gdb/testsuite/gdb.ada/fixed_cmp.exp
index f15e2c83fcc..4032d8dced6 100644
--- a/gdb/testsuite/gdb.ada/fixed_cmp.exp
+++ b/gdb/testsuite/gdb.ada/fixed_cmp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile fixed
 
diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp
index bcc1bbe935a..ed61cab4bec 100644
--- a/gdb/testsuite/gdb.ada/fixed_points.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile fixed_points
 
diff --git a/gdb/testsuite/gdb.ada/fixed_points_function.exp b/gdb/testsuite/gdb.ada/fixed_points_function.exp
index d038fa1ea54..859a9e175ad 100644
--- a/gdb/testsuite/gdb.ada/fixed_points_function.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points_function.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile fixed_points_function
 
diff --git a/gdb/testsuite/gdb.ada/float-bits.exp b/gdb/testsuite/gdb.ada/float-bits.exp
index 7edd117d829..ab00e676c98 100644
--- a/gdb/testsuite/gdb.ada/float-bits.exp
+++ b/gdb/testsuite/gdb.ada/float-bits.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile prog
 
diff --git a/gdb/testsuite/gdb.ada/float_param.exp b/gdb/testsuite/gdb.ada/float_param.exp
index 8d4b8cf2da2..cec825c84f5 100644
--- a/gdb/testsuite/gdb.ada/float_param.exp
+++ b/gdb/testsuite/gdb.ada/float_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp
index e02bd4c1ffa..4ad9bed8b5b 100644
--- a/gdb/testsuite/gdb.ada/formatted_ref.exp
+++ b/gdb/testsuite/gdb.ada/formatted_ref.exp
@@ -26,7 +26,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile formatted_ref
 
diff --git a/gdb/testsuite/gdb.ada/frame_arg_lang.exp b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
index f6e9ab570c6..d94b07d675f 100644
--- a/gdb/testsuite/gdb.ada/frame_arg_lang.exp
+++ b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bla
 set cfile "foo"
diff --git a/gdb/testsuite/gdb.ada/frame_args.exp b/gdb/testsuite/gdb.ada/frame_args.exp
index 476b9cdf5d0..baaf5181121 100644
--- a/gdb/testsuite/gdb.ada/frame_args.exp
+++ b/gdb/testsuite/gdb.ada/frame_args.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fullname_bp.exp b/gdb/testsuite/gdb.ada/fullname_bp.exp
index 470bf440edd..8c5854d6e88 100644
--- a/gdb/testsuite/gdb.ada/fullname_bp.exp
+++ b/gdb/testsuite/gdb.ada/fullname_bp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_addr.exp b/gdb/testsuite/gdb.ada/fun_addr.exp
index a0147f5b3ee..1f933394838 100644
--- a/gdb/testsuite/gdb.ada/fun_addr.exp
+++ b/gdb/testsuite/gdb.ada/fun_addr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_in_declare.exp b/gdb/testsuite/gdb.ada/fun_in_declare.exp
index 000bc4f1174..eff76a5a6c7 100644
--- a/gdb/testsuite/gdb.ada/fun_in_declare.exp
+++ b/gdb/testsuite/gdb.ada/fun_in_declare.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_overload_menu.exp b/gdb/testsuite/gdb.ada/fun_overload_menu.exp
index 76a983f1aeb..d5ca492dd39 100644
--- a/gdb/testsuite/gdb.ada/fun_overload_menu.exp
+++ b/gdb/testsuite/gdb.ada/fun_overload_menu.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/fun_renaming.exp b/gdb/testsuite/gdb.ada/fun_renaming.exp
index 87da2f168ad..b1789de01a0 100644
--- a/gdb/testsuite/gdb.ada/fun_renaming.exp
+++ b/gdb/testsuite/gdb.ada/fun_renaming.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile fun_renaming
 
diff --git a/gdb/testsuite/gdb.ada/funcall_char.exp b/gdb/testsuite/gdb.ada/funcall_char.exp
index c8ba2fbb538..c641fe2631c 100644
--- a/gdb/testsuite/gdb.ada/funcall_char.exp
+++ b/gdb/testsuite/gdb.ada/funcall_char.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/funcall_param.exp b/gdb/testsuite/gdb.ada/funcall_param.exp
index 97d1e7fd2ef..20d5cde0c00 100644
--- a/gdb/testsuite/gdb.ada/funcall_param.exp
+++ b/gdb/testsuite/gdb.ada/funcall_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/funcall_ptr.exp b/gdb/testsuite/gdb.ada/funcall_ptr.exp
index 6684381a6c2..4ca2b811368 100644
--- a/gdb/testsuite/gdb.ada/funcall_ptr.exp
+++ b/gdb/testsuite/gdb.ada/funcall_ptr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/funcall_ref.exp b/gdb/testsuite/gdb.ada/funcall_ref.exp
index 09a95089b16..94b1d6cd69f 100644
--- a/gdb/testsuite/gdb.ada/funcall_ref.exp
+++ b/gdb/testsuite/gdb.ada/funcall_ref.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ghost.exp b/gdb/testsuite/gdb.ada/ghost.exp
index feee5cfc52b..b2daca7c25b 100644
--- a/gdb/testsuite/gdb.ada/ghost.exp
+++ b/gdb/testsuite/gdb.ada/ghost.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/homonym.exp b/gdb/testsuite/gdb.ada/homonym.exp
index 8e4bd644ae3..88a0e2bc8b9 100644
--- a/gdb/testsuite/gdb.ada/homonym.exp
+++ b/gdb/testsuite/gdb.ada/homonym.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile homonym_main
 
diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
index d09ba8c9656..4f09261b336 100644
--- a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
+++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/info_auto_lang.exp b/gdb/testsuite/gdb.ada/info_auto_lang.exp
index 2451e7babb7..5202605b731 100644
--- a/gdb/testsuite/gdb.ada/info_auto_lang.exp
+++ b/gdb/testsuite/gdb.ada/info_auto_lang.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 # This test verifies that the commands
 #   info [functions|variables|types]
diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp
index ae08a9444d8..2c90627801a 100644
--- a/gdb/testsuite/gdb.ada/info_exc.exp
+++ b/gdb/testsuite/gdb.ada/info_exc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/info_locals_renaming.exp b/gdb/testsuite/gdb.ada/info_locals_renaming.exp
index 8d78e0eae56..d399ec803c4 100644
--- a/gdb/testsuite/gdb.ada/info_locals_renaming.exp
+++ b/gdb/testsuite/gdb.ada/info_locals_renaming.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/info_types.exp b/gdb/testsuite/gdb.ada/info_types.exp
index cbb6f1309db..2e1f51a6e4d 100644
--- a/gdb/testsuite/gdb.ada/info_types.exp
+++ b/gdb/testsuite/gdb.ada/info_types.exp
@@ -13,7 +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/>.
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.ada/inline-section-gc.exp b/gdb/testsuite/gdb.ada/inline-section-gc.exp
index c015493cc7f..b707335eb04 100644
--- a/gdb/testsuite/gdb.ada/inline-section-gc.exp
+++ b/gdb/testsuite/gdb.ada/inline-section-gc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile caller
 
diff --git a/gdb/testsuite/gdb.ada/int_deref.exp b/gdb/testsuite/gdb.ada/int_deref.exp
index 3b66877b1e5..ef46e12d0aa 100644
--- a/gdb/testsuite/gdb.ada/int_deref.exp
+++ b/gdb/testsuite/gdb.ada/int_deref.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp
index 93a0bd5e8b6..aa1abc78d38 100644
--- a/gdb/testsuite/gdb.ada/interface.exp
+++ b/gdb/testsuite/gdb.ada/interface.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 require gnat_runtime_has_debug_info
 
diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp
index 40c45d88117..8915852e4e3 100644
--- a/gdb/testsuite/gdb.ada/iwide.exp
+++ b/gdb/testsuite/gdb.ada/iwide.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 require gnat_runtime_has_debug_info
 
diff --git a/gdb/testsuite/gdb.ada/lang_switch.exp b/gdb/testsuite/gdb.ada/lang_switch.exp
index 63cfa74ad45..a2ae41bc9fb 100644
--- a/gdb/testsuite/gdb.ada/lang_switch.exp
+++ b/gdb/testsuite/gdb.ada/lang_switch.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile lang_switch
 set cfile "foo"
diff --git a/gdb/testsuite/gdb.ada/length_cond.exp b/gdb/testsuite/gdb.ada/length_cond.exp
index a075e520601..86d33fd38c6 100644
--- a/gdb/testsuite/gdb.ada/length_cond.exp
+++ b/gdb/testsuite/gdb.ada/length_cond.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile length_cond
 
diff --git a/gdb/testsuite/gdb.ada/literals.exp b/gdb/testsuite/gdb.ada/literals.exp
index 158dd44ccd8..84023a5501f 100644
--- a/gdb/testsuite/gdb.ada/literals.exp
+++ b/gdb/testsuite/gdb.ada/literals.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 clean_restart
 
diff --git a/gdb/testsuite/gdb.ada/local-enum.exp b/gdb/testsuite/gdb.ada/local-enum.exp
index 5fd01166ea6..dc01b0ce5eb 100644
--- a/gdb/testsuite/gdb.ada/local-enum.exp
+++ b/gdb/testsuite/gdb.ada/local-enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile local
 
diff --git a/gdb/testsuite/gdb.ada/maint_with_ada.exp b/gdb/testsuite/gdb.ada/maint_with_ada.exp
index d029a1da57b..4b9b04b0a00 100644
--- a/gdb/testsuite/gdb.ada/maint_with_ada.exp
+++ b/gdb/testsuite/gdb.ada/maint_with_ada.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile var_arr_typedef
 
diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
index 4267eac0010..e0d5439dc26 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bla
 
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index 8e10d37562b..6a0f94a5f87 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
index 652c7d72609..d699f5fa30b 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
index 6f1282adeb4..8b81706e122 100644
--- a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
+++ b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_ex_cond.exp b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
index 5b99b472a36..6fba4da9e80 100644
--- a/gdb/testsuite/gdb.ada/mi_ex_cond.exp
+++ b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp
index a21055b3fb1..91636b56bc2 100644
--- a/gdb/testsuite/gdb.ada/mi_exc_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp
index 50e6df7851f..ed1215a3922 100644
--- a/gdb/testsuite/gdb.ada/mi_interface.exp
+++ b/gdb/testsuite/gdb.ada/mi_interface.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 require gnat_runtime_has_debug_info
 
diff --git a/gdb/testsuite/gdb.ada/mi_prot.exp b/gdb/testsuite/gdb.ada/mi_prot.exp
index 430ae072386..42ca90d807b 100644
--- a/gdb/testsuite/gdb.ada/mi_prot.exp
+++ b/gdb/testsuite/gdb.ada/mi_prot.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 if { ![gnatmake_version_at_least 8] } {
     return -1
diff --git a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
index c51b1d49265..921d9f3a569 100644
--- a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
+++ b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_rb20_056
 
diff --git a/gdb/testsuite/gdb.ada/mi_string_access.exp b/gdb/testsuite/gdb.ada/mi_string_access.exp
index 1c84c267220..d4e1756b3ab 100644
--- a/gdb/testsuite/gdb.ada/mi_string_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_string_access.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp
index 4e5086a690a..771e9345c40 100644
--- a/gdb/testsuite/gdb.ada/mi_task_arg.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile task_switch
 
diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp
index b9768b08ec0..7701a3ef6d6 100644
--- a/gdb/testsuite/gdb.ada/mi_task_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_info.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile task_switch
 
diff --git a/gdb/testsuite/gdb.ada/mi_var_access.exp b/gdb/testsuite/gdb.ada/mi_var_access.exp
index ab4ad3f6c02..e16dc184658 100644
--- a/gdb/testsuite/gdb.ada/mi_var_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_access.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile mi_access
 
diff --git a/gdb/testsuite/gdb.ada/mi_var_array.exp b/gdb/testsuite/gdb.ada/mi_var_array.exp
index 1dcae8c35e3..5952babc155 100644
--- a/gdb/testsuite/gdb.ada/mi_var_array.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/mi_var_union.exp b/gdb/testsuite/gdb.ada/mi_var_union.exp
index b888b642931..078e00c07da 100644
--- a/gdb/testsuite/gdb.ada/mi_var_union.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_union.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bar
 
diff --git a/gdb/testsuite/gdb.ada/mi_variant.exp b/gdb/testsuite/gdb.ada/mi_variant.exp
index 78714f28d03..cda22092c40 100644
--- a/gdb/testsuite/gdb.ada/mi_variant.exp
+++ b/gdb/testsuite/gdb.ada/mi_variant.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib "gdb-python.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile pkg
 
diff --git a/gdb/testsuite/gdb.ada/minsyms.exp b/gdb/testsuite/gdb.ada/minsyms.exp
index da87483c025..70f7d772600 100644
--- a/gdb/testsuite/gdb.ada/minsyms.exp
+++ b/gdb/testsuite/gdb.ada/minsyms.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_qb07_057
 
diff --git a/gdb/testsuite/gdb.ada/mod_from_name.exp b/gdb/testsuite/gdb.ada/mod_from_name.exp
index b23416558b3..a86598b430f 100644
--- a/gdb/testsuite/gdb.ada/mod_from_name.exp
+++ b/gdb/testsuite/gdb.ada/mod_from_name.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/multiarray.exp b/gdb/testsuite/gdb.ada/multiarray.exp
index 281a7155be1..9b4c2922ffb 100644
--- a/gdb/testsuite/gdb.ada/multiarray.exp
+++ b/gdb/testsuite/gdb.ada/multiarray.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/n_arr_bound.exp b/gdb/testsuite/gdb.ada/n_arr_bound.exp
index c296a9f9950..6f72293aee6 100644
--- a/gdb/testsuite/gdb.ada/n_arr_bound.exp
+++ b/gdb/testsuite/gdb.ada/n_arr_bound.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/nested.exp b/gdb/testsuite/gdb.ada/nested.exp
index 6fb7f8918c5..8ec87981a49 100644
--- a/gdb/testsuite/gdb.ada/nested.exp
+++ b/gdb/testsuite/gdb.ada/nested.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile hello
 
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
index eec03eb7216..3cdf53dcdfc 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 # Enable basic use of UTF-8.  LC_ALL gets reset for each testfile.  We
 # want this despite the program itself using Latin-1, as this test is
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
index 196ebb416fd..5b5ae292177 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 # Enable basic use of UTF-8.  LC_ALL gets reset for each testfile.  We
 # want this despite the program itself using Latin-1, as this test is
diff --git a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
index cd4b2cda664..c1211619ca8 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 # Enable basic use of UTF-8.  LC_ALL gets reset for each testfile.
 setenv LC_ALL C.UTF-8
diff --git a/gdb/testsuite/gdb.ada/notcplusplus.exp b/gdb/testsuite/gdb.ada/notcplusplus.exp
index 1101eafebd2..318d6e8a2d2 100644
--- a/gdb/testsuite/gdb.ada/notcplusplus.exp
+++ b/gdb/testsuite/gdb.ada/notcplusplus.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/null_array.exp b/gdb/testsuite/gdb.ada/null_array.exp
index 8995480bcc6..8c1aa1f7eb2 100644
--- a/gdb/testsuite/gdb.ada/null_array.exp
+++ b/gdb/testsuite/gdb.ada/null_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/null_overload.exp b/gdb/testsuite/gdb.ada/null_overload.exp
index 8731c5788b1..7ba988fbd5b 100644
--- a/gdb/testsuite/gdb.ada/null_overload.exp
+++ b/gdb/testsuite/gdb.ada/null_overload.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp
index 7f0148b31db..17bf1f5728f 100644
--- a/gdb/testsuite/gdb.ada/null_record.exp
+++ b/gdb/testsuite/gdb.ada/null_record.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile null_record
 
diff --git a/gdb/testsuite/gdb.ada/operator_bp.exp b/gdb/testsuite/gdb.ada/operator_bp.exp
index 9a8a0abf684..555582ae385 100644
--- a/gdb/testsuite/gdb.ada/operator_bp.exp
+++ b/gdb/testsuite/gdb.ada/operator_bp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile ops_test
 
diff --git a/gdb/testsuite/gdb.ada/operator_call.exp b/gdb/testsuite/gdb.ada/operator_call.exp
index 8a0d3573a32..1a044cc5b99 100644
--- a/gdb/testsuite/gdb.ada/operator_call.exp
+++ b/gdb/testsuite/gdb.ada/operator_call.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile opcall
 
diff --git a/gdb/testsuite/gdb.ada/optim_drec.exp b/gdb/testsuite/gdb.ada/optim_drec.exp
index 5026eb9b1bd..e3848c83494 100644
--- a/gdb/testsuite/gdb.ada/optim_drec.exp
+++ b/gdb/testsuite/gdb.ada/optim_drec.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
index 8aa32f53050..d14b1e70e64 100644
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_o224_021
 
diff --git a/gdb/testsuite/gdb.ada/overload_menu_crash.exp b/gdb/testsuite/gdb.ada/overload_menu_crash.exp
index 366cf502afb..5ef28fb663d 100644
--- a/gdb/testsuite/gdb.ada/overload_menu_crash.exp
+++ b/gdb/testsuite/gdb.ada/overload_menu_crash.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
index 19babffed9d..fcfa694647d 100644
--- a/gdb/testsuite/gdb.ada/packed_array.exp
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile pa
 
diff --git a/gdb/testsuite/gdb.ada/packed_array_assign.exp b/gdb/testsuite/gdb.ada/packed_array_assign.exp
index 7da413a8765..1ccade7dbaa 100644
--- a/gdb/testsuite/gdb.ada/packed_array_assign.exp
+++ b/gdb/testsuite/gdb.ada/packed_array_assign.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile tester
 
diff --git a/gdb/testsuite/gdb.ada/packed_record.exp b/gdb/testsuite/gdb.ada/packed_record.exp
index c4eee31a137..88b58fafbc0 100644
--- a/gdb/testsuite/gdb.ada/packed_record.exp
+++ b/gdb/testsuite/gdb.ada/packed_record.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile pr
 
diff --git a/gdb/testsuite/gdb.ada/packed_tagged.exp b/gdb/testsuite/gdb.ada/packed_tagged.exp
index 5c7558f8589..333f3bf1496 100644
--- a/gdb/testsuite/gdb.ada/packed_tagged.exp
+++ b/gdb/testsuite/gdb.ada/packed_tagged.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile comp_bug
 
diff --git a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
index 7d9cc335b04..e886624b0c6 100644
--- a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
+++ b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/pckd_neg.exp b/gdb/testsuite/gdb.ada/pckd_neg.exp
index 3b6bbfe1ce9..4dc33229531 100644
--- a/gdb/testsuite/gdb.ada/pckd_neg.exp
+++ b/gdb/testsuite/gdb.ada/pckd_neg.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_o508_021
 
diff --git a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
index 13fc8f0f585..576cc99a767 100644
--- a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
+++ b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile failure
 
diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp
index b57bde330cf..c77ee59bf37 100644
--- a/gdb/testsuite/gdb.ada/pp-rec-component.exp
+++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests !skip_python_tests
+require allow_ada_tests !skip_python_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/print_chars.exp b/gdb/testsuite/gdb.ada/print_chars.exp
index 6c1d8cb2d68..d51b98d37ab 100644
--- a/gdb/testsuite/gdb.ada/print_chars.exp
+++ b/gdb/testsuite/gdb.ada/print_chars.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/print_pc.exp b/gdb/testsuite/gdb.ada/print_pc.exp
index 150c45fd8ff..75dcff771f5 100644
--- a/gdb/testsuite/gdb.ada/print_pc.exp
+++ b/gdb/testsuite/gdb.ada/print_pc.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile dummy start
 
diff --git a/gdb/testsuite/gdb.ada/ptr_typedef.exp b/gdb/testsuite/gdb.ada/ptr_typedef.exp
index 1adaa844be4..b693022a158 100644
--- a/gdb/testsuite/gdb.ada/ptr_typedef.exp
+++ b/gdb/testsuite/gdb.ada/ptr_typedef.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
index a775ff2754a..19b85bfd4e1 100644
--- a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
+++ b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
@@ -13,7 +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/>.
 
-require !skip_ada_tests
+require allow_ada_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.ada/ptype_array.exp b/gdb/testsuite/gdb.ada/ptype_array.exp
index 3e4e55e5db6..a0ad861fb5b 100644
--- a/gdb/testsuite/gdb.ada/ptype_array.exp
+++ b/gdb/testsuite/gdb.ada/ptype_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_field.exp b/gdb/testsuite/gdb.ada/ptype_field.exp
index c6a1fb3aa28..5d906802808 100644
--- a/gdb/testsuite/gdb.ada/ptype_field.exp
+++ b/gdb/testsuite/gdb.ada/ptype_field.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
index c282341583a..0050d60a0f2 100644
--- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
+++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ptype_union.exp b/gdb/testsuite/gdb.ada/ptype_union.exp
index b1545a44f20..ae87cb1baa9 100644
--- a/gdb/testsuite/gdb.ada/ptype_union.exp
+++ b/gdb/testsuite/gdb.ada/ptype_union.exp
@@ -13,7 +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/>.
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp
index b2c91fb4e3c..83474b459c9 100644
--- a/gdb/testsuite/gdb.ada/py_range.exp
+++ b/gdb/testsuite/gdb.ada/py_range.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require !skip_ada_tests !skip_python_tests
+require allow_ada_tests !skip_python_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/py_taft.exp b/gdb/testsuite/gdb.ada/py_taft.exp
index 543bc728e3c..97c33e47da3 100644
--- a/gdb/testsuite/gdb.ada/py_taft.exp
+++ b/gdb/testsuite/gdb.ada/py_taft.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require !skip_ada_tests !skip_python_tests
+require allow_ada_tests !skip_python_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/rdv_wait.exp b/gdb/testsuite/gdb.ada/rdv_wait.exp
index de60c98d975..bb296d79350 100644
--- a/gdb/testsuite/gdb.ada/rdv_wait.exp
+++ b/gdb/testsuite/gdb.ada/rdv_wait.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/rec_comp.exp b/gdb/testsuite/gdb.ada/rec_comp.exp
index ded69c8b0e0..0494c1de957 100644
--- a/gdb/testsuite/gdb.ada/rec_comp.exp
+++ b/gdb/testsuite/gdb.ada/rec_comp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile bar_o203_012
 
diff --git a/gdb/testsuite/gdb.ada/rec_ptype.exp b/gdb/testsuite/gdb.ada/rec_ptype.exp
index 9662628ccbe..b8a76d835c9 100644
--- a/gdb/testsuite/gdb.ada/rec_ptype.exp
+++ b/gdb/testsuite/gdb.ada/rec_ptype.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/rec_return.exp b/gdb/testsuite/gdb.ada/rec_return.exp
index 253a33a7c51..672b9cbda0a 100644
--- a/gdb/testsuite/gdb.ada/rec_return.exp
+++ b/gdb/testsuite/gdb.ada/rec_return.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ref_param.exp b/gdb/testsuite/gdb.ada/ref_param.exp
index f919ef624c6..095e5110e71 100644
--- a/gdb/testsuite/gdb.ada/ref_param.exp
+++ b/gdb/testsuite/gdb.ada/ref_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/ref_tick_size.exp b/gdb/testsuite/gdb.ada/ref_tick_size.exp
index 9851174ca18..bad0b982058 100644
--- a/gdb/testsuite/gdb.ada/ref_tick_size.exp
+++ b/gdb/testsuite/gdb.ada/ref_tick_size.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
index ae227b2ca89..df5c9b26982 100644
--- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp
+++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 if { ![gnatmake_version_at_least 8] } {
     return -1
diff --git a/gdb/testsuite/gdb.ada/repeat_dyn.exp b/gdb/testsuite/gdb.ada/repeat_dyn.exp
index ca380083410..655b78e75b8 100644
--- a/gdb/testsuite/gdb.ada/repeat_dyn.exp
+++ b/gdb/testsuite/gdb.ada/repeat_dyn.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_oc22_002
 
diff --git a/gdb/testsuite/gdb.ada/same_component_name.exp b/gdb/testsuite/gdb.ada/same_component_name.exp
index ccaae44616f..ded4c826cd8 100644
--- a/gdb/testsuite/gdb.ada/same_component_name.exp
+++ b/gdb/testsuite/gdb.ada/same_component_name.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/same_enum.exp b/gdb/testsuite/gdb.ada/same_enum.exp
index 847fe146d46..e476c271338 100644
--- a/gdb/testsuite/gdb.ada/same_enum.exp
+++ b/gdb/testsuite/gdb.ada/same_enum.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile a
 
diff --git a/gdb/testsuite/gdb.ada/scalar_storage.exp b/gdb/testsuite/gdb.ada/scalar_storage.exp
index f6c038b29cf..1c60774a13f 100644
--- a/gdb/testsuite/gdb.ada/scalar_storage.exp
+++ b/gdb/testsuite/gdb.ada/scalar_storage.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile storage
 
diff --git a/gdb/testsuite/gdb.ada/scoped_watch.exp b/gdb/testsuite/gdb.ada/scoped_watch.exp
index 9d49d389509..3e86e9cc834 100644
--- a/gdb/testsuite/gdb.ada/scoped_watch.exp
+++ b/gdb/testsuite/gdb.ada/scoped_watch.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_p708_025
 
diff --git a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
index 37bb7d04e24..3c4caa6950d 100644
--- a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
+++ b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/set_wstr.exp b/gdb/testsuite/gdb.ada/set_wstr.exp
index 2265df31c6b..9996e0d1594 100644
--- a/gdb/testsuite/gdb.ada/set_wstr.exp
+++ b/gdb/testsuite/gdb.ada/set_wstr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile a
 
diff --git a/gdb/testsuite/gdb.ada/small_reg_param.exp b/gdb/testsuite/gdb.ada/small_reg_param.exp
index 02467ab12c7..534c858c0fc 100644
--- a/gdb/testsuite/gdb.ada/small_reg_param.exp
+++ b/gdb/testsuite/gdb.ada/small_reg_param.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp
index 212d837f05f..20870652266 100644
--- a/gdb/testsuite/gdb.ada/start.exp
+++ b/gdb/testsuite/gdb.ada/start.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
diff --git a/gdb/testsuite/gdb.ada/str_binop_equal.exp b/gdb/testsuite/gdb.ada/str_binop_equal.exp
index 04ee2dc53df..f3c8a348d82 100644
--- a/gdb/testsuite/gdb.ada/str_binop_equal.exp
+++ b/gdb/testsuite/gdb.ada/str_binop_equal.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_p211_061
 
diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp
index 59fa89baab4..dda9f818212 100644
--- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp
+++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/str_uninit.exp b/gdb/testsuite/gdb.ada/str_uninit.exp
index 03f40abc110..bce161a0863 100644
--- a/gdb/testsuite/gdb.ada/str_uninit.exp
+++ b/gdb/testsuite/gdb.ada/str_uninit.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile parse
 
diff --git a/gdb/testsuite/gdb.ada/sub_variant.exp b/gdb/testsuite/gdb.ada/sub_variant.exp
index 578145086a2..a9cd8ee498f 100644
--- a/gdb/testsuite/gdb.ada/sub_variant.exp
+++ b/gdb/testsuite/gdb.ada/sub_variant.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile subv
 
diff --git a/gdb/testsuite/gdb.ada/sym_print_name.exp b/gdb/testsuite/gdb.ada/sym_print_name.exp
index ef6dc360b33..dfc03fce1b3 100644
--- a/gdb/testsuite/gdb.ada/sym_print_name.exp
+++ b/gdb/testsuite/gdb.ada/sym_print_name.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/taft_type.exp b/gdb/testsuite/gdb.ada/taft_type.exp
index fca67ef191c..e3b39ac2b5d 100644
--- a/gdb/testsuite/gdb.ada/taft_type.exp
+++ b/gdb/testsuite/gdb.ada/taft_type.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp
index 319252922af..f45a6509da5 100644
--- a/gdb/testsuite/gdb.ada/tagged.exp
+++ b/gdb/testsuite/gdb.ada/tagged.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 require gnat_runtime_has_debug_info
 
diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp
index 69eb6702b25..438858ffb96 100644
--- a/gdb/testsuite/gdb.ada/tagged_access.exp
+++ b/gdb/testsuite/gdb.ada/tagged_access.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 require gnat_runtime_has_debug_info
 
diff --git a/gdb/testsuite/gdb.ada/tagged_not_init.exp b/gdb/testsuite/gdb.ada/tagged_not_init.exp
index 2d84f49d8de..18cae1a9adc 100644
--- a/gdb/testsuite/gdb.ada/tagged_not_init.exp
+++ b/gdb/testsuite/gdb.ada/tagged_not_init.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/task_bp.exp b/gdb/testsuite/gdb.ada/task_bp.exp
index e2ccac08619..4e70db52711 100644
--- a/gdb/testsuite/gdb.ada/task_bp.exp
+++ b/gdb/testsuite/gdb.ada/task_bp.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/task_switch_in_core.exp b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
index 317f602cde3..c2869719111 100644
--- a/gdb/testsuite/gdb.ada/task_switch_in_core.exp
+++ b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile crash
 
diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp
index a8f8b13a37b..fc8319e271c 100644
--- a/gdb/testsuite/gdb.ada/task_watch.exp
+++ b/gdb/testsuite/gdb.ada/task_watch.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 require !skip_hw_watchpoint_tests
 
diff --git a/gdb/testsuite/gdb.ada/tasks.exp b/gdb/testsuite/gdb.ada/tasks.exp
index 32b8969c61b..a9b58f20cf6 100644
--- a/gdb/testsuite/gdb.ada/tasks.exp
+++ b/gdb/testsuite/gdb.ada/tasks.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/tick_last_segv.exp b/gdb/testsuite/gdb.ada/tick_last_segv.exp
index 76fb95e8f1b..f3d60b3b64c 100644
--- a/gdb/testsuite/gdb.ada/tick_last_segv.exp
+++ b/gdb/testsuite/gdb.ada/tick_last_segv.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
index 41f497cebf6..e830998eb5a 100644
--- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
+++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_n207_004
 
diff --git a/gdb/testsuite/gdb.ada/type_coercion.exp b/gdb/testsuite/gdb.ada/type_coercion.exp
index fed32648154..1283032e6c4 100644
--- a/gdb/testsuite/gdb.ada/type_coercion.exp
+++ b/gdb/testsuite/gdb.ada/type_coercion.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile assign
 
diff --git a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
index 4c86a6b6c12..70edcdf1484 100644
--- a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
+++ b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/unchecked_union.exp b/gdb/testsuite/gdb.ada/unchecked_union.exp
index 401682f590e..d6ad207d0f7 100644
--- a/gdb/testsuite/gdb.ada/unchecked_union.exp
+++ b/gdb/testsuite/gdb.ada/unchecked_union.exp
@@ -17,7 +17,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile unchecked_union
 
diff --git a/gdb/testsuite/gdb.ada/uninitialized_vars.exp b/gdb/testsuite/gdb.ada/uninitialized_vars.exp
index a19bf50b78a..f01323f50a3 100644
--- a/gdb/testsuite/gdb.ada/uninitialized_vars.exp
+++ b/gdb/testsuite/gdb.ada/uninitialized_vars.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile parse
 
diff --git a/gdb/testsuite/gdb.ada/unsigned_last.exp b/gdb/testsuite/gdb.ada/unsigned_last.exp
index c9ff78bf73b..984dc343f9a 100644
--- a/gdb/testsuite/gdb.ada/unsigned_last.exp
+++ b/gdb/testsuite/gdb.ada/unsigned_last.exp
@@ -18,7 +18,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/unsigned_range.exp b/gdb/testsuite/gdb.ada/unsigned_range.exp
index b2c478ff4ff..f6388b03e1b 100644
--- a/gdb/testsuite/gdb.ada/unsigned_range.exp
+++ b/gdb/testsuite/gdb.ada/unsigned_range.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/var_arr_attrs.exp b/gdb/testsuite/gdb.ada/var_arr_attrs.exp
index 5baef49242f..68c1af414d8 100644
--- a/gdb/testsuite/gdb.ada/var_arr_attrs.exp
+++ b/gdb/testsuite/gdb.ada/var_arr_attrs.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_o115_002
 
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef.exp b/gdb/testsuite/gdb.ada/var_arr_typedef.exp
index 3600f382f1d..5014dfe4fae 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef.exp
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile var_arr_typedef
 
diff --git a/gdb/testsuite/gdb.ada/var_rec_arr.exp b/gdb/testsuite/gdb.ada/var_rec_arr.exp
index c3109b34d44..0bc8fbda1a1 100644
--- a/gdb/testsuite/gdb.ada/var_rec_arr.exp
+++ b/gdb/testsuite/gdb.ada/var_rec_arr.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_na09_042
 
diff --git a/gdb/testsuite/gdb.ada/variant-record.exp b/gdb/testsuite/gdb.ada/variant-record.exp
index 1e6b5174e6a..ab3358d2b3d 100644
--- a/gdb/testsuite/gdb.ada/variant-record.exp
+++ b/gdb/testsuite/gdb.ada/variant-record.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile proc
 
diff --git a/gdb/testsuite/gdb.ada/variant.exp b/gdb/testsuite/gdb.ada/variant.exp
index d286e4368a2..414aed6f0d7 100644
--- a/gdb/testsuite/gdb.ada/variant.exp
+++ b/gdb/testsuite/gdb.ada/variant.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib "gdb-python.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile pkg
 
diff --git a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
index 965e748ab09..6395b2966f6 100644
--- a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/varsize_limit.exp b/gdb/testsuite/gdb.ada/varsize_limit.exp
index 0a1ada7e191..ceb0c8594a7 100644
--- a/gdb/testsuite/gdb.ada/varsize_limit.exp
+++ b/gdb/testsuite/gdb.ada/varsize_limit.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile vsizelim
 
diff --git a/gdb/testsuite/gdb.ada/vla.exp b/gdb/testsuite/gdb.ada/vla.exp
index 0f12cbc474f..c8cae065267 100644
--- a/gdb/testsuite/gdb.ada/vla.exp
+++ b/gdb/testsuite/gdb.ada/vla.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile vla
 
diff --git a/gdb/testsuite/gdb.ada/voidctx.exp b/gdb/testsuite/gdb.ada/voidctx.exp
index 2c9af20ea3e..33dbc5cceba 100644
--- a/gdb/testsuite/gdb.ada/voidctx.exp
+++ b/gdb/testsuite/gdb.ada/voidctx.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile voidctx
 
diff --git a/gdb/testsuite/gdb.ada/watch_arg.exp b/gdb/testsuite/gdb.ada/watch_arg.exp
index 2fc6fcedf1c..f3c5187a4fc 100644
--- a/gdb/testsuite/gdb.ada/watch_arg.exp
+++ b/gdb/testsuite/gdb.ada/watch_arg.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile watch
 
diff --git a/gdb/testsuite/gdb.ada/watch_minus_l.exp b/gdb/testsuite/gdb.ada/watch_minus_l.exp
index a17f063bd9f..e2acfde3f88 100644
--- a/gdb/testsuite/gdb.ada/watch_minus_l.exp
+++ b/gdb/testsuite/gdb.ada/watch_minus_l.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo_ra10_006
 
diff --git a/gdb/testsuite/gdb.ada/whatis_array_val.exp b/gdb/testsuite/gdb.ada/whatis_array_val.exp
index 2c2ed842dfa..467290aebbb 100644
--- a/gdb/testsuite/gdb.ada/whatis_array_val.exp
+++ b/gdb/testsuite/gdb.ada/whatis_array_val.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/widewide.exp b/gdb/testsuite/gdb.ada/widewide.exp
index ecf42de6afb..5c5b5a34dc3 100644
--- a/gdb/testsuite/gdb.ada/widewide.exp
+++ b/gdb/testsuite/gdb.ada/widewide.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/win_fu_syms.exp b/gdb/testsuite/gdb.ada/win_fu_syms.exp
index c8a87dd93c4..1cb9323025c 100644
--- a/gdb/testsuite/gdb.ada/win_fu_syms.exp
+++ b/gdb/testsuite/gdb.ada/win_fu_syms.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require !skip_ada_tests
+require allow_ada_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 9f7ec180189..b9be98a6da0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2410,10 +2410,10 @@ proc skip_fortran_tests {} {
     return 0
 }
 
-# Return a 1 if I don't even want to try to test ada.
+# Return a 1 if I want to try to test ada.
 
-proc skip_ada_tests {} {
-    return 0
+proc allow_ada_tests {} {
+    return 1
 }
 
 # Return a 1 if I don't even want to try to test GO.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 54/79] Rename to allow_avx512bf16_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (52 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 53/79] Rename to allow_ada_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 55/79] Rename to allow_avx512fp16_tests Tom Tromey
                   ` (26 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_avx512bf16_tests to invert the sense, and renames it
to allow_avx512bf16_tests.
---
 gdb/testsuite/gdb.arch/x86-avx512bf16.exp |  2 +-
 gdb/testsuite/lib/gdb.exp                 | 24 +++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/x86-avx512bf16.exp b/gdb/testsuite/gdb.arch/x86-avx512bf16.exp
index d77cc088eb5..4ab22a8d0b4 100644
--- a/gdb/testsuite/gdb.arch/x86-avx512bf16.exp
+++ b/gdb/testsuite/gdb.arch/x86-avx512bf16.exp
@@ -18,7 +18,7 @@
 
 # Test bfloat16 support in AVX512 registers
 
-require !skip_avx512bf16_tests
+require allow_avx512bf16_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b9be98a6da0..b68ea4eb5b0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3699,16 +3699,16 @@ gdb_caching_proc skip_tsx_tests {
     return $skip_tsx_tests
 }
 
-# Run a test on the target to see if it supports avx512bf16.  Return 0 if so,
-# 1 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
+# Run a test on the target to see if it supports avx512bf16.  Return 1 if so,
+# 0 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
 
-gdb_caching_proc skip_avx512bf16_tests {
+gdb_caching_proc allow_avx512bf16_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
-    set me "skip_avx512bf16_tests"
+    set me "allow_avx512bf16_tests"
     if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
-        verbose "$me:  target does not support avx512bf16, returning 1" 2
-        return 1
+	verbose "$me:  target does not support avx512bf16, returning 0" 2
+	return 0
     }
 
     # Compile a test program.
@@ -3719,7 +3719,7 @@ gdb_caching_proc skip_avx512bf16_tests {
         }
     }
     if {![gdb_simple_compile $me $src executable]} {
-        return 1
+	return 0
     }
 
     # No error message, compilation succeeded so now run it via gdb.
@@ -3732,22 +3732,22 @@ gdb_caching_proc skip_avx512bf16_tests {
     gdb_expect {
         -re ".*Illegal instruction.*${gdb_prompt} $" {
             verbose -log "$me:  avx512bf16 hardware not detected."
-            set skip_avx512bf16_tests 1
+	    set allow_avx512bf16_tests 0
         }
         -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
             verbose -log "$me:  avx512bf16 hardware detected."
-            set skip_avx512bf16_tests 0
+	    set allow_avx512bf16_tests 1
         }
         default {
             warning "\n$me:  default case taken."
-            set skip_avx512bf16_tests 1
+	    set allow_avx512bf16_tests 0
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_avx512bf16_tests" 2
-    return $skip_avx512bf16_tests
+    verbose "$me:  returning $allow_avx512bf16_tests" 2
+    return $allow_avx512bf16_tests
 }
 
 # Run a test on the target to see if it supports avx512fp16.  Return 0 if so,
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 55/79] Rename to allow_avx512fp16_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (53 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 54/79] Rename to allow_avx512bf16_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 56/79] Rename to allow_btrace_pt_tests Tom Tromey
                   ` (25 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_avx512fp16_tests to invert the sense, and renames it
to allow_avx512fp16_tests.
---
 gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp |  2 +-
 gdb/testsuite/gdb.arch/x86-avx512fp16.exp     |  2 +-
 gdb/testsuite/lib/gdb.exp                     | 24 +++++++++----------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp b/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp
index 696a6b8edf1..bf8291a4d0b 100644
--- a/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp
+++ b/gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp
@@ -15,7 +15,7 @@
 
 # Test support for _Float16 parameters and return values.
 
-require !skip_avx512fp16_tests
+require allow_avx512fp16_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/x86-avx512fp16.exp b/gdb/testsuite/gdb.arch/x86-avx512fp16.exp
index 526be1660bf..144b51bfa68 100644
--- a/gdb/testsuite/gdb.arch/x86-avx512fp16.exp
+++ b/gdb/testsuite/gdb.arch/x86-avx512fp16.exp
@@ -15,7 +15,7 @@
 
 # Test fp16 support in AVX512 registers.
 
-require !skip_avx512fp16_tests
+require allow_avx512fp16_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b68ea4eb5b0..4959af6b2c4 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3750,16 +3750,16 @@ gdb_caching_proc allow_avx512bf16_tests {
     return $allow_avx512bf16_tests
 }
 
-# Run a test on the target to see if it supports avx512fp16.  Return 0 if so,
-# 1 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
+# Run a test on the target to see if it supports avx512fp16.  Return 1 if so,
+# 0 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
 
-gdb_caching_proc skip_avx512fp16_tests {
+gdb_caching_proc allow_avx512fp16_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
-    set me "skip_avx512fp16_tests"
+    set me "allow_avx512fp16_tests"
     if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
-        verbose "$me:  target does not support avx512fp16, returning 1" 2
-        return 1
+	verbose "$me:  target does not support avx512fp16, returning 0" 2
+	return 0
     }
 
     # Compile a test program.
@@ -3770,7 +3770,7 @@ gdb_caching_proc skip_avx512fp16_tests {
         }
     }
     if {![gdb_simple_compile $me $src executable]} {
-        return 1
+	return 0
     }
 
     # No error message, compilation succeeded so now run it via gdb.
@@ -3783,22 +3783,22 @@ gdb_caching_proc skip_avx512fp16_tests {
     gdb_expect {
         -re ".*Illegal instruction.*${gdb_prompt} $" {
             verbose -log "$me:  avx512fp16 hardware not detected."
-            set skip_avx512fp16_tests 1
+	    set allow_avx512fp16_tests 0
         }
         -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
             verbose -log "$me:  avx512fp16 hardware detected."
-            set skip_avx512fp16_tests 0
+	    set allow_avx512fp16_tests 1
         }
         default {
             warning "\n$me:  default case taken."
-            set skip_avx512fp16_tests 1
+	    set allow_avx512fp16_tests 0
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_avx512fp16_tests" 2
-    return $skip_avx512fp16_tests
+    verbose "$me:  returning $allow_avx512fp16_tests" 2
+    return $allow_avx512fp16_tests
 }
 
 # Run a test on the target to see if it supports btrace hardware.  Return 0 if so,
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 56/79] Rename to allow_btrace_pt_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (54 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 55/79] Rename to allow_avx512fp16_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 57/79] Rename to allow_btrace_tests Tom Tromey
                   ` (24 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_btrace_pt_tests to invert the sense, and renames it
to allow_btrace_pt_tests.
---
 gdb/testsuite/gdb.btrace/tsx.exp |  2 +-
 gdb/testsuite/lib/gdb.exp        | 30 +++++++++++++++---------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
index 2a8d29de8ed..222c352c368 100644
--- a/gdb/testsuite/gdb.btrace/tsx.exp
+++ b/gdb/testsuite/gdb.btrace/tsx.exp
@@ -15,7 +15,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/>.
 
-require !skip_btrace_pt_tests !skip_tsx_tests
+require allow_btrace_pt_tests !skip_tsx_tests
 
 standard_testfile .c x86-tsx.S
 if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 4959af6b2c4..8d817dfa682 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3852,22 +3852,22 @@ gdb_caching_proc skip_btrace_tests {
 }
 
 # Run a test on the target to see if it supports btrace pt hardware.
-# Return 0 if so, 1 if it does not.  Based on 'check_vmx_hw_available'
+# Return 1 if so, 0 if it does not.  Based on 'check_vmx_hw_available'
 # from the GCC testsuite.
 
-gdb_caching_proc skip_btrace_pt_tests {
+gdb_caching_proc allow_btrace_pt_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
-    set me "skip_btrace_tests"
+    set me "allow_btrace_pt_tests"
     if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
-        verbose "$me:  target does not support btrace, returning 1" 2
-        return 1
+	verbose "$me:  target does not support btrace, returning 1" 2
+	return 0
     }
 
     # Compile a test program.
     set src { int main() { return 0; } }
     if {![gdb_simple_compile $me $src executable]} {
-        return 1
+	return 0
     }
 
     # No error message, compilation succeeded so now run it via gdb.
@@ -3877,32 +3877,32 @@ gdb_caching_proc skip_btrace_pt_tests {
     gdb_reinitialize_dir $srcdir/$subdir
     gdb_load $obj
     if ![runto_main] {
-        return 1
+	return 0
     }
     # In case of an unexpected output, we return 2 as a fail value.
-    set skip_btrace_tests 2
+    set allow_btrace_pt_tests 2
     gdb_test_multiple "record btrace pt" "check btrace pt support" {
         -re "You can't do that when your target is.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "Target does not support branch tracing.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "Could not enable branch tracing.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "support was disabled at compile time.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_pt_tests 0
         }
         -re "^record btrace pt\r\n$gdb_prompt $" {
-            set skip_btrace_tests 0
+	    set allow_btrace_pt_tests 1
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_btrace_tests" 2
-    return $skip_btrace_tests
+    verbose "$me:  returning $allow_btrace_pt_tests" 2
+    return $allow_btrace_pt_tests
 }
 
 # Run a test on the target to see if it supports Aarch64 SVE hardware.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 57/79] Rename to allow_btrace_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (55 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 56/79] Rename to allow_btrace_pt_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  6:39   ` Metzger, Markus T
  2023-01-12  3:00 ` [PATCH v2 58/79] Rename to allow_cplus_tests and allow_stl_tests Tom Tromey
                   ` (23 subsequent siblings)
  80 siblings, 1 reply; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_btrace_tests to invert the sense, and renames it to
allow_btrace_tests.
---
 gdb/testsuite/gdb.btrace/buffer-size.exp      |  2 +-
 gdb/testsuite/gdb.btrace/data.exp             |  2 +-
 gdb/testsuite/gdb.btrace/delta.exp            |  2 +-
 gdb/testsuite/gdb.btrace/dlopen.exp           |  2 +-
 .../gdb.btrace/enable-new-thread.exp          |  2 +-
 gdb/testsuite/gdb.btrace/enable-running.exp   |  2 +-
 gdb/testsuite/gdb.btrace/enable.exp           |  2 +-
 gdb/testsuite/gdb.btrace/exception.exp        |  2 +-
 .../gdb.btrace/function_call_history.exp      |  2 +-
 gdb/testsuite/gdb.btrace/gcore.exp            |  2 +-
 .../gdb.btrace/instruction_history.exp        |  2 +-
 gdb/testsuite/gdb.btrace/multi-inferior.exp   |  2 +-
 .../gdb.btrace/multi-thread-step.exp          |  2 +-
 gdb/testsuite/gdb.btrace/nohist.exp           |  2 +-
 gdb/testsuite/gdb.btrace/non-stop.exp         |  2 +-
 gdb/testsuite/gdb.btrace/reconnect.exp        |  2 +-
 gdb/testsuite/gdb.btrace/record_goto-step.exp |  2 +-
 gdb/testsuite/gdb.btrace/record_goto.exp      |  2 +-
 gdb/testsuite/gdb.btrace/rn-dl-bind.exp       |  2 +-
 gdb/testsuite/gdb.btrace/segv.exp             |  2 +-
 gdb/testsuite/gdb.btrace/step.exp             |  2 +-
 gdb/testsuite/gdb.btrace/stepi.exp            |  2 +-
 gdb/testsuite/gdb.btrace/tailcall-only.exp    |  2 +-
 gdb/testsuite/gdb.btrace/tailcall.exp         |  2 +-
 .../gdb.btrace/unknown_functions.exp          |  2 +-
 gdb/testsuite/gdb.btrace/vdso.exp             |  2 +-
 .../gdb.python/py-record-btrace-threads.exp   |  2 +-
 gdb/testsuite/gdb.python/py-record-btrace.exp |  2 +-
 gdb/testsuite/lib/gdb.exp                     | 30 +++++++++----------
 29 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/buffer-size.exp b/gdb/testsuite/gdb.btrace/buffer-size.exp
index d0a9086604f..e632ba56cf9 100644
--- a/gdb/testsuite/gdb.btrace/buffer-size.exp
+++ b/gdb/testsuite/gdb.btrace/buffer-size.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/data.exp b/gdb/testsuite/gdb.btrace/data.exp
index 8be2a4ccdea..67d4b094a8d 100644
--- a/gdb/testsuite/gdb.btrace/data.exp
+++ b/gdb/testsuite/gdb.btrace/data.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/delta.exp b/gdb/testsuite/gdb.btrace/delta.exp
index e4307e15a5b..f671937d260 100644
--- a/gdb/testsuite/gdb.btrace/delta.exp
+++ b/gdb/testsuite/gdb.btrace/delta.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/dlopen.exp b/gdb/testsuite/gdb.btrace/dlopen.exp
index b742cfa86bd..8cd0b9db9aa 100644
--- a/gdb/testsuite/gdb.btrace/dlopen.exp
+++ b/gdb/testsuite/gdb.btrace/dlopen.exp
@@ -15,7 +15,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/>.
 
-require !skip_btrace_tests !skip_shlib_tests
+require allow_btrace_tests !skip_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.btrace/enable-new-thread.exp b/gdb/testsuite/gdb.btrace/enable-new-thread.exp
index 22cc33f142f..a9c7d579e8b 100644
--- a/gdb/testsuite/gdb.btrace/enable-new-thread.exp
+++ b/gdb/testsuite/gdb.btrace/enable-new-thread.exp
@@ -17,7 +17,7 @@
 
 # Test that new threads of recorded inferiors also get recorded.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] {
diff --git a/gdb/testsuite/gdb.btrace/enable-running.exp b/gdb/testsuite/gdb.btrace/enable-running.exp
index 6e626e3a053..9dea21f5dfd 100644
--- a/gdb/testsuite/gdb.btrace/enable-running.exp
+++ b/gdb/testsuite/gdb.btrace/enable-running.exp
@@ -15,7 +15,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp
index bb57f7b8a74..acad4c6e828 100644
--- a/gdb/testsuite/gdb.btrace/enable.exp
+++ b/gdb/testsuite/gdb.btrace/enable.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 # start fresh - without an executable
 gdb_exit
diff --git a/gdb/testsuite/gdb.btrace/exception.exp b/gdb/testsuite/gdb.btrace/exception.exp
index e84ff14d193..9f12abab323 100755
--- a/gdb/testsuite/gdb.btrace/exception.exp
+++ b/gdb/testsuite/gdb.btrace/exception.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 # We expect a specific function call history.  This gets messed up with
 # PIE on 32-bit.
diff --git a/gdb/testsuite/gdb.btrace/function_call_history.exp b/gdb/testsuite/gdb.btrace/function_call_history.exp
index fd35d762796..e71e48fc0ca 100644
--- a/gdb/testsuite/gdb.btrace/function_call_history.exp
+++ b/gdb/testsuite/gdb.btrace/function_call_history.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 # We expect a specific function call history.  This gets messed up with
 # PIE on 32-bit.
diff --git a/gdb/testsuite/gdb.btrace/gcore.exp b/gdb/testsuite/gdb.btrace/gcore.exp
index 1e98860aee3..d18bda53469 100644
--- a/gdb/testsuite/gdb.btrace/gcore.exp
+++ b/gdb/testsuite/gdb.btrace/gcore.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/instruction_history.exp b/gdb/testsuite/gdb.btrace/instruction_history.exp
index 0e525c73cb7..35b43d68434 100644
--- a/gdb/testsuite/gdb.btrace/instruction_history.exp
+++ b/gdb/testsuite/gdb.btrace/instruction_history.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile .c .S
 if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
diff --git a/gdb/testsuite/gdb.btrace/multi-inferior.exp b/gdb/testsuite/gdb.btrace/multi-inferior.exp
index bbc03daaccc..79e5a1c39bf 100644
--- a/gdb/testsuite/gdb.btrace/multi-inferior.exp
+++ b/gdb/testsuite/gdb.btrace/multi-inferior.exp
@@ -22,7 +22,7 @@
 #
 # Each inferior can be recorded separately.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 require !use_gdb_stub
 
diff --git a/gdb/testsuite/gdb.btrace/multi-thread-step.exp b/gdb/testsuite/gdb.btrace/multi-thread-step.exp
index a18734843ae..af61e5e73da 100644
--- a/gdb/testsuite/gdb.btrace/multi-thread-step.exp
+++ b/gdb/testsuite/gdb.btrace/multi-thread-step.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
diff --git a/gdb/testsuite/gdb.btrace/nohist.exp b/gdb/testsuite/gdb.btrace/nohist.exp
index 0875b8a6e22..f4ab977ded8 100644
--- a/gdb/testsuite/gdb.btrace/nohist.exp
+++ b/gdb/testsuite/gdb.btrace/nohist.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/non-stop.exp b/gdb/testsuite/gdb.btrace/non-stop.exp
index 278064fbac5..530fafd9573 100644
--- a/gdb/testsuite/gdb.btrace/non-stop.exp
+++ b/gdb/testsuite/gdb.btrace/non-stop.exp
@@ -15,7 +15,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug}] != "" } {
diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp
index 548aa16ed29..1da9f4be566 100644
--- a/gdb/testsuite/gdb.btrace/reconnect.exp
+++ b/gdb/testsuite/gdb.btrace/reconnect.exp
@@ -19,7 +19,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_btrace_tests
+require allow_btrace_tests
 require !skip_gdbserver_tests
 
 standard_testfile
diff --git a/gdb/testsuite/gdb.btrace/record_goto-step.exp b/gdb/testsuite/gdb.btrace/record_goto-step.exp
index 1f289b47f64..35731c72b40 100644
--- a/gdb/testsuite/gdb.btrace/record_goto-step.exp
+++ b/gdb/testsuite/gdb.btrace/record_goto-step.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/record_goto.exp b/gdb/testsuite/gdb.btrace/record_goto.exp
index dce9ca18c6c..240e18f67d6 100644
--- a/gdb/testsuite/gdb.btrace/record_goto.exp
+++ b/gdb/testsuite/gdb.btrace/record_goto.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 # The "record goto" command jumps to a specific instruction in the execution
 # trace.  To guarantee that we always get the same execution trace, we use
diff --git a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
index f61aa936a8d..4a419a84fbb 100644
--- a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
+++ b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
@@ -21,7 +21,7 @@
 # Test that we can reverse-next over the dynamic linker's symbol
 # lookup code.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile \
diff --git a/gdb/testsuite/gdb.btrace/segv.exp b/gdb/testsuite/gdb.btrace/segv.exp
index 9d256795729..dfd04b3cae7 100644
--- a/gdb/testsuite/gdb.btrace/segv.exp
+++ b/gdb/testsuite/gdb.btrace/segv.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/step.exp b/gdb/testsuite/gdb.btrace/step.exp
index 8ad58d48fdc..219775cdeb1 100644
--- a/gdb/testsuite/gdb.btrace/step.exp
+++ b/gdb/testsuite/gdb.btrace/step.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile record_goto.c
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.btrace/stepi.exp b/gdb/testsuite/gdb.btrace/stepi.exp
index f659d58cf7c..4592309796e 100644
--- a/gdb/testsuite/gdb.btrace/stepi.exp
+++ b/gdb/testsuite/gdb.btrace/stepi.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 # This test is stepping on instruction level.  To guarantee that we always
 # get the same execution trace, we use an assembly source file.
diff --git a/gdb/testsuite/gdb.btrace/tailcall-only.exp b/gdb/testsuite/gdb.btrace/tailcall-only.exp
index 16541b2eacf..857cc375ba3 100644
--- a/gdb/testsuite/gdb.btrace/tailcall-only.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall-only.exp
@@ -20,7 +20,7 @@
 # calls.  This used to cause a crash in get_frame_type.
 #
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 # This test requires the compiler to generate a tail call.  To guarantee that
 # we always get one, we use an assembly source file.
diff --git a/gdb/testsuite/gdb.btrace/tailcall.exp b/gdb/testsuite/gdb.btrace/tailcall.exp
index f422fbb1b2a..7fbcd40c077 100644
--- a/gdb/testsuite/gdb.btrace/tailcall.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 # This test requires the compiler to generate a tail call.  To guarantee that
 # we always get one, we use an assembly source file.
diff --git a/gdb/testsuite/gdb.btrace/unknown_functions.exp b/gdb/testsuite/gdb.btrace/unknown_functions.exp
index 291d7df5963..fadfabd57b8 100644
--- a/gdb/testsuite/gdb.btrace/unknown_functions.exp
+++ b/gdb/testsuite/gdb.btrace/unknown_functions.exp
@@ -17,7 +17,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/>.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.btrace/vdso.exp b/gdb/testsuite/gdb.btrace/vdso.exp
index 16a7e230786..2bfc476b3cc 100644
--- a/gdb/testsuite/gdb.btrace/vdso.exp
+++ b/gdb/testsuite/gdb.btrace/vdso.exp
@@ -20,7 +20,7 @@
 #
 # Test that we can access the vdso memory during replay for stepping.
 
-require !skip_btrace_tests
+require allow_btrace_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
index f0845f8bbd5..ca9552754f3 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_btrace_tests !skip_python_tests
+require allow_btrace_tests !skip_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 1326e8283b9..1b9824e284b 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -17,7 +17,7 @@
 
 # Skip this test if btrace is disabled.
 
-require !skip_btrace_tests !skip_python_tests
+require allow_btrace_tests !skip_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 8d817dfa682..40a12612b3e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3801,22 +3801,22 @@ gdb_caching_proc allow_avx512fp16_tests {
     return $allow_avx512fp16_tests
 }
 
-# Run a test on the target to see if it supports btrace hardware.  Return 0 if so,
-# 1 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
+# Run a test on the target to see if it supports btrace hardware.  Return 1 if so,
+# 0 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
 
-gdb_caching_proc skip_btrace_tests {
+gdb_caching_proc allow_btrace_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
-    set me "skip_btrace_tests"
+    set me "allow_btrace_tests"
     if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
-        verbose "$me:  target does not support btrace, returning 1" 2
-        return 1
+	verbose "$me:  target does not support btrace, returning 0" 2
+	return 0
     }
 
     # Compile a test program.
     set src { int main() { return 0; } }
     if {![gdb_simple_compile $me $src executable]} {
-        return 1
+	return 0
     }
 
     # No error message, compilation succeeded so now run it via gdb.
@@ -3826,29 +3826,29 @@ gdb_caching_proc skip_btrace_tests {
     gdb_reinitialize_dir $srcdir/$subdir
     gdb_load $obj
     if ![runto_main] {
-        return 1
+	return 0
     }
     # In case of an unexpected output, we return 2 as a fail value.
-    set skip_btrace_tests 2
+    set allow_btrace_tests 2
     gdb_test_multiple "record btrace" "check btrace support" {
         -re "You can't do that when your target is.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_tests 0
         }
         -re "Target does not support branch tracing.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_tests 0
         }
         -re "Could not enable branch tracing.*\r\n$gdb_prompt $" {
-            set skip_btrace_tests 1
+	    set allow_btrace_tests 0
         }
         -re "^record btrace\r\n$gdb_prompt $" {
-            set skip_btrace_tests 0
+	    set allow_btrace_tests 1
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_btrace_tests" 2
-    return $skip_btrace_tests
+    verbose "$me:  returning $allow_btrace_tests" 2
+    return $allow_btrace_tests
 }
 
 # Run a test on the target to see if it supports btrace pt hardware.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 58/79] Rename to allow_cplus_tests and allow_stl_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (56 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 57/79] Rename to allow_btrace_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 59/79] Rename to allow_ctf_tests Tom Tromey
                   ` (22 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_cplus_tests to invert the sense, and renames it to
allow_cplus_tests.  This one also converts skip_stl_tests to
allow_stl_tests, as that was convenient to do at the same time.
---
 .../advance-until-multiple-locations.exp      |  2 +-
 gdb/testsuite/gdb.base/align-c++.exp          |  2 +-
 .../gdb.base/break-on-linker-gcd-function.exp |  2 +-
 .../gdb.base/infcall-nested-structs-c++.exp   |  2 +-
 gdb/testsuite/gdb.base/info-types-c++.exp     |  2 +-
 gdb/testsuite/gdb.base/max-depth-c++.exp      |  2 +-
 gdb/testsuite/gdb.base/print-file-var.exp     |  7 +++----
 gdb/testsuite/gdb.base/prologue.exp           |  2 +-
 gdb/testsuite/gdb.base/psymtab.exp            |  2 +-
 .../gdb.compile/compile-cplus-anonymous.exp   |  2 +-
 .../gdb.compile/compile-cplus-array-decay.exp |  2 +-
 .../gdb.compile/compile-cplus-inherit.exp     |  2 +-
 .../gdb.compile/compile-cplus-member.exp      |  2 +-
 .../gdb.compile/compile-cplus-method.exp      |  2 +-
 .../gdb.compile/compile-cplus-namespace.exp   |  2 +-
 .../gdb.compile/compile-cplus-nested.exp      |  2 +-
 .../gdb.compile/compile-cplus-virtual.exp     |  2 +-
 gdb/testsuite/gdb.cp/align.exp                |  2 +-
 gdb/testsuite/gdb.cp/ambiguous.exp            |  2 +-
 gdb/testsuite/gdb.cp/annota2.exp              |  2 +-
 gdb/testsuite/gdb.cp/annota3.exp              |  2 +-
 gdb/testsuite/gdb.cp/anon-ns.exp              |  2 +-
 gdb/testsuite/gdb.cp/anon-union.exp           |  2 +-
 gdb/testsuite/gdb.cp/arg-reference.exp        |  2 +-
 gdb/testsuite/gdb.cp/array-indices.exp        |  2 +-
 gdb/testsuite/gdb.cp/array-repeat.exp         |  2 +-
 gdb/testsuite/gdb.cp/bool.exp                 |  2 +-
 gdb/testsuite/gdb.cp/break-f-std-string.exp   |  2 +-
 gdb/testsuite/gdb.cp/breakpoint-locs.exp      |  2 +-
 gdb/testsuite/gdb.cp/breakpoint.exp           |  2 +-
 gdb/testsuite/gdb.cp/bs15503.exp              |  2 +-
 gdb/testsuite/gdb.cp/call-c.exp               |  2 +-
 gdb/testsuite/gdb.cp/call-method-register.exp |  2 +-
 gdb/testsuite/gdb.cp/casts.exp                |  2 +-
 gdb/testsuite/gdb.cp/chained-calls.exp        |  2 +-
 gdb/testsuite/gdb.cp/class2.exp               |  2 +-
 gdb/testsuite/gdb.cp/classes.exp              |  2 +-
 gdb/testsuite/gdb.cp/cmpd-minsyms.exp         |  2 +-
 gdb/testsuite/gdb.cp/constexpr-field.exp      |  2 +-
 gdb/testsuite/gdb.cp/cp-relocate.exp          |  2 +-
 gdb/testsuite/gdb.cp/cpcompletion.exp         |  2 +-
 gdb/testsuite/gdb.cp/cpexprs.exp.tcl          |  2 +-
 gdb/testsuite/gdb.cp/cplabel.exp              |  2 +-
 gdb/testsuite/gdb.cp/cplusfuncs.exp           |  2 +-
 gdb/testsuite/gdb.cp/cpsizeof.exp             |  2 +-
 gdb/testsuite/gdb.cp/ctti.exp                 |  2 +-
 gdb/testsuite/gdb.cp/debug-expr.exp           |  2 +-
 gdb/testsuite/gdb.cp/demangle.exp             |  2 +-
 gdb/testsuite/gdb.cp/derivation.exp           |  2 +-
 gdb/testsuite/gdb.cp/disasm-func-name.exp     |  2 +-
 gdb/testsuite/gdb.cp/dispcxx.exp              |  2 +-
 gdb/testsuite/gdb.cp/ena-dis-br-range.exp     |  2 +-
 gdb/testsuite/gdb.cp/enum-class.exp           |  2 +-
 gdb/testsuite/gdb.cp/exception.exp            |  2 +-
 gdb/testsuite/gdb.cp/exceptprint.exp          |  2 +-
 gdb/testsuite/gdb.cp/expand-sals.exp          |  2 +-
 gdb/testsuite/gdb.cp/extern-c.exp             |  2 +-
 gdb/testsuite/gdb.cp/filename.exp             |  2 +-
 gdb/testsuite/gdb.cp/formatted-ref.exp        |  2 +-
 gdb/testsuite/gdb.cp/gdb1355.exp              |  2 +-
 gdb/testsuite/gdb.cp/gdb2384.exp              |  2 +-
 gdb/testsuite/gdb.cp/gdb2495.exp              |  2 +-
 gdb/testsuite/gdb.cp/hang.exp                 |  2 +-
 gdb/testsuite/gdb.cp/impl-this.exp            |  2 +-
 .../gdb.cp/incomplete-type-overload.exp       |  2 +-
 .../gdb.cp/infcall-nodebug-c++-d0.exp         |  2 +-
 .../gdb.cp/infcall-nodebug-c++-d1.exp         |  2 +-
 gdb/testsuite/gdb.cp/inherit.exp              |  2 +-
 gdb/testsuite/gdb.cp/iostream.exp             |  2 +-
 gdb/testsuite/gdb.cp/local-static.exp         |  2 +-
 gdb/testsuite/gdb.cp/local.exp                |  2 +-
 gdb/testsuite/gdb.cp/m-data.exp               |  2 +-
 gdb/testsuite/gdb.cp/m-static.exp             |  2 +-
 gdb/testsuite/gdb.cp/many-args.exp            |  2 +-
 gdb/testsuite/gdb.cp/mb-ctor.exp              |  2 +-
 gdb/testsuite/gdb.cp/mb-inline.exp            |  2 +-
 gdb/testsuite/gdb.cp/mb-templates.exp         |  2 +-
 gdb/testsuite/gdb.cp/member-name.exp          |  2 +-
 gdb/testsuite/gdb.cp/member-ptr.exp           |  2 +-
 gdb/testsuite/gdb.cp/meth-typedefs.exp        |  2 +-
 gdb/testsuite/gdb.cp/method.exp               |  2 +-
 gdb/testsuite/gdb.cp/method2.exp              |  2 +-
 gdb/testsuite/gdb.cp/misc.exp                 |  2 +-
 gdb/testsuite/gdb.cp/namelessclass.exp        |  2 +-
 gdb/testsuite/gdb.cp/namespace.exp            |  2 +-
 .../gdb.cp/nested-class-func-class.exp        |  2 +-
 gdb/testsuite/gdb.cp/nested-types.exp         |  2 +-
 gdb/testsuite/gdb.cp/nextoverthrow.exp        |  2 +-
 gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp   |  2 +-
 gdb/testsuite/gdb.cp/non-trivial-retval.exp   |  2 +-
 gdb/testsuite/gdb.cp/nsalias.exp              |  2 +-
 gdb/testsuite/gdb.cp/overload-const.exp       |  2 +-
 gdb/testsuite/gdb.cp/overload.exp             |  2 +-
 gdb/testsuite/gdb.cp/ovldbreak.exp            |  2 +-
 gdb/testsuite/gdb.cp/ovsrch.exp               |  2 +-
 gdb/testsuite/gdb.cp/pass-by-ref-2.exp        |  2 +-
 gdb/testsuite/gdb.cp/pass-by-ref.exp          |  2 +-
 gdb/testsuite/gdb.cp/pointer-to-member.exp    |  2 +-
 gdb/testsuite/gdb.cp/pr-1023.exp              |  2 +-
 gdb/testsuite/gdb.cp/pr-1210.exp              |  2 +-
 gdb/testsuite/gdb.cp/pr-574.exp               |  2 +-
 gdb/testsuite/gdb.cp/pr10728.exp              |  2 +-
 gdb/testsuite/gdb.cp/pr17132.exp              |  2 +-
 gdb/testsuite/gdb.cp/pr17494.exp              |  2 +-
 gdb/testsuite/gdb.cp/pr9067.exp               |  2 +-
 gdb/testsuite/gdb.cp/pr9631.exp               |  2 +-
 gdb/testsuite/gdb.cp/print-demangle.exp       |  2 +-
 gdb/testsuite/gdb.cp/print-method-args.exp    |  2 +-
 gdb/testsuite/gdb.cp/printmethod.exp          |  2 +-
 gdb/testsuite/gdb.cp/psmang.exp               |  2 +-
 gdb/testsuite/gdb.cp/psymtab-parameter.exp    |  2 +-
 gdb/testsuite/gdb.cp/ptype-cv-cp.exp          |  2 +-
 gdb/testsuite/gdb.cp/ptype-flags.exp          |  2 +-
 gdb/testsuite/gdb.cp/punctuator.exp           |  2 +-
 gdb/testsuite/gdb.cp/re-set-overloaded.exp    |  2 +-
 gdb/testsuite/gdb.cp/ref-params.exp           |  2 +-
 gdb/testsuite/gdb.cp/ref-types.exp            |  2 +-
 gdb/testsuite/gdb.cp/rtti.exp                 |  2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-casts.exp     |  2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-overload.exp  |  2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-params.exp    |  2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp    |  2 +-
 gdb/testsuite/gdb.cp/rvalue-ref-types.exp     |  2 +-
 gdb/testsuite/gdb.cp/scope-err.exp            |  2 +-
 gdb/testsuite/gdb.cp/static-method.exp        |  2 +-
 gdb/testsuite/gdb.cp/static-print-quit.exp    |  2 +-
 gdb/testsuite/gdb.cp/static-typedef-print.exp |  2 +-
 gdb/testsuite/gdb.cp/stub-array-size.exp      |  2 +-
 gdb/testsuite/gdb.cp/subtypes.exp             |  2 +-
 gdb/testsuite/gdb.cp/temargs.exp              |  2 +-
 gdb/testsuite/gdb.cp/templates.exp            |  2 +-
 gdb/testsuite/gdb.cp/try_catch.exp            |  2 +-
 gdb/testsuite/gdb.cp/typed-enum.exp           |  2 +-
 gdb/testsuite/gdb.cp/typedef-base.exp         |  2 +-
 gdb/testsuite/gdb.cp/typedef-operator.exp     |  2 +-
 gdb/testsuite/gdb.cp/typeid.exp               |  2 +-
 gdb/testsuite/gdb.cp/userdef.exp              |  2 +-
 gdb/testsuite/gdb.cp/var-tag.exp              |  2 +-
 gdb/testsuite/gdb.cp/virtbase.exp             |  2 +-
 gdb/testsuite/gdb.cp/virtbase2.exp            |  2 +-
 gdb/testsuite/gdb.cp/virtfunc.exp             |  2 +-
 gdb/testsuite/gdb.cp/virtfunc2.exp            |  2 +-
 gdb/testsuite/gdb.cp/watch-cp.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp    |  2 +-
 .../gdb.dwarf2/dw2-cp-infcall-ref-static.exp  |  2 +-
 .../gdb.dwarf2/dw2-linkage-name-trust.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/implptrconst.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/implptrpiece.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/implref-array.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/implref-const.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/implref-global.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/implref-struct.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/imported-unit.exp    |  2 +-
 .../gdb.dwarf2/member-ptr-forwardref.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/method-ptr.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/missing-sig-type.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/nostaticblock.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/nullptr_t.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/staticvirtual.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/subrange.exp         |  2 +-
 gdb/testsuite/gdb.guile/scm-value-cc.exp      |  2 +-
 gdb/testsuite/gdb.guile/scm-value.exp         |  2 +-
 gdb/testsuite/gdb.linespec/break-ask.exp      |  2 +-
 gdb/testsuite/gdb.linespec/cpexplicit.exp     |  2 +-
 gdb/testsuite/gdb.linespec/linespec.exp       |  2 +-
 gdb/testsuite/gdb.linespec/ls-dollar.exp      |  2 +-
 gdb/testsuite/gdb.linespec/ls-errs.exp        |  2 +-
 gdb/testsuite/gdb.linespec/skip-two.exp       |  2 +-
 gdb/testsuite/gdb.mi/gdb792.exp               |  2 +-
 .../gdb.mi/mi-catch-cpp-exceptions.exp        |  2 +-
 .../gdb.mi/mi-inheritance-syntax-error.exp    |  2 +-
 gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp   |  2 +-
 gdb/testsuite/gdb.mi/mi-var-cp.exp            |  2 +-
 gdb/testsuite/gdb.mi/mi-var-rtti.exp          |  2 +-
 gdb/testsuite/gdb.python/py-explore-cc.exp    |  2 +-
 .../gdb.python/py-rvalue-ref-value-cc.exp     |  2 +-
 gdb/testsuite/gdb.python/py-template.exp      |  2 +-
 gdb/testsuite/gdb.python/py-typeprint.exp     |  2 +-
 gdb/testsuite/gdb.python/py-value-cc.exp      |  2 +-
 gdb/testsuite/gdb.python/py-value.exp         |  2 +-
 gdb/testsuite/gdb.python/py-xmethods.exp      |  2 +-
 gdb/testsuite/lib/gdb.exp                     | 19 +++++++++----------
 183 files changed, 193 insertions(+), 195 deletions(-)

diff --git a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
index ef60fc67951..687f5a69707 100644
--- a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
+++ b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
@@ -18,7 +18,7 @@
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 	  {debug c++}] } {
diff --git a/gdb/testsuite/gdb.base/align-c++.exp b/gdb/testsuite/gdb.base/align-c++.exp
index cb9504ab546..4caf1f94348 100644
--- a/gdb/testsuite/gdb.base/align-c++.exp
+++ b/gdb/testsuite/gdb.base/align-c++.exp
@@ -19,7 +19,7 @@
 # compiler.
 
 # Only test C++ if we are able.
-require !skip_cplus_tests
+require allow_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/align.exp.tcl
diff --git a/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp b/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
index a4d168db0fa..60ee2b59629 100644
--- a/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
+++ b/gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
@@ -23,7 +23,7 @@
 #
 # test running programs
 #
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp b/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp
index 9b0be13f3f7..35cfe526a92 100644
--- a/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp
+++ b/gdb/testsuite/gdb.base/infcall-nested-structs-c++.exp
@@ -16,7 +16,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.
-require !skip_cplus_tests
+require allow_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/infcall-nested-structs.exp.tcl
diff --git a/gdb/testsuite/gdb.base/info-types-c++.exp b/gdb/testsuite/gdb.base/info-types-c++.exp
index 4b1049b3e59..cf716c27a7e 100644
--- a/gdb/testsuite/gdb.base/info-types-c++.exp
+++ b/gdb/testsuite/gdb.base/info-types-c++.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.
-require !skip_cplus_tests
+require allow_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/info-types.exp.tcl
diff --git a/gdb/testsuite/gdb.base/max-depth-c++.exp b/gdb/testsuite/gdb.base/max-depth-c++.exp
index a959b81b639..5643867ed79 100644
--- a/gdb/testsuite/gdb.base/max-depth-c++.exp
+++ b/gdb/testsuite/gdb.base/max-depth-c++.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.
-require !skip_cplus_tests
+require allow_cplus_tests
 set lang c++
 
 source $srcdir/$subdir/max-depth.exp.tcl
diff --git a/gdb/testsuite/gdb.base/print-file-var.exp b/gdb/testsuite/gdb.base/print-file-var.exp
index 00105a8f5cd..936ab2a17e3 100644
--- a/gdb/testsuite/gdb.base/print-file-var.exp
+++ b/gdb/testsuite/gdb.base/print-file-var.exp
@@ -139,10 +139,9 @@ proc test {hidden dlopen version_id_main lang} {
 }
 
 # Only test C++ if we are able.  Always use C.
-if { [skip_cplus_tests] } {
-    set lang_list {c}
-} else {
-    set lang_list {c c++}
+set lang_list {c}
+if {[allow_cplus_tests]} {
+    lappend lang_list c++
 }
 
 foreach_with_prefix lang $lang_list {
diff --git a/gdb/testsuite/gdb.base/prologue.exp b/gdb/testsuite/gdb.base/prologue.exp
index adee2573cee..c60edb72188 100644
--- a/gdb/testsuite/gdb.base/prologue.exp
+++ b/gdb/testsuite/gdb.base/prologue.exp
@@ -14,7 +14,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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/psymtab.exp b/gdb/testsuite/gdb.base/psymtab.exp
index 99f233ffb6b..2674f5523c4 100644
--- a/gdb/testsuite/gdb.base/psymtab.exp
+++ b/gdb/testsuite/gdb.base/psymtab.exp
@@ -24,7 +24,7 @@
 #
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile psymtab1.c psymtab2.c
 
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp
index 912deabd9b7..26cfab50914 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp
index a1baccdbc5b..05962208e2e 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++ additional_flags=-std=c++11}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp
index 78501c6a5f4..a6cfeb6fe5a 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-inherit.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-member.exp b/gdb/testsuite/gdb.compile/compile-cplus-member.exp
index 356d39f5008..da9418edf53 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-member.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-member.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-method.exp b/gdb/testsuite/gdb.compile/compile-cplus-method.exp
index 8261a14ac8f..994e00d48c4 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-method.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-method.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp
index ffc13332809..65cc3ac51c3 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp
index c827dcebe54..86fddb324aa 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-nested.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-nested.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp
index 33fec029257..f50e385ff73 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-virtual.exp
@@ -19,7 +19,7 @@ load_lib compile-support.exp
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing $testfile $testfile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.cp/align.exp b/gdb/testsuite/gdb.cp/align.exp
index b75024dec6b..b2130e067e0 100644
--- a/gdb/testsuite/gdb.cp/align.exp
+++ b/gdb/testsuite/gdb.cp/align.exp
@@ -18,7 +18,7 @@
 # This tests that C++ alignof works in gdb, and that it agrees with
 # the compiler.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 # The types we're going to test.
 
diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp
index e132e73d80b..a8f19e1d114 100644
--- a/gdb/testsuite/gdb.cp/ambiguous.exp
+++ b/gdb/testsuite/gdb.cp/ambiguous.exp
@@ -19,7 +19,7 @@
 # about the field or baseclass being ambiguous is emitted at the right
 # times.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 5116355049f..64adbbdb220 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index 5d8c152d33d..788bda77f3d 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/anon-ns.exp b/gdb/testsuite/gdb.cp/anon-ns.exp
index d9017533a44..35bef8d8267 100644
--- a/gdb/testsuite/gdb.cp/anon-ns.exp
+++ b/gdb/testsuite/gdb.cp/anon-ns.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc anon-ns2.cc
 
diff --git a/gdb/testsuite/gdb.cp/anon-union.exp b/gdb/testsuite/gdb.cp/anon-union.exp
index f5ec03d49ec..751867f7d49 100644
--- a/gdb/testsuite/gdb.cp/anon-union.exp
+++ b/gdb/testsuite/gdb.cp/anon-union.exp
@@ -23,7 +23,7 @@
 #
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/arg-reference.exp b/gdb/testsuite/gdb.cp/arg-reference.exp
index 21a89bde85f..76b4ae82c09 100644
--- a/gdb/testsuite/gdb.cp/arg-reference.exp
+++ b/gdb/testsuite/gdb.cp/arg-reference.exp
@@ -21,7 +21,7 @@
 # Test G++ has compiled debuginfo without a C++ '&' reference where it should
 # not be.  GCC Bug 33537.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/array-indices.exp b/gdb/testsuite/gdb.cp/array-indices.exp
index 8f88f947549..ff3b1aa5ec9 100644
--- a/gdb/testsuite/gdb.cp/array-indices.exp
+++ b/gdb/testsuite/gdb.cp/array-indices.exp
@@ -15,7 +15,7 @@
 
 # Test the printing of element indices in C++ arrays.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 set lang c++
 
diff --git a/gdb/testsuite/gdb.cp/array-repeat.exp b/gdb/testsuite/gdb.cp/array-repeat.exp
index 8c71149c922..10fbdde6bdd 100644
--- a/gdb/testsuite/gdb.cp/array-repeat.exp
+++ b/gdb/testsuite/gdb.cp/array-repeat.exp
@@ -15,7 +15,7 @@
 
 # Test the detection and printing of repeated elements in C++ arrays.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 set lang c++
 
diff --git a/gdb/testsuite/gdb.cp/bool.exp b/gdb/testsuite/gdb.cp/bool.exp
index 27f35322035..08b68392005 100644
--- a/gdb/testsuite/gdb.cp/bool.exp
+++ b/gdb/testsuite/gdb.cp/bool.exp
@@ -20,7 +20,7 @@
 
 # Test returning bool.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/break-f-std-string.exp b/gdb/testsuite/gdb.cp/break-f-std-string.exp
index 57006f059b8..334955db843 100644
--- a/gdb/testsuite/gdb.cp/break-f-std-string.exp
+++ b/gdb/testsuite/gdb.cp/break-f-std-string.exp
@@ -58,7 +58,7 @@
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 # CXX11_ABI specifies the value to define _GLIBCXX_USE_CXX11_ABI as.
 
diff --git a/gdb/testsuite/gdb.cp/breakpoint-locs.exp b/gdb/testsuite/gdb.cp/breakpoint-locs.exp
index af1711ccbdb..0d1ad68f9f5 100644
--- a/gdb/testsuite/gdb.cp/breakpoint-locs.exp
+++ b/gdb/testsuite/gdb.cp/breakpoint-locs.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc breakpoint-locs-2.cc
 
diff --git a/gdb/testsuite/gdb.cp/breakpoint.exp b/gdb/testsuite/gdb.cp/breakpoint.exp
index 46762fc8b1c..7a244c7bdf8 100644
--- a/gdb/testsuite/gdb.cp/breakpoint.exp
+++ b/gdb/testsuite/gdb.cp/breakpoint.exp
@@ -17,7 +17,7 @@
 
 # This contains tests for breakpoints in C++.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/bs15503.exp b/gdb/testsuite/gdb.cp/bs15503.exp
index 870d36d29b4..29118629d24 100644
--- a/gdb/testsuite/gdb.cp/bs15503.exp
+++ b/gdb/testsuite/gdb.cp/bs15503.exp
@@ -17,7 +17,7 @@
 # This file was written by Sue Kimura (sue_kimura@hp.com)
 # Rewritten by Michael Chastain (mec.gnu@mindspring.com)
 
-require !skip_stl_tests
+require allow_stl_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/call-c.exp b/gdb/testsuite/gdb.cp/call-c.exp
index 9fdbd00537e..b20bc8698ca 100644
--- a/gdb/testsuite/gdb.cp/call-c.exp
+++ b/gdb/testsuite/gdb.cp/call-c.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc call-c-1.c
 set objfilec [standard_output_file ${testfile}-1.o]
diff --git a/gdb/testsuite/gdb.cp/call-method-register.exp b/gdb/testsuite/gdb.cp/call-method-register.exp
index 6f0f5214fe3..ea65e09c82c 100644
--- a/gdb/testsuite/gdb.cp/call-method-register.exp
+++ b/gdb/testsuite/gdb.cp/call-method-register.exp
@@ -16,7 +16,7 @@
 # Test callling a method on a variable that has been put in a
 # register.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 load_lib dwarf.exp
diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp
index 35305d75ff1..ac798f9070f 100644
--- a/gdb/testsuite/gdb.cp/casts.exp
+++ b/gdb/testsuite/gdb.cp/casts.exp
@@ -25,7 +25,7 @@
 #
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc casts03.cc
 
diff --git a/gdb/testsuite/gdb.cp/chained-calls.exp b/gdb/testsuite/gdb.cp/chained-calls.exp
index f147b365776..d766afc66df 100644
--- a/gdb/testsuite/gdb.cp/chained-calls.exp
+++ b/gdb/testsuite/gdb.cp/chained-calls.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.exp
index ea7cdf16a04..0a3448f3705 100644
--- a/gdb/testsuite/gdb.cp/class2.exp
+++ b/gdb/testsuite/gdb.cp/class2.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index de7fa2eb14b..4b1b01df383 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -18,7 +18,7 @@
 
 set nl "\[\r\n\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp
index 70779cecfa4..d54d2986c7a 100644
--- a/gdb/testsuite/gdb.cp/cmpd-minsyms.exp
+++ b/gdb/testsuite/gdb.cp/cmpd-minsyms.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 # Tests for c++/12273, breakpoint/12803
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/constexpr-field.exp b/gdb/testsuite/gdb.cp/constexpr-field.exp
index 387636fd45c..18dcb0e91b7 100644
--- a/gdb/testsuite/gdb.cp/constexpr-field.exp
+++ b/gdb/testsuite/gdb.cp/constexpr-field.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/cp-relocate.exp b/gdb/testsuite/gdb.cp/cp-relocate.exp
index 3846aa2aebc..5e70f9d30d3 100644
--- a/gdb/testsuite/gdb.cp/cp-relocate.exp
+++ b/gdb/testsuite/gdb.cp/cp-relocate.exp
@@ -18,7 +18,7 @@
 standard_testfile .cc
 append binfile .o
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {c++ debug}] != "" } {
      untested "failed to compile"
diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp
index 9d93d598430..82a7ffb6fb4 100644
--- a/gdb/testsuite/gdb.cp/cpcompletion.exp
+++ b/gdb/testsuite/gdb.cp/cpcompletion.exp
@@ -51,7 +51,7 @@ proc test_class_complete {class expr name matches} {
     }
 }
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile pr9594.cc
 
diff --git a/gdb/testsuite/gdb.cp/cpexprs.exp.tcl b/gdb/testsuite/gdb.cp/cpexprs.exp.tcl
index 368ea25d34e..3df149bf6a3 100644
--- a/gdb/testsuite/gdb.cp/cpexprs.exp.tcl
+++ b/gdb/testsuite/gdb.cp/cpexprs.exp.tcl
@@ -678,7 +678,7 @@ add {policyd5::function} \
     {operation_1<T>::function}
 
 # Start the test
-if {[skip_cplus_tests]} { continue }
+if {![allow_cplus_tests]} { continue }
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/cplabel.exp b/gdb/testsuite/gdb.cp/cplabel.exp
index c29b47cdf4c..3a5a3c870cf 100644
--- a/gdb/testsuite/gdb.cp/cplabel.exp
+++ b/gdb/testsuite/gdb.cp/cplabel.exp
@@ -15,7 +15,7 @@
 
 # Tests for breakpoint on labels in methods.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp
index f197e1148e7..9ca5834a9ba 100644
--- a/gdb/testsuite/gdb.cp/cplusfuncs.exp
+++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp
@@ -16,7 +16,7 @@
 # This file was written by Fred Fish. (fnf@cygnus.com)
 # Adapted for g++ 3.0 ABI by Michael Chastain. (chastain@redhat.com)
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/cpsizeof.exp b/gdb/testsuite/gdb.cp/cpsizeof.exp
index d235528878b..44fd9262869 100644
--- a/gdb/testsuite/gdb.cp/cpsizeof.exp
+++ b/gdb/testsuite/gdb.cp/cpsizeof.exp
@@ -16,7 +16,7 @@
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] } {
      return -1
diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp
index a7cb9885258..0c02085cec6 100644
--- a/gdb/testsuite/gdb.cp/ctti.exp
+++ b/gdb/testsuite/gdb.cp/ctti.exp
@@ -21,7 +21,7 @@
 
 # Call to template instantiations.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile cttiadd.cc cttiadd1.cc cttiadd2.cc cttiadd3.cc
 
diff --git a/gdb/testsuite/gdb.cp/debug-expr.exp b/gdb/testsuite/gdb.cp/debug-expr.exp
index 300818e1d87..f6466a4bc5d 100644
--- a/gdb/testsuite/gdb.cp/debug-expr.exp
+++ b/gdb/testsuite/gdb.cp/debug-expr.exp
@@ -15,7 +15,7 @@
 
 # Test "set debug expr 1" on c++ expressions.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 gdb_start
 gdb_test_no_output "set language c++"
diff --git a/gdb/testsuite/gdb.cp/demangle.exp b/gdb/testsuite/gdb.cp/demangle.exp
index 28a0fe85ee1..f7177e292d7 100644
--- a/gdb/testsuite/gdb.cp/demangle.exp
+++ b/gdb/testsuite/gdb.cp/demangle.exp
@@ -15,7 +15,7 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 ### The demangling style we last sent to GDB.
 set current_demangling_style none
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index bb482e69e9f..ea7cdf2920f 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -28,7 +28,7 @@ set nl "\[\r\n\]+"
 # Start program.
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/disasm-func-name.exp b/gdb/testsuite/gdb.cp/disasm-func-name.exp
index 3b8773fbf74..bbb024d0f68 100644
--- a/gdb/testsuite/gdb.cp/disasm-func-name.exp
+++ b/gdb/testsuite/gdb.cp/disasm-func-name.exp
@@ -18,7 +18,7 @@
 # Test that the disassembler correctly demangles C++ function names in
 # it's header line.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/dispcxx.exp b/gdb/testsuite/gdb.cp/dispcxx.exp
index c079b0cd6a2..91f67df2aa8 100644
--- a/gdb/testsuite/gdb.cp/dispcxx.exp
+++ b/gdb/testsuite/gdb.cp/dispcxx.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp
index a8042c44b02..2a1b9cd60a3 100644
--- a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp
+++ b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp
@@ -21,7 +21,7 @@
 # multiple locations and breakpoints are found in
 # gdb.base/ena-dis-br.exp.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/enum-class.exp b/gdb/testsuite/gdb.cp/enum-class.exp
index badc2dc2051..c7badc4ec89 100644
--- a/gdb/testsuite/gdb.cp/enum-class.exp
+++ b/gdb/testsuite/gdb.cp/enum-class.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp
index 3b47143277e..4308d327da3 100644
--- a/gdb/testsuite/gdb.cp/exception.exp
+++ b/gdb/testsuite/gdb.cp/exception.exp
@@ -33,7 +33,7 @@
 set ws	"\[\r\n\t \]+"
 set nl	"\[\r\n\]+"
 
-require !skip_stl_tests
+require allow_stl_tests
 
 standard_testfile .cc
  
diff --git a/gdb/testsuite/gdb.cp/exceptprint.exp b/gdb/testsuite/gdb.cp/exceptprint.exp
index 7e19d42561e..b073d63e216 100644
--- a/gdb/testsuite/gdb.cp/exceptprint.exp
+++ b/gdb/testsuite/gdb.cp/exceptprint.exp
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
diff --git a/gdb/testsuite/gdb.cp/expand-sals.exp b/gdb/testsuite/gdb.cp/expand-sals.exp
index deb9c94cc8e..5ddfa63ccf9 100644
--- a/gdb/testsuite/gdb.cp/expand-sals.exp
+++ b/gdb/testsuite/gdb.cp/expand-sals.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 set srcfile expand-sals.cc
 if { [prepare_for_testing "failed to prepare" expand-sals $srcfile {debug c++}] } {
diff --git a/gdb/testsuite/gdb.cp/extern-c.exp b/gdb/testsuite/gdb.cp/extern-c.exp
index f380e90ace8..d1df13b6341 100644
--- a/gdb/testsuite/gdb.cp/extern-c.exp
+++ b/gdb/testsuite/gdb.cp/extern-c.exp
@@ -15,7 +15,7 @@
 
 # Test breakpoints on extern "C" functions implemented in C++.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filename.exp
index f34f162456f..9b1d2b8a606 100644
--- a/gdb/testsuite/gdb.cp/filename.exp
+++ b/gdb/testsuite/gdb.cp/filename.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/formatted-ref.exp b/gdb/testsuite/gdb.cp/formatted-ref.exp
index 07939637d68..f546dfa10f4 100644
--- a/gdb/testsuite/gdb.cp/formatted-ref.exp
+++ b/gdb/testsuite/gdb.cp/formatted-ref.exp
@@ -28,7 +28,7 @@
 # operand.
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/gdb1355.exp b/gdb/testsuite/gdb.cp/gdb1355.exp
index 1dda4c99ac9..86d314f58fa 100644
--- a/gdb/testsuite/gdb.cp/gdb1355.exp
+++ b/gdb/testsuite/gdb.cp/gdb1355.exp
@@ -21,7 +21,7 @@
 set ws "\[\r\n\t \]*"
 set nl "\[\r\n\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp
index 6eb6292272b..3f53573180e 100644
--- a/gdb/testsuite/gdb.cp/gdb2384.exp
+++ b/gdb/testsuite/gdb.cp/gdb2384.exp
@@ -21,7 +21,7 @@
 #
 # PR c++/9489.
 
-require !skip_cplus_tests !skip_shlib_tests
+require allow_cplus_tests !skip_shlib_tests
 
 standard_testfile .cc gdb2384-base.cc
 
diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp
index 5d9cedbde9f..0cb8bdd0ada 100644
--- a/gdb/testsuite/gdb.cp/gdb2495.exp
+++ b/gdb/testsuite/gdb.cp/gdb2495.exp
@@ -31,7 +31,7 @@
 
 # This test is largely based of gdb.base/callfuncs.exp.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if [target_info exists gdb,nosignals] {
     verbose "Skipping gdb2495.exp because of nosignals."
diff --git a/gdb/testsuite/gdb.cp/hang.exp b/gdb/testsuite/gdb.cp/hang.exp
index 95a0424d652..7d8588520ec 100644
--- a/gdb/testsuite/gdb.cp/hang.exp
+++ b/gdb/testsuite/gdb.cp/hang.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile hang1.cc hang2.cc hang3.cc
 
diff --git a/gdb/testsuite/gdb.cp/impl-this.exp b/gdb/testsuite/gdb.cp/impl-this.exp
index 14c3cb4b331..5508cbaccbc 100644
--- a/gdb/testsuite/gdb.cp/impl-this.exp
+++ b/gdb/testsuite/gdb.cp/impl-this.exp
@@ -18,7 +18,7 @@
 # Test expressions which assume an implicit "this" with a qualified
 # name.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
index 5dfd671592c..050bd98cf56 100644
--- a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
+++ b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
@@ -20,7 +20,7 @@
 
 load_lib dwarf.exp
 
-require dwarf2_support !skip_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile .cc .S
 set asm_file [standard_output_file ${srcfile2}]
diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
index 6d1d3309768..c058b55ff38 100644
--- a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
+++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.  Always use C.
-require !skip_cplus_tests
+require allow_cplus_tests
 set lang {c++}
 
 set debug nodebug
diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp
index baf05594401..dbfa8f97e49 100644
--- a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp
+++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d1.exp
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Only test C++ if we are able.  Always use C.
-require !skip_cplus_tests
+require allow_cplus_tests
 set lang {c++}
 
 set debug debug
diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp
index 1846125066e..2742e3e214d 100644
--- a/gdb/testsuite/gdb.cp/inherit.exp
+++ b/gdb/testsuite/gdb.cp/inherit.exp
@@ -20,7 +20,7 @@ set ws  "\[\r\n\t \]+"
 set nl  "\[\r\n\]+"
 set vhn "\\$\[0-9\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/iostream.exp b/gdb/testsuite/gdb.cp/iostream.exp
index afd54d116f9..c603257583d 100644
--- a/gdb/testsuite/gdb.cp/iostream.exp
+++ b/gdb/testsuite/gdb.cp/iostream.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.
 # It tests various aspects of iostream that have caused problems for gdb.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/local-static.exp b/gdb/testsuite/gdb.cp/local-static.exp
index 58d0d0605ae..8d967c4b293 100644
--- a/gdb/testsuite/gdb.cp/local-static.exp
+++ b/gdb/testsuite/gdb.cp/local-static.exp
@@ -135,7 +135,7 @@ proc do_test {lang} {
     set options {debug}
 
     if {$lang == "c++"} {
-	if { [skip_cplus_tests] } {
+	if { ![allow_cplus_tests] } {
 	    return
 	}
 	lappend options $lang
diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp
index a281019bb3d..67b3eb7308d 100644
--- a/gdb/testsuite/gdb.cp/local.exp
+++ b/gdb/testsuite/gdb.cp/local.exp
@@ -27,7 +27,7 @@ set nl "\[\r\n\]+"
 # test running programs
 #
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/m-data.exp b/gdb/testsuite/gdb.cp/m-data.exp
index 1578b6f0ec1..c5cb7af8366 100644
--- a/gdb/testsuite/gdb.cp/m-data.exp
+++ b/gdb/testsuite/gdb.cp/m-data.exp
@@ -18,7 +18,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 6dbb1716a02..c57aee10160 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -19,7 +19,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/many-args.exp b/gdb/testsuite/gdb.cp/many-args.exp
index 2751c0064bc..7b62f3a442b 100644
--- a/gdb/testsuite/gdb.cp/many-args.exp
+++ b/gdb/testsuite/gdb.cp/many-args.exp
@@ -19,7 +19,7 @@
 # passed in registers.  This test passes so many structures it is
 # hoped that some will need to be placed onto the stack.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-ctor.exp
index 2f86c80d8fd..80a36b0b7ea 100644
--- a/gdb/testsuite/gdb.cp/mb-ctor.exp
+++ b/gdb/testsuite/gdb.cp/mb-ctor.exp
@@ -16,7 +16,7 @@
 # Test that breakpoints on C++ constructors work, despite the
 # fact that gcc generates several versions of constructor function.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/mb-inline.exp b/gdb/testsuite/gdb.cp/mb-inline.exp
index cf139354dd7..555827806f7 100644
--- a/gdb/testsuite/gdb.cp/mb-inline.exp
+++ b/gdb/testsuite/gdb.cp/mb-inline.exp
@@ -18,7 +18,7 @@
 # This test verifies that setting breakpoint on line in inline
 # function will fire in all instantiations of that function.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile mb-inline1.cc mb-inline2.cc
 set hdrfile "${testfile}.h"
diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp
index 17f9e8102cd..930dde57b52 100644
--- a/gdb/testsuite/gdb.cp/mb-templates.exp
+++ b/gdb/testsuite/gdb.cp/mb-templates.exp
@@ -16,7 +16,7 @@
 # This test verifies that setting breakpoint on line in template
 # function will fire in all instantiations of that template.
 
-require !skip_stl_tests
+require allow_stl_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/member-name.exp b/gdb/testsuite/gdb.cp/member-name.exp
index 90fa0971314..5d390845634 100644
--- a/gdb/testsuite/gdb.cp/member-name.exp
+++ b/gdb/testsuite/gdb.cp/member-name.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp
index 0807627e3bc..fc0fd0acc39 100644
--- a/gdb/testsuite/gdb.cp/member-ptr.exp
+++ b/gdb/testsuite/gdb.cp/member-ptr.exp
@@ -21,7 +21,7 @@
 
 set vhn "\\$\[0-9\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/meth-typedefs.exp b/gdb/testsuite/gdb.cp/meth-typedefs.exp
index 174f89b5d68..b484545d93e 100644
--- a/gdb/testsuite/gdb.cp/meth-typedefs.exp
+++ b/gdb/testsuite/gdb.cp/meth-typedefs.exp
@@ -30,7 +30,7 @@ proc add {var name params expected {kind {func}}} {
     lappend result [list "${method_name}($params)" $expect]
 }
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 # Tests for c++/12266 et al
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.exp
index d4bb6fbb82d..5295f736cca 100644
--- a/gdb/testsuite/gdb.cp/method.exp
+++ b/gdb/testsuite/gdb.cp/method.exp
@@ -32,7 +32,7 @@
 # test running programs
 #
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/method2.exp b/gdb/testsuite/gdb.cp/method2.exp
index 04a064bb65b..727cc1a147f 100644
--- a/gdb/testsuite/gdb.cp/method2.exp
+++ b/gdb/testsuite/gdb.cp/method2.exp
@@ -18,7 +18,7 @@
 # This tests setting a break in an ambiguous c++ method with
 # current_language set to c.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp
index 8f14d489c0d..3200e4ccd8a 100644
--- a/gdb/testsuite/gdb.cp/misc.exp
+++ b/gdb/testsuite/gdb.cp/misc.exp
@@ -15,7 +15,7 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/namelessclass.exp b/gdb/testsuite/gdb.cp/namelessclass.exp
index 6f6f7d20304..24cd6256508 100644
--- a/gdb/testsuite/gdb.cp/namelessclass.exp
+++ b/gdb/testsuite/gdb.cp/namelessclass.exp
@@ -20,7 +20,7 @@ load_lib dwarf.exp
 
 # Do not run in environments which do not support C++.
 # This test can only be run on x86-like targets which support DWARF.
-require dwarf2_support !skip_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
     return 0
diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp
index ed7943f4e69..e364816fcb7 100644
--- a/gdb/testsuite/gdb.cp/namespace.exp
+++ b/gdb/testsuite/gdb.cp/namespace.exp
@@ -25,7 +25,7 @@
 
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc namespace1.cc
 
diff --git a/gdb/testsuite/gdb.cp/nested-class-func-class.exp b/gdb/testsuite/gdb.cp/nested-class-func-class.exp
index 1b83f7b3e02..a9986c56b22 100644
--- a/gdb/testsuite/gdb.cp/nested-class-func-class.exp
+++ b/gdb/testsuite/gdb.cp/nested-class-func-class.exp
@@ -15,7 +15,7 @@
 
 # Regression test for type printing of private nested classes.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/nested-types.exp b/gdb/testsuite/gdb.cp/nested-types.exp
index 889d6d7e68c..e4edae8457f 100644
--- a/gdb/testsuite/gdb.cp/nested-types.exp
+++ b/gdb/testsuite/gdb.cp/nested-types.exp
@@ -19,7 +19,7 @@
 # the corresponding source file.  It then walks the nodes of this tree
 # to construct input suitable for passing to cp_test_ptype_class.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/nextoverthrow.exp b/gdb/testsuite/gdb.cp/nextoverthrow.exp
index e6565addafa..b7cd11e0342 100644
--- a/gdb/testsuite/gdb.cp/nextoverthrow.exp
+++ b/gdb/testsuite/gdb.cp/nextoverthrow.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp b/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp
index 3d7ef3a8090..b10daa638e6 100644
--- a/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp
+++ b/gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp
@@ -15,7 +15,7 @@
 
 standard_testfile exceptprint.cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
diff --git a/gdb/testsuite/gdb.cp/non-trivial-retval.exp b/gdb/testsuite/gdb.cp/non-trivial-retval.exp
index 9b8c5b1c460..0cfa9403bd9 100644
--- a/gdb/testsuite/gdb.cp/non-trivial-retval.exp
+++ b/gdb/testsuite/gdb.cp/non-trivial-retval.exp
@@ -17,7 +17,7 @@
 
 set additional_flags ""
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/nsalias.exp b/gdb/testsuite/gdb.cp/nsalias.exp
index 3c2f5e5703f..2727041f074 100644
--- a/gdb/testsuite/gdb.cp/nsalias.exp
+++ b/gdb/testsuite/gdb.cp/nsalias.exp
@@ -18,7 +18,7 @@
 
 load_lib dwarf.exp
 
-require dwarf2_support !skip_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile .cc nsalias-dw.S
 
diff --git a/gdb/testsuite/gdb.cp/overload-const.exp b/gdb/testsuite/gdb.cp/overload-const.exp
index 8ed9c689a5b..4d78b8ce5f9 100644
--- a/gdb/testsuite/gdb.cp/overload-const.exp
+++ b/gdb/testsuite/gdb.cp/overload-const.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp
index ed265fbc306..bd96d3368f5 100644
--- a/gdb/testsuite/gdb.cp/overload.exp
+++ b/gdb/testsuite/gdb.cp/overload.exp
@@ -24,7 +24,7 @@ set ws "\[\r\n\t \]+"
 set nl "\[\r\n\]+"
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp
index a6714995f43..62e45f50d0e 100644
--- a/gdb/testsuite/gdb.cp/ovldbreak.exp
+++ b/gdb/testsuite/gdb.cp/ovldbreak.exp
@@ -28,7 +28,7 @@ set timeout 15
 # test running programs
 #
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ovsrch.exp b/gdb/testsuite/gdb.cp/ovsrch.exp
index f13c2ee97ff..122ff26b760 100644
--- a/gdb/testsuite/gdb.cp/ovsrch.exp
+++ b/gdb/testsuite/gdb.cp/ovsrch.exp
@@ -52,7 +52,7 @@ proc test_class {class} {
     gdb_test "break ${class}::hibob if (a_param == 3)" "Breakpoint (\[0-9\]).*"
 }
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 # Test for c++/11734
 standard_testfile ovsrch1.cc ovsrch2.cc ovsrch3.cc ovsrch4.cc
diff --git a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
index 62ae6b77689..bcb11698a28 100644
--- a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
+++ b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
@@ -25,7 +25,7 @@
 # - have inlined copy ctor
 # - have deleted destructor
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pass-by-ref.exp b/gdb/testsuite/gdb.cp/pass-by-ref.exp
index 5424bcefc2a..e9bbac98e08 100644
--- a/gdb/testsuite/gdb.cp/pass-by-ref.exp
+++ b/gdb/testsuite/gdb.cp/pass-by-ref.exp
@@ -68,7 +68,7 @@
 # The companion test file pass-by-ref-2.exp also contains
 # manually-written cases.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 # The program source is generated in the output directory.
 # We use standard_testfile here to set convenience variables.
diff --git a/gdb/testsuite/gdb.cp/pointer-to-member.exp b/gdb/testsuite/gdb.cp/pointer-to-member.exp
index b69edb1d74f..100acbf5aee 100644
--- a/gdb/testsuite/gdb.cp/pointer-to-member.exp
+++ b/gdb/testsuite/gdb.cp/pointer-to-member.exp
@@ -17,7 +17,7 @@
 
 # Test printing c++ pointer-to-member.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pr-1023.exp b/gdb/testsuite/gdb.cp/pr-1023.exp
index 3ed8f319469..6eeab8efff7 100644
--- a/gdb/testsuite/gdb.cp/pr-1023.exp
+++ b/gdb/testsuite/gdb.cp/pr-1023.exp
@@ -18,7 +18,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/pr-1210.exp b/gdb/testsuite/gdb.cp/pr-1210.exp
index 021710fae68..30b9bd1eee6 100644
--- a/gdb/testsuite/gdb.cp/pr-1210.exp
+++ b/gdb/testsuite/gdb.cp/pr-1210.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/pr-574.exp b/gdb/testsuite/gdb.cp/pr-574.exp
index 2ea821011a3..4854ba20a1b 100644
--- a/gdb/testsuite/gdb.cp/pr-574.exp
+++ b/gdb/testsuite/gdb.cp/pr-574.exp
@@ -20,7 +20,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/pr10728.exp b/gdb/testsuite/gdb.cp/pr10728.exp
index 5fbbace53f6..6432ca32896 100644
--- a/gdb/testsuite/gdb.cp/pr10728.exp
+++ b/gdb/testsuite/gdb.cp/pr10728.exp
@@ -17,7 +17,7 @@
 
 set nl		"\[\r\n\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/pr17132.exp b/gdb/testsuite/gdb.cp/pr17132.exp
index fb9e739a547..3b717dec71a 100644
--- a/gdb/testsuite/gdb.cp/pr17132.exp
+++ b/gdb/testsuite/gdb.cp/pr17132.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pr17494.exp b/gdb/testsuite/gdb.cp/pr17494.exp
index 48a5c2b7a2c..75ba8410afb 100644
--- a/gdb/testsuite/gdb.cp/pr17494.exp
+++ b/gdb/testsuite/gdb.cp/pr17494.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/pr9067.exp b/gdb/testsuite/gdb.cp/pr9067.exp
index cde7b20e41a..388cf00a478 100644
--- a/gdb/testsuite/gdb.cp/pr9067.exp
+++ b/gdb/testsuite/gdb.cp/pr9067.exp
@@ -15,7 +15,7 @@
 
 set nl		"\[\r\n\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/pr9631.exp b/gdb/testsuite/gdb.cp/pr9631.exp
index 3a9e0af4db3..8fd5cece6db 100644
--- a/gdb/testsuite/gdb.cp/pr9631.exp
+++ b/gdb/testsuite/gdb.cp/pr9631.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/print-demangle.exp b/gdb/testsuite/gdb.cp/print-demangle.exp
index 733cd4e360a..78367125a2b 100644
--- a/gdb/testsuite/gdb.cp/print-demangle.exp
+++ b/gdb/testsuite/gdb.cp/print-demangle.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile bool.cc
 
diff --git a/gdb/testsuite/gdb.cp/print-method-args.exp b/gdb/testsuite/gdb.cp/print-method-args.exp
index 8c5d5e2ef3e..75a3bba296d 100644
--- a/gdb/testsuite/gdb.cp/print-method-args.exp
+++ b/gdb/testsuite/gdb.cp/print-method-args.exp
@@ -17,7 +17,7 @@
 
 # This test checks that a constructor and destructor are printed the same.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/printmethod.exp b/gdb/testsuite/gdb.cp/printmethod.exp
index 0cdb271b85e..4ab8b60ffe3 100644
--- a/gdb/testsuite/gdb.cp/printmethod.exp
+++ b/gdb/testsuite/gdb.cp/printmethod.exp
@@ -19,7 +19,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/psmang.exp b/gdb/testsuite/gdb.cp/psmang.exp
index ba3e75666d9..f9644dc3053 100644
--- a/gdb/testsuite/gdb.cp/psmang.exp
+++ b/gdb/testsuite/gdb.cp/psmang.exp
@@ -176,7 +176,7 @@
 #
 
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile psmang1.cc psmang2.cc
 
diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.exp b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
index ad64df6d0b9..b517405d3c6 100644
--- a/gdb/testsuite/gdb.cp/psymtab-parameter.exp
+++ b/gdb/testsuite/gdb.cp/psymtab-parameter.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
index 4f0a6d98be0..ebd7e8d856e 100644
--- a/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
+++ b/gdb/testsuite/gdb.cp/ptype-cv-cp.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ptype-flags.exp b/gdb/testsuite/gdb.cp/ptype-flags.exp
index e09447ed515..71018556840 100644
--- a/gdb/testsuite/gdb.cp/ptype-flags.exp
+++ b/gdb/testsuite/gdb.cp/ptype-flags.exp
@@ -15,7 +15,7 @@
 
 set nl		"\[\r\n\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/punctuator.exp b/gdb/testsuite/gdb.cp/punctuator.exp
index 62433721893..d1d7ab1be19 100644
--- a/gdb/testsuite/gdb.cp/punctuator.exp
+++ b/gdb/testsuite/gdb.cp/punctuator.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.cp/re-set-overloaded.exp b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
index d309c46694b..2b52be119dd 100644
--- a/gdb/testsuite/gdb.cp/re-set-overloaded.exp
+++ b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests !skip_shlib_tests
+require allow_cplus_tests !skip_shlib_tests
 
 standard_testfile bool.cc .cc
 
diff --git a/gdb/testsuite/gdb.cp/ref-params.exp b/gdb/testsuite/gdb.cp/ref-params.exp
index b4c6cee8914..52bbb4d097a 100644
--- a/gdb/testsuite/gdb.cp/ref-params.exp
+++ b/gdb/testsuite/gdb.cp/ref-params.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp
index c1b9866cf67..2187c25c08f 100644
--- a/gdb/testsuite/gdb.cp/ref-types.exp
+++ b/gdb/testsuite/gdb.cp/ref-types.exp
@@ -20,7 +20,7 @@
 # test running programs
 #
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
index 08320536895..a6944b4f919 100644
--- a/gdb/testsuite/gdb.cp/rtti.exp
+++ b/gdb/testsuite/gdb.cp/rtti.exp
@@ -26,7 +26,7 @@
 # (involving templates, in particular) where this problem triggers
 # because GDB and GCC have different ideas what a class is called.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp b/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp
index f1399ef1657..6c013973e06 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-casts.exp
@@ -17,7 +17,7 @@
 
 # C++11 rvalue reference type casting tests, based on gdb.cp/casts.exp.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
index 94ac3841eb6..ec8d056e94f 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
@@ -18,7 +18,7 @@
 # Tests for overloaded member functions with rvalue reference parameters,
 # based on gdb.cp/overload.exp.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
index 46c32cebf9a..3a741963113 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-params.exp
@@ -16,7 +16,7 @@
 # Tests for rvalue reference parameters of types and their subtypes in GDB,
 # based on gdb.cp/ref-params.exp.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp b/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp
index 52e8c682ef7..fe2c9c5aafb 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp
@@ -18,7 +18,7 @@
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing ${testfile}.exp $testfile $srcfile \
     {debug c++ additional_flags="-std=gnu++11"}] } {
diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp
index f2963be0c52..9029be91f9b 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp
@@ -16,7 +16,7 @@
 # Tests for reference types with short type variables in GDB, based on
 # gdb.cp/ref-types.exp.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/scope-err.exp b/gdb/testsuite/gdb.cp/scope-err.exp
index e2dec7326a4..bd0f1b719cf 100644
--- a/gdb/testsuite/gdb.cp/scope-err.exp
+++ b/gdb/testsuite/gdb.cp/scope-err.exp
@@ -16,7 +16,7 @@
 # Tests for linespec errors with C++.
 # Derived from gdb.linespec/ls-errs.exp.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 set exefile $testfile
diff --git a/gdb/testsuite/gdb.cp/static-method.exp b/gdb/testsuite/gdb.cp/static-method.exp
index 282b5b7ce0d..775867579dc 100644
--- a/gdb/testsuite/gdb.cp/static-method.exp
+++ b/gdb/testsuite/gdb.cp/static-method.exp
@@ -37,7 +37,7 @@ proc test_breakpoint {func result} {
     }
 }
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 # Tests for c++/12750
 standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/static-print-quit.exp b/gdb/testsuite/gdb.cp/static-print-quit.exp
index f7f3ec095eb..1c333a7fa11 100644
--- a/gdb/testsuite/gdb.cp/static-print-quit.exp
+++ b/gdb/testsuite/gdb.cp/static-print-quit.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/static-typedef-print.exp b/gdb/testsuite/gdb.cp/static-typedef-print.exp
index 91fa658c437..f63f04a4147 100644
--- a/gdb/testsuite/gdb.cp/static-typedef-print.exp
+++ b/gdb/testsuite/gdb.cp/static-typedef-print.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/stub-array-size.exp b/gdb/testsuite/gdb.cp/stub-array-size.exp
index 9492c47a72c..0afe232d583 100644
--- a/gdb/testsuite/gdb.cp/stub-array-size.exp
+++ b/gdb/testsuite/gdb.cp/stub-array-size.exp
@@ -18,7 +18,7 @@
 # Test size of arrays of stubbed types (structures where the full definition
 # is not immediately available).
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc stub-array-size2.cc
 
diff --git a/gdb/testsuite/gdb.cp/subtypes.exp b/gdb/testsuite/gdb.cp/subtypes.exp
index 67372c59a65..f5cf349cc26 100644
--- a/gdb/testsuite/gdb.cp/subtypes.exp
+++ b/gdb/testsuite/gdb.cp/subtypes.exp
@@ -16,7 +16,7 @@
 # Test for subtype definitions, i.e., types defined in classes, functions,
 # etc.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/temargs.exp b/gdb/testsuite/gdb.cp/temargs.exp
index 4d7677ea725..8ee0d260076 100644
--- a/gdb/testsuite/gdb.cp/temargs.exp
+++ b/gdb/testsuite/gdb.cp/temargs.exp
@@ -17,7 +17,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp
index 41709b503e3..ba21c4727d3 100644
--- a/gdb/testsuite/gdb.cp/templates.exp
+++ b/gdb/testsuite/gdb.cp/templates.exp
@@ -17,7 +17,7 @@
 
 set ws "\[\r\n\t \]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/try_catch.exp b/gdb/testsuite/gdb.cp/try_catch.exp
index 9dd7eecbfe3..58ab88220e4 100644
--- a/gdb/testsuite/gdb.cp/try_catch.exp
+++ b/gdb/testsuite/gdb.cp/try_catch.exp
@@ -18,7 +18,7 @@
 
 # This file is part of the gdb testsuite
 
-require !skip_stl_tests
+require allow_stl_tests
 
 #
 # test running programs
diff --git a/gdb/testsuite/gdb.cp/typed-enum.exp b/gdb/testsuite/gdb.cp/typed-enum.exp
index ad6aa29d2aa..1d11fb5a302 100644
--- a/gdb/testsuite/gdb.cp/typed-enum.exp
+++ b/gdb/testsuite/gdb.cp/typed-enum.exp
@@ -15,7 +15,7 @@
 #
 # Check if unsigned typedef are handled correctly with typed enums.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/typedef-base.exp b/gdb/testsuite/gdb.cp/typedef-base.exp
index 7a0d5f237d8..7dfccc388fe 100644
--- a/gdb/testsuite/gdb.cp/typedef-base.exp
+++ b/gdb/testsuite/gdb.cp/typedef-base.exp
@@ -15,7 +15,7 @@
 #
 # Make sure that inheritance through a typedef is well handled.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/typedef-operator.exp b/gdb/testsuite/gdb.cp/typedef-operator.exp
index f0cfc4b011d..d2f00896a56 100644
--- a/gdb/testsuite/gdb.cp/typedef-operator.exp
+++ b/gdb/testsuite/gdb.cp/typedef-operator.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/typeid.exp b/gdb/testsuite/gdb.cp/typeid.exp
index b4766d003dc..fb8f0aa023e 100644
--- a/gdb/testsuite/gdb.cp/typeid.exp
+++ b/gdb/testsuite/gdb.cp/typeid.exp
@@ -15,7 +15,7 @@
 
 standard_testfile .cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
diff --git a/gdb/testsuite/gdb.cp/userdef.exp b/gdb/testsuite/gdb.cp/userdef.exp
index 1ab609bd480..9b5a6f11f96 100644
--- a/gdb/testsuite/gdb.cp/userdef.exp
+++ b/gdb/testsuite/gdb.cp/userdef.exp
@@ -19,7 +19,7 @@
 # source file "userdef.cc"
 #
 
-require !skip_stl_tests
+require allow_stl_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp
index aa615986ee2..5db6a8be576 100644
--- a/gdb/testsuite/gdb.cp/var-tag.exp
+++ b/gdb/testsuite/gdb.cp/var-tag.exp
@@ -17,7 +17,7 @@
 
 # Test expressions in which variable names shadow tag names.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile var-tag.cc var-tag-2.cc var-tag-3.cc var-tag-4.cc
 
diff --git a/gdb/testsuite/gdb.cp/virtbase.exp b/gdb/testsuite/gdb.cp/virtbase.exp
index 8408235d507..631c5ee438c 100644
--- a/gdb/testsuite/gdb.cp/virtbase.exp
+++ b/gdb/testsuite/gdb.cp/virtbase.exp
@@ -15,7 +15,7 @@
 
 # This file is part of the gdb testsuite.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/virtbase2.exp b/gdb/testsuite/gdb.cp/virtbase2.exp
index 9b18f599703..54bc07c0cb2 100644
--- a/gdb/testsuite/gdb.cp/virtbase2.exp
+++ b/gdb/testsuite/gdb.cp/virtbase2.exp
@@ -15,7 +15,7 @@
 
 # Make sure printing virtual base class data member works correctly (PR16841)
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index 89c5b6da7a5..445befddf28 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -18,7 +18,7 @@
 
 set nl		"\[\r\n\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/virtfunc2.exp b/gdb/testsuite/gdb.cp/virtfunc2.exp
index de9ed11b9f8..a7b96ae40bf 100644
--- a/gdb/testsuite/gdb.cp/virtfunc2.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc2.exp
@@ -18,7 +18,7 @@
 
 set nl		"\[\r\n\]+"
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib "cp-support.exp"
 
diff --git a/gdb/testsuite/gdb.cp/watch-cp.exp b/gdb/testsuite/gdb.cp/watch-cp.exp
index 62429f76041..6ef245e9e72 100644
--- a/gdb/testsuite/gdb.cp/watch-cp.exp
+++ b/gdb/testsuite/gdb.cp/watch-cp.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests !skip_hw_watchpoint_tests
+require allow_cplus_tests !skip_hw_watchpoint_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
index 715152829eb..2155efe1863 100644
--- a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
+++ b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index 422e3f8559d..b24500b8301 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
@@ -18,7 +18,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
index 867cd1b6a6c..032aec86731 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -17,7 +17,7 @@
 # type containing a static member of the same type.
 
 # Still no C++ compiler is used.
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index 4fd54825718..6cad9c32d61 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -17,7 +17,7 @@
 # type containing a static member of the same type.
 
 # Still no C++ compiler is used.
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 9199f3c7a5b..109fa4bdade 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -18,7 +18,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index 6102a96d988..e6cd728d088 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -18,7 +18,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp
index bcff7bb7729..8ab51b627ef 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-array.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp
@@ -16,7 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global array whose location is a DW_OP_addr.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp
index 13608eaa8ff..19c6a8d8775 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp
@@ -16,7 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a DW_AT_const_value.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp
index e01aeafc84b..f0f1cd70048 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-global.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp
@@ -16,7 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global variable whose location is a DW_OP_addr.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
index 822256bea38..83427688d3e 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
@@ -16,7 +16,7 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global struct whose location is a DW_OP_addr.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
index f1dfed83e6a..7e28931be22 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
@@ -22,7 +22,7 @@
 # on specific compiler versions or use of optimization switches, in
 # this case -flto.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index 1abc4141041..9afad943d1c 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index c3a75c35c4a..1bcbbb44e94 100644
--- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index 22784554014..22370de3d71 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile main.c -dw4.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
index f0bea26faba..945bc335fd4 100644
--- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
+++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
index f77a136de1f..c40c7677f7f 100644
--- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
+++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index f35f0af5368..96466e7afe5 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index 253295d6538..72d7babc88e 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile method-ptr.cc -dw.S
 
diff --git a/gdb/testsuite/gdb.guile/scm-value-cc.exp b/gdb/testsuite/gdb.guile/scm-value-cc.exp
index 3e68707ddbc..5b2a3c96c80 100644
--- a/gdb/testsuite/gdb.guile/scm-value-cc.exp
+++ b/gdb/testsuite/gdb.guile/scm-value-cc.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-guile.exp
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp
index ee49c01599e..9858b1c1a38 100644
--- a/gdb/testsuite/gdb.guile/scm-value.exp
+++ b/gdb/testsuite/gdb.guile/scm-value.exp
@@ -451,7 +451,7 @@ test_value_after_death
 
 test_subscript_regression "${binfile}" "c"
 
-if ![skip_cplus_tests] {
+if {[allow_cplus_tests]} {
     if { [build_inferior "${binfile}-cxx" "c++"] < 0 } {
 	return
     }
diff --git a/gdb/testsuite/gdb.linespec/break-ask.exp b/gdb/testsuite/gdb.linespec/break-ask.exp
index 1895a509c25..8de8a958022 100644
--- a/gdb/testsuite/gdb.linespec/break-ask.exp
+++ b/gdb/testsuite/gdb.linespec/break-ask.exp
@@ -15,7 +15,7 @@
 
 standard_testfile lspec.cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 set opts {debug c++}
 set objfile1 [standard_output_file ${testfile}one.o]
diff --git a/gdb/testsuite/gdb.linespec/cpexplicit.exp b/gdb/testsuite/gdb.linespec/cpexplicit.exp
index 959e399663c..2a829bf526c 100644
--- a/gdb/testsuite/gdb.linespec/cpexplicit.exp
+++ b/gdb/testsuite/gdb.linespec/cpexplicit.exp
@@ -15,7 +15,7 @@
 
 # Tests for explicit linespecs
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 standard_testfile .cc
 set exefile $testfile
diff --git a/gdb/testsuite/gdb.linespec/linespec.exp b/gdb/testsuite/gdb.linespec/linespec.exp
index 1a819cab9b4..f0ff97b8f45 100644
--- a/gdb/testsuite/gdb.linespec/linespec.exp
+++ b/gdb/testsuite/gdb.linespec/linespec.exp
@@ -22,7 +22,7 @@ set exefile $testfile
 set baseone base/one/thefile.cc
 set basetwo base/two/thefile.cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $exefile \
 	 [list $srcfile $baseone $basetwo] \
diff --git a/gdb/testsuite/gdb.linespec/ls-dollar.exp b/gdb/testsuite/gdb.linespec/ls-dollar.exp
index 4ce57572050..2707e885faf 100644
--- a/gdb/testsuite/gdb.linespec/ls-dollar.exp
+++ b/gdb/testsuite/gdb.linespec/ls-dollar.exp
@@ -18,7 +18,7 @@
 standard_testfile .cc
 set exefile $testfile
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $exefile $srcfile \
 	 {debug nowarnings c++}]} {
diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp
index 614ea9a584a..08dca4b4913 100644
--- a/gdb/testsuite/gdb.linespec/ls-errs.exp
+++ b/gdb/testsuite/gdb.linespec/ls-errs.exp
@@ -30,7 +30,7 @@ proc do_test {lang} {
     set options {debug}
 
     if {$lang == "C++"} {
-	if {[skip_cplus_tests]} {
+	if {![allow_cplus_tests]} {
 	    return 0
 	}
 	# Build ".c" source file with g++.
diff --git a/gdb/testsuite/gdb.linespec/skip-two.exp b/gdb/testsuite/gdb.linespec/skip-two.exp
index 30dd7cb0641..3ac6f890b6b 100644
--- a/gdb/testsuite/gdb.linespec/skip-two.exp
+++ b/gdb/testsuite/gdb.linespec/skip-two.exp
@@ -20,7 +20,7 @@ set execfile $testfile
 set baseone base/one/thefile.cc
 set basetwo base/two/thefile.cc
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 if {[prepare_for_testing "failed to prepare" $execfile \
 	 [list $srcfile $baseone $basetwo] \
diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp
index 65279de1dce..2001f11b6fa 100644
--- a/gdb/testsuite/gdb.mi/gdb792.exp
+++ b/gdb/testsuite/gdb.mi/gdb792.exp
@@ -16,7 +16,7 @@
 # Test that children of classes are properly reported.  Regression
 # test for gdb/792.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp
index a130acc193a..ac2d8e18828 100644
--- a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp
+++ b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp
@@ -15,7 +15,7 @@
 
 # Test the -catch-throw, -catch-rethrow, and -catch-catch MI commands.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
index 7af5d3393f5..a0976c071a7 100644
--- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
+++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp b/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
index 645cbefca80..57bc4a59d5a 100644
--- a/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
+++ b/gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
@@ -17,7 +17,7 @@
 # errors is generated when setting a breakpoint in a non-existent
 # file with a Windows-style logical drive names and C++.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.exp b/gdb/testsuite/gdb.mi/mi-var-cp.exp
index cc683ad0584..fa28e58f801 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cp.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-rtti.exp
index 6ae6760ba99..c724078a5cb 100644
--- a/gdb/testsuite/gdb.mi/mi-var-rtti.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-rtti.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests
+require allow_cplus_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp
index d3678cf71ca..a467e84a482 100644
--- a/gdb/testsuite/gdb.python/py-explore-cc.exp
+++ b/gdb/testsuite/gdb.python/py-explore-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_cplus_tests !skip_python_tests
+require allow_cplus_tests !skip_python_tests
 
 standard_testfile py-explore.cc
 
diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
index 66a010108f4..aeb3f9c93cd 100644
--- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
@@ -17,7 +17,7 @@
 # exposing rvalue reference values to Python.  It is based on
 # gdb.python/py-value-cc.exp.
 
-require !skip_cplus_tests !skip_python_tests
+require allow_cplus_tests !skip_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp
index 14ebb670188..b337bfb8f01 100644
--- a/gdb/testsuite/gdb.python/py-template.exp
+++ b/gdb/testsuite/gdb.python/py-template.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_cplus_tests !skip_python_tests
+require allow_cplus_tests !skip_python_tests
 
 standard_testfile .cc
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index 37e29294805..219e8527ecb 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -13,7 +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/>.
 
-require !skip_cplus_tests !skip_python_tests
+require allow_cplus_tests !skip_python_tests
 
 load_lib gdb-python.exp
 load_lib cp-support.exp
diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp
index 4085a87440e..69439e226bf 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-value-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_cplus_tests !skip_python_tests
+require allow_cplus_tests !skip_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
index 8ab188c7ea5..26ad72a5401 100644
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -664,7 +664,7 @@ test_value_after_death
 
 test_subscript_regression "${binfile}" "c"
 
-if ![skip_cplus_tests] {
+if {[allow_cplus_tests]} {
     if { [build_inferior "${binfile}-cxx" "c++"] < 0 } {
 	return -1
     }
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index 6a9e5f22dc1..c164fec82aa 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_cplus_tests !skip_python_tests
+require allow_cplus_tests !skip_python_tests
 
 standard_testfile py-xmethods.cc
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 40a12612b3e..b1d0e7aefdf 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2379,29 +2379,28 @@ proc gdb_compile_test {src output} {
     fail "$msg"
 }
 
-# Return a 1 for configurations for which we don't even want to try to
-# test C++.
+# Return a 1 for configurations for which we want to try to test C++.
 
-proc skip_cplus_tests {} {
+proc allow_cplus_tests {} {
     if { [istarget "h8300-*-*"] } {
-	return 1
+	return 0
     }
 
     # The C++ IO streams are too large for HC11/HC12 and are thus not
     # available.  The gdb C++ tests use them and don't compile.
     if { [istarget "m6811-*-*"] } {
-	return 1
+	return 0
     }
     if { [istarget "m6812-*-*"] } {
-	return 1
+	return 0
     }
-    return 0
+    return 1
 }
 
-# Return a 1 for configurations for which don't have both C++ and the STL.
+# Return a 0 for configurations which are missing either C++ or the STL.
 
-proc skip_stl_tests {} {
-    return [skip_cplus_tests]
+proc allow_stl_tests {} {
+    return [allow_cplus_tests]
 }
 
 # Return a 1 if I don't even want to try to test FORTRAN.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 59/79] Rename to allow_ctf_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (57 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 58/79] Rename to allow_cplus_tests and allow_stl_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 60/79] Rename to allow_debuginfod_tests Tom Tromey
                   ` (21 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_ctf_tests to invert the sense, and renames it to
allow_ctf_tests.
---
 gdb/testsuite/gdb.base/ctf-constvars.exp  | 2 +-
 gdb/testsuite/gdb.base/ctf-ptype.exp      | 2 +-
 gdb/testsuite/gdb.base/cvexpr.exp         | 2 +-
 gdb/testsuite/gdb.base/whatis.exp         | 2 +-
 gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp | 2 +-
 gdb/testsuite/gdb.ctf/funcreturn.exp      | 2 +-
 gdb/testsuite/gdb.ctf/multi.exp           | 2 +-
 gdb/testsuite/lib/gdb.exp                 | 6 +++---
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/gdb.base/ctf-constvars.exp b/gdb/testsuite/gdb.base/ctf-constvars.exp
index 7737401bbab..7b3c0f69da8 100644
--- a/gdb/testsuite/gdb.base/ctf-constvars.exp
+++ b/gdb/testsuite/gdb.base/ctf-constvars.exp
@@ -24,7 +24,7 @@
 #            const pointers to const vars
 # with mixed types.
 
-require !skip_ctf_tests
+require allow_ctf_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/ctf-ptype.exp b/gdb/testsuite/gdb.base/ctf-ptype.exp
index 4010cf4e15e..4a81993628e 100644
--- a/gdb/testsuite/gdb.base/ctf-ptype.exp
+++ b/gdb/testsuite/gdb.base/ctf-ptype.exp
@@ -15,7 +15,7 @@
 
 # This file is a subset of ptype.exp written by Rob Savoye. (rob@cygnus.com)
 
-require !skip_ctf_tests
+require allow_ctf_tests
 
 # Some tests require GCC.
 set gcc_compiled [is_c_compiler_gcc]
diff --git a/gdb/testsuite/gdb.base/cvexpr.exp b/gdb/testsuite/gdb.base/cvexpr.exp
index 3d78936350a..bbaa7d4983b 100644
--- a/gdb/testsuite/gdb.base/cvexpr.exp
+++ b/gdb/testsuite/gdb.base/cvexpr.exp
@@ -497,7 +497,7 @@ lappend ctf_opts ldflags=-Wl,--strip-debug
 
 # Build up the set of debug formats for which we will run this test.
 set specs { {dwarf {debug}} }
-if ![skip_ctf_tests] {
+if {[allow_ctf_tests]} {
     lappend specs [list ctf $ctf_opts]
 }
 
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp
index 2da9aecc600..3736e78bbdc 100644
--- a/gdb/testsuite/gdb.base/whatis.exp
+++ b/gdb/testsuite/gdb.base/whatis.exp
@@ -592,7 +592,7 @@ lappend ctf_opts ldflags=-Wl,--ctf-variables
 
 # Build up the set of debug formats for which we will run this test.
 set specs { {dwarf {debug}} }
-if ![skip_ctf_tests] {
+if {[allow_ctf_tests]} {
     lappend specs [list ctf $ctf_opts]
 }
 
diff --git a/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp b/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
index 4ce178af2c0..0292e394646 100644
--- a/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
+++ b/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
@@ -15,7 +15,7 @@
 
 # This file is a subset of ptype.exp written by Rob Savoye. (rob@cygnus.com)
 
-require !skip_ctf_tests
+require allow_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 a65a1cbf7ad..64ed031f693 100644
--- a/gdb/testsuite/gdb.ctf/funcreturn.exp
+++ b/gdb/testsuite/gdb.ctf/funcreturn.exp
@@ -13,7 +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/>.
 
-require !skip_ctf_tests
+require allow_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 0afbdc5a6ab..c82d1b952e3 100644
--- a/gdb/testsuite/gdb.ctf/multi.exp
+++ b/gdb/testsuite/gdb.ctf/multi.exp
@@ -15,7 +15,7 @@
 
 # This file is a subset of ptype.exp written by Rob Savoye. (rob@cygnus.com)
 
-require !skip_ctf_tests
+require allow_ctf_tests
 
 standard_testfile ctf-a.c ctf-b.c ctf-c.c
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b1d0e7aefdf..e2feebfab8f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -8522,11 +8522,11 @@ proc cmp_binary_files { file1 file2 } {
 # flag?  If not then we should skip these tests.  We should also
 # skip them if libctf was explicitly disabled.
 
-gdb_caching_proc skip_ctf_tests {
+gdb_caching_proc allow_ctf_tests {
     global enable_libctf
 
     if {$enable_libctf eq "no"} {
-	return 1
+	return 0
     }
 
     set can_ctf [gdb_can_simple_compile ctfdebug {
@@ -8535,7 +8535,7 @@ gdb_caching_proc skip_ctf_tests {
 	}
     } executable "additional_flags=-gctf"]
 
-    return [expr {!$can_ctf}]
+    return $can_ctf
 }
 
 # Return 1 if compiler supports -gstatement-frontiers.  Otherwise,
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 60/79] Rename to allow_debuginfod_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (58 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 59/79] Rename to allow_ctf_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 61/79] Rename to allow_dlmopen_tests Tom Tromey
                   ` (20 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_debuginfod_tests to invert the sense, and renames it
to allow_debuginfod_tests.
---
 .../gdb.debuginfod/fetch_src_and_symbols.exp       |  2 +-
 gdb/testsuite/lib/debuginfod-support.exp           | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index e2c77eb109f..c9cd8a30a1c 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -20,7 +20,7 @@ standard_testfile
 load_lib dwarf.exp
 load_lib debuginfod-support.exp
 
-require !skip_debuginfod_tests
+require allow_debuginfod_tests
 
 set sourcetmp [standard_output_file tmp-${srcfile}]
 set outputdir [standard_output_file {}]
diff --git a/gdb/testsuite/lib/debuginfod-support.exp b/gdb/testsuite/lib/debuginfod-support.exp
index ad156f23d03..50a8b512a4a 100644
--- a/gdb/testsuite/lib/debuginfod-support.exp
+++ b/gdb/testsuite/lib/debuginfod-support.exp
@@ -15,20 +15,20 @@
 
 # Helper functions to make it easier to write debuginfod tests.
 
-# Return true if the debuginfod tests should be skipped, otherwise, return
+# Return true if the debuginfod tests should be run, otherwise, return
 # false.
-proc skip_debuginfod_tests {} {
+proc allow_debuginfod_tests {} {
     if [is_remote host] {
-	return true
+	return false
     }
 
     if { [which debuginfod] == 0 } {
-	return true
+	return false
     }
 
     if { [which curl] == 0 } {
 	untested "cannot find curl"
-	return true
+	return false
     }
 
     # Skip testing if gdb was not configured with debuginfod.
@@ -39,10 +39,10 @@ proc skip_debuginfod_tests {} {
     if { [string first "with-debuginfod" \
 	      [eval exec $::GDB --quiet $::INTERNAL_GDBFLAGS \
 		   --configuration]] == -1 } {
-	return true
+	return false
     }
 
-    return false
+    return true
 }
 
 # Create two directories within the current output directory.  One directory
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 61/79] Rename to allow_dlmopen_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (59 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 60/79] Rename to allow_debuginfod_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 62/79] Rename to allow_d_tests Tom Tromey
                   ` (19 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_dlmopen_tests to invert the sense, and renames it to
allow_dlmopen_tests.
---
 gdb/testsuite/gdb.base/dlmopen.exp |  2 +-
 gdb/testsuite/lib/gdb.exp          | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.base/dlmopen.exp b/gdb/testsuite/gdb.base/dlmopen.exp
index 54a5eadee2d..ddb832a64f8 100644
--- a/gdb/testsuite/gdb.base/dlmopen.exp
+++ b/gdb/testsuite/gdb.base/dlmopen.exp
@@ -21,7 +21,7 @@
 # We test that GDB shows the correct number of instances of the libraries
 # the test loaded while unloading them one-by-one.
 
-require !skip_dlmopen_tests
+require allow_dlmopen_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index e2feebfab8f..edf26e7b999 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2476,17 +2476,17 @@ proc skip_shlib_tests {} {
     return 1
 }
 
-# Return 1 if we should skip dlmopen tests, 0 if we should not.
+# Return 1 if we should run dlmopen tests, 0 if we should not.
 
-gdb_caching_proc skip_dlmopen_tests {
+gdb_caching_proc allow_dlmopen_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
     # We need shared library support.
     if { [skip_shlib_tests] } {
-	return 1
+	return 0
     }
 
-    set me "skip_dlmopen_tests"
+    set me "allow_dlmopen_tests"
     set lib {
 	int foo (void) {
 	    return 42;
@@ -2536,13 +2536,13 @@ gdb_caching_proc skip_dlmopen_tests {
 
     if { [gdb_compile_shlib $libsrc $libout {debug}] != "" } {
 	verbose -log "failed to build library"
-	return 1
+	return 0
     }
     if { ![gdb_simple_compile $me $src executable \
 	       [list shlib_load debug \
 		    additional_flags=-DDSO_NAME=\"$libout\"]] } {
 	verbose -log "failed to build executable"
-        return 1
+	return 0
     }
 
     gdb_exit
@@ -2552,24 +2552,24 @@ gdb_caching_proc skip_dlmopen_tests {
 
     if { [gdb_run_cmd] != 0 } {
 	verbose -log "failed to start skip test"
-	return 1
+	return 0
     }
     gdb_expect {
         -re "$inferior_exited_re normally.*${gdb_prompt} $" {
-            set skip_dlmopen_tests 0
+	    set allow_dlmopen_tests 1
         }
         -re "$inferior_exited_re with code.*${gdb_prompt} $" {
-            set skip_dlmopen_tests 1
+	    set allow_dlmopen_tests 0
         }
         default {
 	    warning "\n$me: default case taken"
-            set skip_dlmopen_tests 1
+	    set allow_dlmopen_tests 0
         }
     }
     gdb_exit
 
-    verbose "$me:  returning $skip_dlmopen_tests" 2
-    return $skip_dlmopen_tests
+    verbose "$me:  returning $allow_dlmopen_tests" 2
+    return $allow_dlmopen_tests
 }
 
 # Return 1 if we should skip tui related tests.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 62/79] Rename to allow_d_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (60 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 61/79] Rename to allow_dlmopen_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 63/79] Rename to allow_fortran_tests Tom Tromey
                   ` (18 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_d_tests to invert the sense, and renames it to
allow_d_tests.
---
 gdb/testsuite/gdb.dlang/circular.exp        | 2 +-
 gdb/testsuite/gdb.dlang/debug-expr.exp      | 2 +-
 gdb/testsuite/gdb.dlang/demangle.exp        | 2 +-
 gdb/testsuite/gdb.dlang/expression.exp      | 2 +-
 gdb/testsuite/gdb.dlang/primitive-types.exp | 2 +-
 gdb/testsuite/gdb.dlang/properties.exp      | 2 +-
 gdb/testsuite/gdb.dlang/watch-loc.exp       | 2 +-
 gdb/testsuite/lib/gdb.exp                   | 6 +++---
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/gdb.dlang/circular.exp b/gdb/testsuite/gdb.dlang/circular.exp
index e2b0b8ad691..2c54c5c72a4 100644
--- a/gdb/testsuite/gdb.dlang/circular.exp
+++ b/gdb/testsuite/gdb.dlang/circular.exp
@@ -18,7 +18,7 @@
 load_lib "d-support.exp"
 load_lib "dwarf.exp"
 
-require !skip_d_tests dwarf2_support
+require allow_d_tests dwarf2_support
 
 standard_testfile circular.c circular-dw.S
 
diff --git a/gdb/testsuite/gdb.dlang/debug-expr.exp b/gdb/testsuite/gdb.dlang/debug-expr.exp
index aa5770080fc..4f3c63eab77 100644
--- a/gdb/testsuite/gdb.dlang/debug-expr.exp
+++ b/gdb/testsuite/gdb.dlang/debug-expr.exp
@@ -15,7 +15,7 @@
 
 # Test "set debug expr 1" on d expressions.
 
-require !skip_d_tests
+require allow_d_tests
 
 gdb_start
 gdb_test_no_output "set language d"
diff --git a/gdb/testsuite/gdb.dlang/demangle.exp b/gdb/testsuite/gdb.dlang/demangle.exp
index 23b2149974d..111042cbe78 100644
--- a/gdb/testsuite/gdb.dlang/demangle.exp
+++ b/gdb/testsuite/gdb.dlang/demangle.exp
@@ -19,7 +19,7 @@
 
 load_lib "d-support.exp"
 
-require !skip_d_tests
+require allow_d_tests
 
 ### Utility function for test_demangling and test_demangling_exact.
 proc test_demangling {test result} {
diff --git a/gdb/testsuite/gdb.dlang/expression.exp b/gdb/testsuite/gdb.dlang/expression.exp
index 3e82ad90deb..2f80b3390a0 100644
--- a/gdb/testsuite/gdb.dlang/expression.exp
+++ b/gdb/testsuite/gdb.dlang/expression.exp
@@ -18,7 +18,7 @@
 
 load_lib "d-support.exp"
 
-require !skip_d_tests
+require allow_d_tests
 
 proc test_d_integer_literals {} {
     # Test valid D integer literals are accepted.
diff --git a/gdb/testsuite/gdb.dlang/primitive-types.exp b/gdb/testsuite/gdb.dlang/primitive-types.exp
index 7a114fc020f..3fd6d2d6e41 100644
--- a/gdb/testsuite/gdb.dlang/primitive-types.exp
+++ b/gdb/testsuite/gdb.dlang/primitive-types.exp
@@ -18,7 +18,7 @@
 
 load_lib "d-support.exp"
 
-require !skip_d_tests
+require allow_d_tests
 
 proc test_builtin_d_types_accepted {} {
     # Test types are recognised.
diff --git a/gdb/testsuite/gdb.dlang/properties.exp b/gdb/testsuite/gdb.dlang/properties.exp
index 9164ce8ee5d..474c18b3177 100644
--- a/gdb/testsuite/gdb.dlang/properties.exp
+++ b/gdb/testsuite/gdb.dlang/properties.exp
@@ -18,7 +18,7 @@
 
 load_lib "d-support.exp"
 
-require !skip_d_tests
+require allow_d_tests
 
 proc test_d_sizeof {} {
     # Test use of .sizeof with types and expressions.
diff --git a/gdb/testsuite/gdb.dlang/watch-loc.exp b/gdb/testsuite/gdb.dlang/watch-loc.exp
index 4b240b13fcf..6ac99778f9c 100644
--- a/gdb/testsuite/gdb.dlang/watch-loc.exp
+++ b/gdb/testsuite/gdb.dlang/watch-loc.exp
@@ -18,7 +18,7 @@
 load_lib "d-support.exp"
 load_lib "dwarf.exp"
 
-require !skip_d_tests dwarf2_support
+require allow_d_tests dwarf2_support
 
 standard_testfile watch-loc.c watch-loc-dw.S
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index edf26e7b999..6334314fd87 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2421,10 +2421,10 @@ proc skip_go_tests {} {
     return 0
 }
 
-# Return a 1 if I don't even want to try to test D.
+# Return a 1 if I even want to try to test D.
 
-proc skip_d_tests {} {
-    return 0
+proc allow_d_tests {} {
+    return 1
 }
 
 # Return 1 to skip Rust tests, 0 to try them.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 63/79] Rename to allow_fortran_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (61 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 62/79] Rename to allow_d_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 64/79] Rename to allow_gdbserver_tests Tom Tromey
                   ` (17 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_fortran_tests to invert the sense, and renames it to
allow_fortran_tests.
---
 gdb/testsuite/gdb.dwarf2/dw2-common-block.exp             | 2 +-
 gdb/testsuite/gdb.fortran/allocated.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/array-bounds-high.exp           | 2 +-
 gdb/testsuite/gdb.fortran/array-bounds.exp                | 2 +-
 gdb/testsuite/gdb.fortran/array-element.exp               | 2 +-
 gdb/testsuite/gdb.fortran/array-indices.exp               | 2 +-
 gdb/testsuite/gdb.fortran/array-no-bounds.exp             | 2 +-
 gdb/testsuite/gdb.fortran/array-repeat.exp                | 2 +-
 gdb/testsuite/gdb.fortran/array-slices-bad.exp            | 2 +-
 gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp     | 2 +-
 gdb/testsuite/gdb.fortran/array-slices.exp                | 2 +-
 gdb/testsuite/gdb.fortran/associated.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/assumedrank.exp                 | 2 +-
 gdb/testsuite/gdb.fortran/block-data.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/call-no-debug.exp               | 2 +-
 gdb/testsuite/gdb.fortran/charset.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/class-allocatable-array.exp     | 2 +-
 gdb/testsuite/gdb.fortran/common-block.exp                | 2 +-
 gdb/testsuite/gdb.fortran/completion.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/complex.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/debug-expr.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/derived-type-function.exp       | 2 +-
 gdb/testsuite/gdb.fortran/derived-type-striding.exp       | 2 +-
 gdb/testsuite/gdb.fortran/derived-type.exp                | 2 +-
 gdb/testsuite/gdb.fortran/dot-ops.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp        | 2 +-
 gdb/testsuite/gdb.fortran/empty-string.exp                | 2 +-
 gdb/testsuite/gdb.fortran/exprs.exp                       | 2 +-
 gdb/testsuite/gdb.fortran/function-calls.exp              | 2 +-
 gdb/testsuite/gdb.fortran/info-modules.exp                | 2 +-
 gdb/testsuite/gdb.fortran/info-types.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/intrinsics.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/lbound-ubound.exp               | 2 +-
 gdb/testsuite/gdb.fortran/library-module.exp              | 2 +-
 gdb/testsuite/gdb.fortran/logical.exp                     | 2 +-
 gdb/testsuite/gdb.fortran/max-depth.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/mixed-lang-stack.exp            | 2 +-
 gdb/testsuite/gdb.fortran/module.exp                      | 2 +-
 gdb/testsuite/gdb.fortran/multi-dim.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/namelist.exp                    | 2 +-
 gdb/testsuite/gdb.fortran/nested-funcs-2.exp              | 2 +-
 gdb/testsuite/gdb.fortran/nested-funcs.exp                | 2 +-
 gdb/testsuite/gdb.fortran/oop_extend_type.exp             | 2 +-
 gdb/testsuite/gdb.fortran/pointer-to-pointer.exp          | 2 +-
 gdb/testsuite/gdb.fortran/print-formatted.exp             | 2 +-
 gdb/testsuite/gdb.fortran/print_type.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/printing-types.exp              | 2 +-
 gdb/testsuite/gdb.fortran/ptr-indentation.exp             | 2 +-
 gdb/testsuite/gdb.fortran/ptype-on-functions.exp          | 2 +-
 gdb/testsuite/gdb.fortran/rank.exp                        | 2 +-
 gdb/testsuite/gdb.fortran/shape.exp                       | 2 +-
 gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp | 2 +-
 gdb/testsuite/gdb.fortran/size.exp                        | 2 +-
 gdb/testsuite/gdb.fortran/string-types.exp                | 2 +-
 gdb/testsuite/gdb.fortran/subarray.exp                    | 2 +-
 gdb/testsuite/gdb.fortran/type-kinds.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/types.exp                       | 2 +-
 gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp             | 2 +-
 gdb/testsuite/gdb.fortran/vla-datatypes.exp               | 2 +-
 gdb/testsuite/gdb.fortran/vla-history.exp                 | 2 +-
 gdb/testsuite/gdb.fortran/vla-ptr-info.exp                | 2 +-
 gdb/testsuite/gdb.fortran/vla-ptype-sub.exp               | 2 +-
 gdb/testsuite/gdb.fortran/vla-ptype.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/vla-sizeof.exp                  | 2 +-
 gdb/testsuite/gdb.fortran/vla-type.exp                    | 2 +-
 gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp     | 2 +-
 gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp        | 2 +-
 gdb/testsuite/gdb.fortran/vla-value-sub.exp               | 2 +-
 gdb/testsuite/gdb.fortran/vla-value.exp                   | 2 +-
 gdb/testsuite/gdb.fortran/whatis_type.exp                 | 2 +-
 gdb/testsuite/gdb.mi/mi-fortran-modules.exp               | 2 +-
 gdb/testsuite/gdb.mi/mi-var-child-f.exp                   | 2 +-
 gdb/testsuite/gdb.mi/mi-vla-fortran.exp                   | 2 +-
 gdb/testsuite/lib/gdb.exp                                 | 6 +++---
 74 files changed, 76 insertions(+), 76 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index 8f6c0aa75dc..7ac4ecb8600 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -24,7 +24,7 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
 }
 
 # It requires fortran.
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.fortran/allocated.exp b/gdb/testsuite/gdb.fortran/allocated.exp
index d4aba5e2585..1dbd4526047 100644
--- a/gdb/testsuite/gdb.fortran/allocated.exp
+++ b/gdb/testsuite/gdb.fortran/allocated.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of ALLOCATED keyword.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-bounds-high.exp b/gdb/testsuite/gdb.fortran/array-bounds-high.exp
index 25023ebace5..1fbed59a6d2 100644
--- a/gdb/testsuite/gdb.fortran/array-bounds-high.exp
+++ b/gdb/testsuite/gdb.fortran/array-bounds-high.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains test to ensure that
 # array bounds accept LONGEST.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 set testfile "array-bounds-high"
 standard_testfile .f90
diff --git a/gdb/testsuite/gdb.fortran/array-bounds.exp b/gdb/testsuite/gdb.fortran/array-bounds.exp
index 0903d9ed7a0..e3f2603a118 100644
--- a/gdb/testsuite/gdb.fortran/array-bounds.exp
+++ b/gdb/testsuite/gdb.fortran/array-bounds.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains test to ensure that
 # array bounds accept LONGEST.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 set testfile "array-bounds"
 standard_testfile .f90
diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp
index 1902329fc94..1912dfd8076 100644
--- a/gdb/testsuite/gdb.fortran/array-element.exp
+++ b/gdb/testsuite/gdb.fortran/array-element.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains test for printing
 # the elements of an array which is passed as pointer to a subroutine.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f
 
diff --git a/gdb/testsuite/gdb.fortran/array-indices.exp b/gdb/testsuite/gdb.fortran/array-indices.exp
index 299bf3417b6..0624e637e1f 100644
--- a/gdb/testsuite/gdb.fortran/array-indices.exp
+++ b/gdb/testsuite/gdb.fortran/array-indices.exp
@@ -15,7 +15,7 @@
 
 # Test the printing of element indices in Fortran arrays.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 load_lib fortran.exp
 
diff --git a/gdb/testsuite/gdb.fortran/array-no-bounds.exp b/gdb/testsuite/gdb.fortran/array-no-bounds.exp
index 126cea76ccb..236a62d3f26 100644
--- a/gdb/testsuite/gdb.fortran/array-no-bounds.exp
+++ b/gdb/testsuite/gdb.fortran/array-no-bounds.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains test to ensure that
 # array bounds accept LONGEST.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-repeat.exp b/gdb/testsuite/gdb.fortran/array-repeat.exp
index 90b48a398d6..0fe3c7f5ed8 100644
--- a/gdb/testsuite/gdb.fortran/array-repeat.exp
+++ b/gdb/testsuite/gdb.fortran/array-repeat.exp
@@ -15,7 +15,7 @@
 
 # Test the detection and printing of repeated elements in Fortran arrays.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 load_lib fortran.exp
 
diff --git a/gdb/testsuite/gdb.fortran/array-slices-bad.exp b/gdb/testsuite/gdb.fortran/array-slices-bad.exp
index f49154b9c6a..3f8e4434e22 100644
--- a/gdb/testsuite/gdb.fortran/array-slices-bad.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices-bad.exp
@@ -15,7 +15,7 @@
 
 # Test invalid element and slice array accesses.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
index 832aefc0954..10778b1543f 100644
--- a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
@@ -15,7 +15,7 @@
 
 # Create a slice of an array, then take a slice of that slice.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp
index 8fab57e13e7..56bed15e965 100644
--- a/gdb/testsuite/gdb.fortran/array-slices.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices.exp
@@ -33,7 +33,7 @@
 # debug information) matches the size of the slice manually extracted
 # by GDB.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 # This test relies on output from the inferior.
 if [target_info exists gdb,noinferiorio] {
diff --git a/gdb/testsuite/gdb.fortran/associated.exp b/gdb/testsuite/gdb.fortran/associated.exp
index 1acc40027c0..5dcce03cfcf 100644
--- a/gdb/testsuite/gdb.fortran/associated.exp
+++ b/gdb/testsuite/gdb.fortran/associated.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of ASSOCIATED keyword.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/assumedrank.exp b/gdb/testsuite/gdb.fortran/assumedrank.exp
index a1e59903014..6bc5dccbb5e 100644
--- a/gdb/testsuite/gdb.fortran/assumedrank.exp
+++ b/gdb/testsuite/gdb.fortran/assumedrank.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of ASSUMED RANK arrays.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/block-data.exp b/gdb/testsuite/gdb.fortran/block-data.exp
index 6f51fce3ddc..9b832c9718c 100644
--- a/gdb/testsuite/gdb.fortran/block-data.exp
+++ b/gdb/testsuite/gdb.fortran/block-data.exp
@@ -21,7 +21,7 @@
 # outputs nameless DW_TAG_module, unlike with gfortran which just
 # doesn't emit DW_TAG_module in this case.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/call-no-debug.exp b/gdb/testsuite/gdb.fortran/call-no-debug.exp
index d17eb4a5db3..fe6c4f85a9a 100644
--- a/gdb/testsuite/gdb.fortran/call-no-debug.exp
+++ b/gdb/testsuite/gdb.fortran/call-no-debug.exp
@@ -16,7 +16,7 @@
 # Test calling Fortran functions that are compiled without debug
 # information.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile call-no-debug-prog.f90 call-no-debug-func.f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/charset.exp b/gdb/testsuite/gdb.fortran/charset.exp
index 1a860964782..68ae7d8af8e 100644
--- a/gdb/testsuite/gdb.fortran/charset.exp
+++ b/gdb/testsuite/gdb.fortran/charset.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains tests for evaluating
 # Fortran subarray expression.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp
index 76a848c7711..86a143dfdca 100644
--- a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp
+++ b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp
@@ -16,7 +16,7 @@
 # Test that GDB can print an allocatable array that is a data field
 # within a class like type.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/common-block.exp b/gdb/testsuite/gdb.fortran/common-block.exp
index b551bbd428b..aaa006860d7 100644
--- a/gdb/testsuite/gdb.fortran/common-block.exp
+++ b/gdb/testsuite/gdb.fortran/common-block.exp
@@ -15,7 +15,7 @@
 
 # This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/completion.exp b/gdb/testsuite/gdb.fortran/completion.exp
index 4ae6f9ae792..b6c7e3278ca 100644
--- a/gdb/testsuite/gdb.fortran/completion.exp
+++ b/gdb/testsuite/gdb.fortran/completion.exp
@@ -15,7 +15,7 @@
 
 # Test tab completion of Fortran type field names.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/complex.exp b/gdb/testsuite/gdb.fortran/complex.exp
index 708b73c3ca4..f7e0b89bb91 100644
--- a/gdb/testsuite/gdb.fortran/complex.exp
+++ b/gdb/testsuite/gdb.fortran/complex.exp
@@ -16,7 +16,7 @@
 standard_testfile .f90
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
     return -1
diff --git a/gdb/testsuite/gdb.fortran/debug-expr.exp b/gdb/testsuite/gdb.fortran/debug-expr.exp
index 2a45214d89f..cb141f5758e 100644
--- a/gdb/testsuite/gdb.fortran/debug-expr.exp
+++ b/gdb/testsuite/gdb.fortran/debug-expr.exp
@@ -15,7 +15,7 @@
 
 # Test "set debug expr 1" on Fortran expressions.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
diff --git a/gdb/testsuite/gdb.fortran/derived-type-function.exp b/gdb/testsuite/gdb.fortran/derived-type-function.exp
index d7fa4a0378b..be5d81fb507 100644
--- a/gdb/testsuite/gdb.fortran/derived-type-function.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type-function.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains tests for type-printing
 # and value-printing Fortran derived types having also functions.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/derived-type-striding.exp b/gdb/testsuite/gdb.fortran/derived-type-striding.exp
index 9a9a3ca8f3f..b7ae48717ff 100644
--- a/gdb/testsuite/gdb.fortran/derived-type-striding.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type-striding.exp
@@ -16,7 +16,7 @@
 # Print some single dimensional integer arrays that will have a byte
 # stride in the debug information.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 
diff --git a/gdb/testsuite/gdb.fortran/derived-type.exp b/gdb/testsuite/gdb.fortran/derived-type.exp
index be7c1937d78..9301e72c004 100644
--- a/gdb/testsuite/gdb.fortran/derived-type.exp
+++ b/gdb/testsuite/gdb.fortran/derived-type.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains tests for type-printing
 # and value-printing Fortran derived types.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/dot-ops.exp b/gdb/testsuite/gdb.fortran/dot-ops.exp
index 049008f90e0..3f8f5abb54c 100644
--- a/gdb/testsuite/gdb.fortran/dot-ops.exp
+++ b/gdb/testsuite/gdb.fortran/dot-ops.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 proc test_dot_operations {} {
 
diff --git a/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp b/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp
index 8fb0a6c6cb9..4b22b043540 100644
--- a/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp
+++ b/gdb/testsuite/gdb.fortran/dynamic-ptype-whatis.exp
@@ -16,7 +16,7 @@
 # Test using whatis and ptype on different configurations of dynamic
 # types.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/empty-string.exp b/gdb/testsuite/gdb.fortran/empty-string.exp
index 07937741f15..f667ac68b79 100644
--- a/gdb/testsuite/gdb.fortran/empty-string.exp
+++ b/gdb/testsuite/gdb.fortran/empty-string.exp
@@ -15,7 +15,7 @@
 
 # Test printing of an empty Fortran string.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/exprs.exp b/gdb/testsuite/gdb.fortran/exprs.exp
index 44773cc3a3b..30f0aa691db 100644
--- a/gdb/testsuite/gdb.fortran/exprs.exp
+++ b/gdb/testsuite/gdb.fortran/exprs.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 proc test_integer_literals_accepted {} {
     global gdb_prompt
diff --git a/gdb/testsuite/gdb.fortran/function-calls.exp b/gdb/testsuite/gdb.fortran/function-calls.exp
index ef5e4e03b62..f9a1efc241f 100644
--- a/gdb/testsuite/gdb.fortran/function-calls.exp
+++ b/gdb/testsuite/gdb.fortran/function-calls.exp
@@ -16,7 +16,7 @@
 # Exercise passing and returning arguments in Fortran. This test case
 # is based on the GNU Fortran Argument passing conventions.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 
diff --git a/gdb/testsuite/gdb.fortran/info-modules.exp b/gdb/testsuite/gdb.fortran/info-modules.exp
index 2992e9f2fd1..f199034ff3e 100644
--- a/gdb/testsuite/gdb.fortran/info-modules.exp
+++ b/gdb/testsuite/gdb.fortran/info-modules.exp
@@ -19,7 +19,7 @@
 load_lib "fortran.exp"
 load_lib "sym-info-cmds.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile info-types.f90 info-types-2.f90
 
diff --git a/gdb/testsuite/gdb.fortran/info-types.exp b/gdb/testsuite/gdb.fortran/info-types.exp
index 565c9cf5190..98fb812dd8b 100644
--- a/gdb/testsuite/gdb.fortran/info-types.exp
+++ b/gdb/testsuite/gdb.fortran/info-types.exp
@@ -18,7 +18,7 @@
 load_lib "fortran.exp"
 load_lib "sym-info-cmds.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile info-types.f90 info-types-2.f90
 
diff --git a/gdb/testsuite/gdb.fortran/intrinsics.exp b/gdb/testsuite/gdb.fortran/intrinsics.exp
index 460f242e137..a61df31328e 100644
--- a/gdb/testsuite/gdb.fortran/intrinsics.exp
+++ b/gdb/testsuite/gdb.fortran/intrinsics.exp
@@ -17,7 +17,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
index 563d4b12024..bb652a9223c 100644
--- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp
+++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of LBOUND and UBOUND.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".F90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/library-module.exp b/gdb/testsuite/gdb.fortran/library-module.exp
index 60a37a46361..1721b9c2810 100644
--- a/gdb/testsuite/gdb.fortran/library-module.exp
+++ b/gdb/testsuite/gdb.fortran/library-module.exp
@@ -15,7 +15,7 @@
 
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile library-module-main.f90 
 set srclibfile ${testfile}-lib.f90
diff --git a/gdb/testsuite/gdb.fortran/logical.exp b/gdb/testsuite/gdb.fortran/logical.exp
index 91ef4bc15be..28dda5a15eb 100644
--- a/gdb/testsuite/gdb.fortran/logical.exp
+++ b/gdb/testsuite/gdb.fortran/logical.exp
@@ -18,7 +18,7 @@
 standard_testfile .f90
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
     return -1
diff --git a/gdb/testsuite/gdb.fortran/max-depth.exp b/gdb/testsuite/gdb.fortran/max-depth.exp
index bbb3b2a21ed..49f5b869646 100644
--- a/gdb/testsuite/gdb.fortran/max-depth.exp
+++ b/gdb/testsuite/gdb.fortran/max-depth.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
index a1614554556..6ab3f8adeba 100644
--- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
+++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
@@ -23,7 +23,7 @@
 # each case to ensure that trying to print objects or types from one
 # language, while GDB's language is set to another, doesn't crash GDB.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile mixed-lang-stack.c mixed-lang-stack.cpp mixed-lang-stack.f90
 
diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp
index 8c7e9957f14..54c807d3496 100644
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -15,7 +15,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/multi-dim.exp b/gdb/testsuite/gdb.fortran/multi-dim.exp
index 5646471e863..1aab841d58a 100644
--- a/gdb/testsuite/gdb.fortran/multi-dim.exp
+++ b/gdb/testsuite/gdb.fortran/multi-dim.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains tests for evaluating
 # Fortran subarray expression.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/namelist.exp b/gdb/testsuite/gdb.fortran/namelist.exp
index bf51e946292..fceddb10159 100644
--- a/gdb/testsuite/gdb.fortran/namelist.exp
+++ b/gdb/testsuite/gdb.fortran/namelist.exp
@@ -16,7 +16,7 @@
 # This file is part of the gdb testsuite.  It contains tests for fortran
 # namelist.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs-2.exp b/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
index 344745453cd..8c3b61aa161 100644
--- a/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
+++ b/gdb/testsuite/gdb.fortran/nested-funcs-2.exp
@@ -15,7 +15,7 @@
 
 # Further testing of placing breakpoints in nested subroutines.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 load_lib "fortran.exp"
 
 standard_testfile ".f90"
diff --git a/gdb/testsuite/gdb.fortran/nested-funcs.exp b/gdb/testsuite/gdb.fortran/nested-funcs.exp
index bf8915a2f38..9f11d74bff1 100755
--- a/gdb/testsuite/gdb.fortran/nested-funcs.exp
+++ b/gdb/testsuite/gdb.fortran/nested-funcs.exp
@@ -16,7 +16,7 @@
 # This testcase is supposed to test DWARF static link which is usually
 # used together with nested functions.  
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/oop_extend_type.exp b/gdb/testsuite/gdb.fortran/oop_extend_type.exp
index 1ffa5a39fc3..3be534df0b6 100755
--- a/gdb/testsuite/gdb.fortran/oop_extend_type.exp
+++ b/gdb/testsuite/gdb.fortran/oop_extend_type.exp
@@ -16,7 +16,7 @@
 standard_testfile ".f90"
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
      {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp b/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp
index a37ab3fedb1..0fd5fb0996f 100644
--- a/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp
+++ b/gdb/testsuite/gdb.fortran/pointer-to-pointer.exp
@@ -15,7 +15,7 @@
 
 # Test for GDB printing a pointer to a type containing a buffer.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/print-formatted.exp b/gdb/testsuite/gdb.fortran/print-formatted.exp
index 9d552afcc61..0f39a760072 100644
--- a/gdb/testsuite/gdb.fortran/print-formatted.exp
+++ b/gdb/testsuite/gdb.fortran/print-formatted.exp
@@ -15,7 +15,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 
diff --git a/gdb/testsuite/gdb.fortran/print_type.exp b/gdb/testsuite/gdb.fortran/print_type.exp
index 964b69ef948..b1a663f4a0c 100755
--- a/gdb/testsuite/gdb.fortran/print_type.exp
+++ b/gdb/testsuite/gdb.fortran/print_type.exp
@@ -19,7 +19,7 @@
 standard_testfile "pointers.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/printing-types.exp b/gdb/testsuite/gdb.fortran/printing-types.exp
index 82ad7b753e4..efd22a41790 100644
--- a/gdb/testsuite/gdb.fortran/printing-types.exp
+++ b/gdb/testsuite/gdb.fortran/printing-types.exp
@@ -13,7 +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/>.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/ptr-indentation.exp b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
index c420ccdc124..993adf50a73 100644
--- a/gdb/testsuite/gdb.fortran/ptr-indentation.exp
+++ b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
@@ -13,7 +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/>.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
index e52c70fb2a9..479316a6247 100644
--- a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
+++ b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
@@ -15,7 +15,7 @@
 
 # This file contains a test for printing the types of functions.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.fortran/rank.exp b/gdb/testsuite/gdb.fortran/rank.exp
index e3e055b112f..eb8af4e47c5 100644
--- a/gdb/testsuite/gdb.fortran/rank.exp
+++ b/gdb/testsuite/gdb.fortran/rank.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of RANK keyword.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/shape.exp b/gdb/testsuite/gdb.fortran/shape.exp
index 2608e74946c..7320b184f9d 100644
--- a/gdb/testsuite/gdb.fortran/shape.exp
+++ b/gdb/testsuite/gdb.fortran/shape.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of SHAPE keyword.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
index b7aac47c6fe..66ab33a81f6 100644
--- a/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
+++ b/gdb/testsuite/gdb.fortran/short-circuit-argument-list.exp
@@ -17,7 +17,7 @@
 # calls and substring operations that are to be skipped due to short
 # circuiting.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 
diff --git a/gdb/testsuite/gdb.fortran/size.exp b/gdb/testsuite/gdb.fortran/size.exp
index e028455fc63..0a3974325a3 100644
--- a/gdb/testsuite/gdb.fortran/size.exp
+++ b/gdb/testsuite/gdb.fortran/size.exp
@@ -15,7 +15,7 @@
 
 # Testing GDB's implementation of SIZE keyword.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile ".f90"
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/string-types.exp b/gdb/testsuite/gdb.fortran/string-types.exp
index f553fe592f9..3114fbaac78 100644
--- a/gdb/testsuite/gdb.fortran/string-types.exp
+++ b/gdb/testsuite/gdb.fortran/string-types.exp
@@ -19,7 +19,7 @@
 standard_testfile .f90
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug f90 quiet}]} {
diff --git a/gdb/testsuite/gdb.fortran/subarray.exp b/gdb/testsuite/gdb.fortran/subarray.exp
index bc3f33e5aae..7bdc48d6122 100644
--- a/gdb/testsuite/gdb.fortran/subarray.exp
+++ b/gdb/testsuite/gdb.fortran/subarray.exp
@@ -18,7 +18,7 @@
 # This file is part of the gdb testsuite.  It contains tests for evaluating
 # Fortran subarray expression.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile .f
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.fortran/type-kinds.exp b/gdb/testsuite/gdb.fortran/type-kinds.exp
index bf2609b3fae..af4670b7c63 100644
--- a/gdb/testsuite/gdb.fortran/type-kinds.exp
+++ b/gdb/testsuite/gdb.fortran/type-kinds.exp
@@ -19,7 +19,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 # Cast the value 1 to the type 'BASE_TYPE (kind=TYPE_KIND)'.  The
 # expected result of the cast is CAST_RESULT, and the size of the
diff --git a/gdb/testsuite/gdb.fortran/types.exp b/gdb/testsuite/gdb.fortran/types.exp
index dfe9518ed7e..aaa6962c37c 100644
--- a/gdb/testsuite/gdb.fortran/types.exp
+++ b/gdb/testsuite/gdb.fortran/types.exp
@@ -18,7 +18,7 @@
 
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 proc test_integer_literal_types_accepted {} {
     global gdb_prompt
diff --git a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
index 9025df0d907..0b00db61c17 100644
--- a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
+++ b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-datatypes.exp b/gdb/testsuite/gdb.fortran/vla-datatypes.exp
index dfa3fd626ff..dcc50f6f3c1 100644
--- a/gdb/testsuite/gdb.fortran/vla-datatypes.exp
+++ b/gdb/testsuite/gdb.fortran/vla-datatypes.exp
@@ -16,7 +16,7 @@
 standard_testfile ".f90"
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-history.exp b/gdb/testsuite/gdb.fortran/vla-history.exp
index c95125c66f3..146c510bfe2 100644
--- a/gdb/testsuite/gdb.fortran/vla-history.exp
+++ b/gdb/testsuite/gdb.fortran/vla-history.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
index 3d864bc87f8..2c7a2282ae3 100644
--- a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
+++ b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
index 2b3355c55b7..9caa7313624 100644
--- a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
+++ b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran/vla-ptype.exp
index 798c0d5c58c..4a7e05e20cb 100644
--- a/gdb/testsuite/gdb.fortran/vla-ptype.exp
+++ b/gdb/testsuite/gdb.fortran/vla-ptype.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-sizeof.exp b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
index 8344401da49..c1c1c225ca4 100644
--- a/gdb/testsuite/gdb.fortran/vla-sizeof.exp
+++ b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-type.exp b/gdb/testsuite/gdb.fortran/vla-type.exp
index 1a4d6f430cb..5a60cdff2f3 100755
--- a/gdb/testsuite/gdb.fortran/vla-type.exp
+++ b/gdb/testsuite/gdb.fortran/vla-type.exp
@@ -16,7 +16,7 @@
 standard_testfile ".f90"
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
      {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
index f836f05df8c..c850a9dd1b5 100644
--- a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
index 27ddf3b58a5..390e5d9597c 100644
--- a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub.exp b/gdb/testsuite/gdb.fortran/vla-value-sub.exp
index 4785afb7799..f62e5685acf 100644
--- a/gdb/testsuite/gdb.fortran/vla-value-sub.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value-sub.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla-sub.f90"
 load_lib fortran.exp
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp
index ec5b6250a9b..b7ed1b440b9 100644
--- a/gdb/testsuite/gdb.fortran/vla-value.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value.exp
@@ -16,7 +16,7 @@
 standard_testfile "vla.f90"
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
      {debug f90 quiet}] } {
diff --git a/gdb/testsuite/gdb.fortran/whatis_type.exp b/gdb/testsuite/gdb.fortran/whatis_type.exp
index 18c2da5e9ea..fd1b746ebd1 100644
--- a/gdb/testsuite/gdb.fortran/whatis_type.exp
+++ b/gdb/testsuite/gdb.fortran/whatis_type.exp
@@ -13,7 +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/>.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 standard_testfile type.f90
 load_lib "fortran.exp"
diff --git a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
index 676408bb1db..626deffe133 100644
--- a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
+++ b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
@@ -15,7 +15,7 @@
 
 # Test -symbol-info-modules, listing Fortran modules.
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 load_lib fortran.exp
 load_lib mi-support.exp
diff --git a/gdb/testsuite/gdb.mi/mi-var-child-f.exp b/gdb/testsuite/gdb.mi/mi-var-child-f.exp
index c5294156159..7723dbc574f 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child-f.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child-f.exp
@@ -19,7 +19,7 @@ load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 load_lib "fortran.exp"
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
index 1d6c91dc9b3..9020f89e117 100644
--- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
@@ -16,7 +16,7 @@
 # Verify that, using the MI, we can evaluate a simple Fortran Variable
 # Length Array (VLA).
 
-require !skip_fortran_tests
+require allow_fortran_tests
 
 load_lib mi-support.exp
 load_lib fortran.exp
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 6334314fd87..6985f721515 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2403,10 +2403,10 @@ proc allow_stl_tests {} {
     return [allow_cplus_tests]
 }
 
-# Return a 1 if I don't even want to try to test FORTRAN.
+# Return a 1 if I want to try to test FORTRAN.
 
-proc skip_fortran_tests {} {
-    return 0
+proc allow_fortran_tests {} {
+    return 1
 }
 
 # Return a 1 if I want to try to test ada.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 64/79] Rename to allow_gdbserver_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (62 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 63/79] Rename to allow_fortran_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 65/79] Rename to allow_go_tests Tom Tromey
                   ` (16 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_gdbserver_tests to invert the sense, and renames it
to allow_gdbserver_tests.
---
 gdb/testsuite/gdb.btrace/enable.exp                |  4 ++--
 gdb/testsuite/gdb.btrace/reconnect.exp             |  2 +-
 gdb/testsuite/gdb.mi/mi-file-transfer.exp          |  2 +-
 .../gdb.multi/attach-no-multi-process.exp          |  2 +-
 gdb/testsuite/gdb.multi/multi-target.exp.tcl       |  2 +-
 gdb/testsuite/gdb.python/py-send-packet.exp        |  2 +-
 gdb/testsuite/gdb.server/abspath.exp               |  2 +-
 gdb/testsuite/gdb.server/attach-flag.exp           |  2 +-
 gdb/testsuite/gdb.server/bkpt-other-inferior.exp   |  2 +-
 .../gdb.server/connect-stopped-target.exp          |  2 +-
 .../gdb.server/connect-with-no-symbol-file.exp     |  2 +-
 .../gdb.server/connect-without-multi-process.exp   |  2 +-
 gdb/testsuite/gdb.server/exit-multiple-threads.exp |  2 +-
 gdb/testsuite/gdb.server/ext-attach.exp            |  2 +-
 gdb/testsuite/gdb.server/ext-restart.exp           |  2 +-
 gdb/testsuite/gdb.server/ext-run.exp               |  2 +-
 gdb/testsuite/gdb.server/ext-wrapper.exp           |  2 +-
 gdb/testsuite/gdb.server/file-transfer.exp         |  2 +-
 gdb/testsuite/gdb.server/monitor-exit-quit.exp     |  2 +-
 gdb/testsuite/gdb.server/multi-ui-errors.exp       |  2 +-
 gdb/testsuite/gdb.server/no-thread-db.exp          |  2 +-
 gdb/testsuite/gdb.server/non-existing-program.exp  |  2 +-
 gdb/testsuite/gdb.server/reconnect-ctrl-c.exp      |  2 +-
 .../gdb.server/run-without-local-binary.exp        |  2 +-
 gdb/testsuite/gdb.server/server-connect.exp        |  2 +-
 gdb/testsuite/gdb.server/server-exec-info.exp      |  2 +-
 gdb/testsuite/gdb.server/server-kill-python.exp    |  2 +-
 gdb/testsuite/gdb.server/server-kill.exp           |  2 +-
 gdb/testsuite/gdb.server/server-mon.exp            |  2 +-
 gdb/testsuite/gdb.server/server-pipe.exp           |  2 +-
 gdb/testsuite/gdb.server/server-run.exp            |  2 +-
 gdb/testsuite/gdb.server/solib-list.exp            |  2 +-
 .../gdb.server/stop-reply-no-thread-multi.exp      |  2 +-
 gdb/testsuite/gdb.server/stop-reply-no-thread.exp  |  2 +-
 gdb/testsuite/gdb.server/sysroot.exp               |  2 +-
 gdb/testsuite/gdb.server/twice-connect.exp         |  2 +-
 gdb/testsuite/gdb.server/unittest.exp              |  2 +-
 gdb/testsuite/gdb.server/wrapper.exp               |  2 +-
 gdb/testsuite/lib/gdbserver-support.exp            | 14 +++++++-------
 39 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp
index acad4c6e828..113b8e18aad 100644
--- a/gdb/testsuite/gdb.btrace/enable.exp
+++ b/gdb/testsuite/gdb.btrace/enable.exp
@@ -70,13 +70,13 @@ gdb_test "record btrace" "The process is already being recorded\\.  Use \"record
 # continue to the end and make sure we don't die
 gdb_test "continue" ".*Inferior.*exited.*" "continue to end"
 
-# skip_gdbserver_tests requires GDB not running.
+# allow_gdbserver_tests requires GDB not running.
 gdb_exit
 
 # skip the rerun test when using gdbserver
 # otherwise rerun twice, target should be automatically disabled
 load_lib gdbserver-support.exp
-if [skip_gdbserver_tests] {
+if !{[allow_gdbserver_tests]} {
     unsupported "target does not support gdbserver"
     return 0
 }
diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp
index 1da9f4be566..2c8358327a4 100644
--- a/gdb/testsuite/gdb.btrace/reconnect.exp
+++ b/gdb/testsuite/gdb.btrace/reconnect.exp
@@ -20,7 +20,7 @@
 load_lib gdbserver-support.exp
 
 require allow_btrace_tests
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.mi/mi-file-transfer.exp b/gdb/testsuite/gdb.mi/mi-file-transfer.exp
index 71aa2f83cc0..726504c46d8 100644
--- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp
+++ b/gdb/testsuite/gdb.mi/mi-file-transfer.exp
@@ -20,7 +20,7 @@ load_lib gdbserver-support.exp
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile basics.c
 
diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
index 50b04ad6761..1ef7984078a 100644
--- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
+++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
@@ -22,7 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 require can_spawn_for_attach
 
diff --git a/gdb/testsuite/gdb.multi/multi-target.exp.tcl b/gdb/testsuite/gdb.multi/multi-target.exp.tcl
index af9b564228f..2356b6c8e6e 100644
--- a/gdb/testsuite/gdb.multi/multi-target.exp.tcl
+++ b/gdb/testsuite/gdb.multi/multi-target.exp.tcl
@@ -165,7 +165,7 @@ proc setup {non-stop} {
 proc multi_target_prepare {} {
     global binfile srcfile
 
-    if { [skip_gdbserver_tests] } {
+    if { ![allow_gdbserver_tests] } {
 	return 0
     }
 
diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp
index e09dbb05fd4..75e7bb6aa9c 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.exp
+++ b/gdb/testsuite/gdb.python/py-send-packet.exp
@@ -24,7 +24,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests !skip_python_tests
+require allow_gdbserver_tests !skip_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.server/abspath.exp b/gdb/testsuite/gdb.server/abspath.exp
index 58d9b39efc1..46657c65e8f 100644
--- a/gdb/testsuite/gdb.server/abspath.exp
+++ b/gdb/testsuite/gdb.server/abspath.exp
@@ -22,7 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile normal.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 # Because we're relying on being able to change our CWD before
 # executing gdbserver, we just run if we're not testing with a remote
diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp
index bb6f3673e4e..ad67303a7dd 100644
--- a/gdb/testsuite/gdb.server/attach-flag.exp
+++ b/gdb/testsuite/gdb.server/attach-flag.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 require can_spawn_for_attach
 
diff --git a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp
index fe561d8e924..d4395d2c441 100644
--- a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp
+++ b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if { [prepare_for_testing "failed to prepare" ${binfile} "${srcfile}" \
 	  {debug pthreads}] } {
diff --git a/gdb/testsuite/gdb.server/connect-stopped-target.exp b/gdb/testsuite/gdb.server/connect-stopped-target.exp
index ed193f8599c..2dfe2ea94ac 100644
--- a/gdb/testsuite/gdb.server/connect-stopped-target.exp
+++ b/gdb/testsuite/gdb.server/connect-stopped-target.exp
@@ -20,7 +20,7 @@
 load_lib gdbserver-support.exp
 load_lib prelink-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
index 159f82f6c3b..b98e566e2d6 100644
--- a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
+++ b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
@@ -25,7 +25,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
     return -1
diff --git a/gdb/testsuite/gdb.server/connect-without-multi-process.exp b/gdb/testsuite/gdb.server/connect-without-multi-process.exp
index 831ccd6f876..fcd64c9f49a 100644
--- a/gdb/testsuite/gdb.server/connect-without-multi-process.exp
+++ b/gdb/testsuite/gdb.server/connect-without-multi-process.exp
@@ -18,7 +18,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.server/exit-multiple-threads.exp b/gdb/testsuite/gdb.server/exit-multiple-threads.exp
index 88c4df11ccd..46239e3eabf 100644
--- a/gdb/testsuite/gdb.server/exit-multiple-threads.exp
+++ b/gdb/testsuite/gdb.server/exit-multiple-threads.exp
@@ -25,7 +25,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp
index 81b324d4c5f..f7092b0340c 100644
--- a/gdb/testsuite/gdb.server/ext-attach.exp
+++ b/gdb/testsuite/gdb.server/ext-attach.exp
@@ -22,7 +22,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 require can_spawn_for_attach
 
diff --git a/gdb/testsuite/gdb.server/ext-restart.exp b/gdb/testsuite/gdb.server/ext-restart.exp
index df26c91fa25..5b6aa7038f2 100644
--- a/gdb/testsuite/gdb.server/ext-restart.exp
+++ b/gdb/testsuite/gdb.server/ext-restart.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 save_vars { GDBFLAGS } {
     # If GDB and GDBserver are both running locally, set the sysroot to avoid
diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp
index 2add84e8b1b..59ead666d7b 100644
--- a/gdb/testsuite/gdb.server/ext-run.exp
+++ b/gdb/testsuite/gdb.server/ext-run.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/ext-wrapper.exp b/gdb/testsuite/gdb.server/ext-wrapper.exp
index 4f150cfc0a5..2fe601a81aa 100644
--- a/gdb/testsuite/gdb.server/ext-wrapper.exp
+++ b/gdb/testsuite/gdb.server/ext-wrapper.exp
@@ -19,7 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile wrapper.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp
index cd98ffee90d..05da514413c 100644
--- a/gdb/testsuite/gdb.server/file-transfer.exp
+++ b/gdb/testsuite/gdb.server/file-transfer.exp
@@ -20,7 +20,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.server/monitor-exit-quit.exp b/gdb/testsuite/gdb.server/monitor-exit-quit.exp
index 88eb2e483b9..f253f823896 100644
--- a/gdb/testsuite/gdb.server/monitor-exit-quit.exp
+++ b/gdb/testsuite/gdb.server/monitor-exit-quit.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/multi-ui-errors.exp b/gdb/testsuite/gdb.server/multi-ui-errors.exp
index 95a08c9bca6..9cc5239d888 100644
--- a/gdb/testsuite/gdb.server/multi-ui-errors.exp
+++ b/gdb/testsuite/gdb.server/multi-ui-errors.exp
@@ -24,7 +24,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 save_vars { GDBFLAGS } {
     # If GDB and GDBserver are both running locally, set the sysroot to avoid
diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp
index 0e2fbae80be..53d04753c40 100644
--- a/gdb/testsuite/gdb.server/no-thread-db.exp
+++ b/gdb/testsuite/gdb.server/no-thread-db.exp
@@ -25,7 +25,7 @@ load_lib gdbserver-support.exp
 standard_testfile
 set unresolvable_thread_db_path "/foo/bar"
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     return -1
diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp
index 60ca0a43dfb..32f27fa2b1c 100644
--- a/gdb/testsuite/gdb.server/non-existing-program.exp
+++ b/gdb/testsuite/gdb.server/non-existing-program.exp
@@ -22,7 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 set gdbserver [find_gdbserver]
 if { $gdbserver == "" } {
diff --git a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
index 42707692c4b..c8ef81443e5 100644
--- a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
+++ b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
@@ -19,7 +19,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if [target_info exists gdb,nointerrupts] {
     verbose "Skipping reconnect-ctrl-c.exp because of nointerrupts."
diff --git a/gdb/testsuite/gdb.server/run-without-local-binary.exp b/gdb/testsuite/gdb.server/run-without-local-binary.exp
index 4f3f0d9af4e..c390eeb435a 100644
--- a/gdb/testsuite/gdb.server/run-without-local-binary.exp
+++ b/gdb/testsuite/gdb.server/run-without-local-binary.exp
@@ -15,7 +15,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile normal.c
 
diff --git a/gdb/testsuite/gdb.server/server-connect.exp b/gdb/testsuite/gdb.server/server-connect.exp
index 76570f34232..6c4c969c30d 100644
--- a/gdb/testsuite/gdb.server/server-connect.exp
+++ b/gdb/testsuite/gdb.server/server-connect.exp
@@ -22,7 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile normal.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 # We want to have control over where we start gdbserver.
 if { [is_remote target] } {
diff --git a/gdb/testsuite/gdb.server/server-exec-info.exp b/gdb/testsuite/gdb.server/server-exec-info.exp
index a80c0f96480..b1a392883b0 100644
--- a/gdb/testsuite/gdb.server/server-exec-info.exp
+++ b/gdb/testsuite/gdb.server/server-exec-info.exp
@@ -18,7 +18,7 @@ load_lib gdbserver-support.exp
 # We test for skip_shlib_tests in this test because without a main
 # exec file we only have the exec target loaded if shared libraries
 # are present.
-require !skip_gdbserver_tests !skip_shlib_tests
+require allow_gdbserver_tests !skip_shlib_tests
 
 standard_testfile server.c
 if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index 4ef70daaf90..bc62cbfc431 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -23,7 +23,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile multi-ui-errors.c
 
-require !skip_gdbserver_tests !skip_python_tests
+require allow_gdbserver_tests !skip_python_tests
 
 if {[build_executable "failed to prepare" ${testfile} \
 	 ${srcfile}] == -1} {
diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index 04b7f62561a..b757369b71c 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -22,7 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if { [build_executable "failed to prepare" ${testfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.server/server-mon.exp b/gdb/testsuite/gdb.server/server-mon.exp
index 4b728cb8038..728cc84a9e0 100644
--- a/gdb/testsuite/gdb.server/server-mon.exp
+++ b/gdb/testsuite/gdb.server/server-mon.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp
index 2038ca9140d..693771e942e 100644
--- a/gdb/testsuite/gdb.server/server-pipe.exp
+++ b/gdb/testsuite/gdb.server/server-pipe.exp
@@ -32,7 +32,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 set gdbserver [find_gdbserver]
 if { $gdbserver == "" } {
diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-run.exp
index 55b40057f91..35f499f7d1a 100644
--- a/gdb/testsuite/gdb.server/server-run.exp
+++ b/gdb/testsuite/gdb.server/server-run.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp
index f22ec8956c4..ef99be74747 100644
--- a/gdb/testsuite/gdb.server/solib-list.exp
+++ b/gdb/testsuite/gdb.server/solib-list.exp
@@ -23,7 +23,7 @@
 load_lib gdbserver-support.exp
 load_lib prelink-support.exp
 
-require !skip_gdbserver_tests !skip_shlib_tests
+require allow_gdbserver_tests !skip_shlib_tests
 
 standard_testfile solib-list-main.c
 set srclibfile ${testfile}-lib.c
diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
index 066f2a1b736..20d45ba17da 100644
--- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
+++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
@@ -30,7 +30,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile
 if { [build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1 } {
diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp
index 134ab6a9c29..848ada128f3 100644
--- a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp
+++ b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp
@@ -22,7 +22,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile
 if { [build_executable "failed to prepare" $testfile $srcfile] == -1 } {
diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp
index 9845a7a8333..715d6001020 100644
--- a/gdb/testsuite/gdb.server/sysroot.exp
+++ b/gdb/testsuite/gdb.server/sysroot.exp
@@ -20,7 +20,7 @@
 
 load_lib gdbserver-support.exp
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 standard_testfile
 if {[build_executable "failed to prepare" $testfile $srcfile "additional_flags=--no-builtin"] == -1} {
diff --git a/gdb/testsuite/gdb.server/twice-connect.exp b/gdb/testsuite/gdb.server/twice-connect.exp
index a8318c0de4a..8ff8334f5f2 100644
--- a/gdb/testsuite/gdb.server/twice-connect.exp
+++ b/gdb/testsuite/gdb.server/twice-connect.exp
@@ -19,7 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if { [build_executable "failed to prepare" $::testfile $::srcfile \
 	  {debug}] } {
diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp
index f727892fdc8..d25ee362644 100644
--- a/gdb/testsuite/gdb.server/unittest.exp
+++ b/gdb/testsuite/gdb.server/unittest.exp
@@ -19,7 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 global server_spawn_id
 
diff --git a/gdb/testsuite/gdb.server/wrapper.exp b/gdb/testsuite/gdb.server/wrapper.exp
index caaa4f69afb..ec985e0da2e 100644
--- a/gdb/testsuite/gdb.server/wrapper.exp
+++ b/gdb/testsuite/gdb.server/wrapper.exp
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require !skip_gdbserver_tests
+require allow_gdbserver_tests
 
 if { [istarget *-*-mingw*]
      || [istarget *-*-cygwin*] } {
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 49ae56190c2..30d94fd7eb6 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -160,12 +160,12 @@ proc find_gdbserver { } {
   return ""
 }
 
-# Return non-zero if we should skip gdbserver-specific tests.
+# Return non-zero if we should run gdbserver-specific tests.
 
-proc skip_gdbserver_tests { } {
-  if { [find_gdbserver] == "" } {
-    return 1
-  }
+proc allow_gdbserver_tests { } {
+    if { [find_gdbserver] == "" } {
+	return 0
+    }
 
     # If GDB is lack of XML support, and targets, like arm, have
     # multiple target descriptions, GDB doesn't know which target
@@ -179,10 +179,10 @@ proc skip_gdbserver_tests { } {
 	     || [istarget "s390*-*-linux*"]
 	     || [istarget "x86_64-*-linux*"]
 	     || [istarget "i\[34567\]86-*-linux*"]) } {
-	return 1
+	return 0
     }
 
-  return 0
+    return 1
 }
 
 # Download the currently loaded program to the target if necessary.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 65/79] Rename to allow_go_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (63 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 64/79] Rename to allow_gdbserver_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 66/79] Rename to allow_hw_watchpoint_access_tests Tom Tromey
                   ` (15 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_go_tests to invert the sense, and renames it to
allow_go_tests.
---
 gdb/testsuite/gdb.go/basic-types.exp             | 2 +-
 gdb/testsuite/gdb.go/chan.exp                    | 2 +-
 gdb/testsuite/gdb.go/global-local-var-shadow.exp | 2 +-
 gdb/testsuite/gdb.go/handcall.exp                | 2 +-
 gdb/testsuite/gdb.go/hello.exp                   | 2 +-
 gdb/testsuite/gdb.go/integers.exp                | 2 +-
 gdb/testsuite/gdb.go/max-depth.exp               | 2 +-
 gdb/testsuite/gdb.go/methods.exp                 | 2 +-
 gdb/testsuite/gdb.go/package.exp                 | 2 +-
 gdb/testsuite/gdb.go/print.exp                   | 2 +-
 gdb/testsuite/gdb.go/strings.exp                 | 2 +-
 gdb/testsuite/gdb.go/types.exp                   | 2 +-
 gdb/testsuite/gdb.go/unsafe.exp                  | 2 +-
 gdb/testsuite/lib/gdb.exp                        | 6 +++---
 gdb/testsuite/lib/go.exp                         | 2 +-
 15 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/gdb/testsuite/gdb.go/basic-types.exp b/gdb/testsuite/gdb.go/basic-types.exp
index c1009f93e86..ce56ba4a681 100644
--- a/gdb/testsuite/gdb.go/basic-types.exp
+++ b/gdb/testsuite/gdb.go/basic-types.exp
@@ -20,7 +20,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
+require allow_go_tests
 
 proc test_integer_literal_types_accepted {} {
     # Test various decimal values.
diff --git a/gdb/testsuite/gdb.go/chan.exp b/gdb/testsuite/gdb.go/chan.exp
index 075d9f81908..fcb45cb9ab5 100644
--- a/gdb/testsuite/gdb.go/chan.exp
+++ b/gdb/testsuite/gdb.go/chan.exp
@@ -20,7 +20,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/global-local-var-shadow.exp b/gdb/testsuite/gdb.go/global-local-var-shadow.exp
index 8513c5530a5..be3e23ed29b 100644
--- a/gdb/testsuite/gdb.go/global-local-var-shadow.exp
+++ b/gdb/testsuite/gdb.go/global-local-var-shadow.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/handcall.exp b/gdb/testsuite/gdb.go/handcall.exp
index 530bddff140..9eb6077a056 100644
--- a/gdb/testsuite/gdb.go/handcall.exp
+++ b/gdb/testsuite/gdb.go/handcall.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/hello.exp b/gdb/testsuite/gdb.go/hello.exp
index 5f7da349fe5..494d2b9d843 100644
--- a/gdb/testsuite/gdb.go/hello.exp
+++ b/gdb/testsuite/gdb.go/hello.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/integers.exp b/gdb/testsuite/gdb.go/integers.exp
index 7c06d0584ed..e9413d047f7 100644
--- a/gdb/testsuite/gdb.go/integers.exp
+++ b/gdb/testsuite/gdb.go/integers.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/max-depth.exp b/gdb/testsuite/gdb.go/max-depth.exp
index 8fa967c5d29..17f4f450d49 100644
--- a/gdb/testsuite/gdb.go/max-depth.exp
+++ b/gdb/testsuite/gdb.go/max-depth.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/methods.exp b/gdb/testsuite/gdb.go/methods.exp
index f641c1cf0db..bd7a2e99b59 100644
--- a/gdb/testsuite/gdb.go/methods.exp
+++ b/gdb/testsuite/gdb.go/methods.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/package.exp b/gdb/testsuite/gdb.go/package.exp
index 8c64d2c7d86..33e7de65c11 100644
--- a/gdb/testsuite/gdb.go/package.exp
+++ b/gdb/testsuite/gdb.go/package.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile package1.go package2.go
 
diff --git a/gdb/testsuite/gdb.go/print.exp b/gdb/testsuite/gdb.go/print.exp
index 0c1f0eda98f..893fa30e7be 100644
--- a/gdb/testsuite/gdb.go/print.exp
+++ b/gdb/testsuite/gdb.go/print.exp
@@ -20,7 +20,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests
+require allow_go_tests
 
 proc test_float_accepted {} {
     global gdb_prompt
diff --git a/gdb/testsuite/gdb.go/strings.exp b/gdb/testsuite/gdb.go/strings.exp
index 1bca7146db4..6e98eaab619 100644
--- a/gdb/testsuite/gdb.go/strings.exp
+++ b/gdb/testsuite/gdb.go/strings.exp
@@ -17,7 +17,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/types.exp b/gdb/testsuite/gdb.go/types.exp
index 22656f2174d..5aa93acfdfd 100644
--- a/gdb/testsuite/gdb.go/types.exp
+++ b/gdb/testsuite/gdb.go/types.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/gdb.go/unsafe.exp b/gdb/testsuite/gdb.go/unsafe.exp
index 5a2bf32fcf5..3957814f2fb 100644
--- a/gdb/testsuite/gdb.go/unsafe.exp
+++ b/gdb/testsuite/gdb.go/unsafe.exp
@@ -19,7 +19,7 @@
 
 load_lib "go.exp"
 
-require !skip_go_tests support_go_compile
+require allow_go_tests support_go_compile
 
 standard_testfile .go
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 6985f721515..f3f0bfac762 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2415,10 +2415,10 @@ proc allow_ada_tests {} {
     return 1
 }
 
-# Return a 1 if I don't even want to try to test GO.
+# Return a 1 if I want to try to test GO.
 
-proc skip_go_tests {} {
-    return 0
+proc allow_go_tests {} {
+    return 1
 }
 
 # Return a 1 if I even want to try to test D.
diff --git a/gdb/testsuite/lib/go.exp b/gdb/testsuite/lib/go.exp
index 21d71ce06df..5b694bda096 100644
--- a/gdb/testsuite/lib/go.exp
+++ b/gdb/testsuite/lib/go.exp
@@ -13,7 +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/>.
 
-# FIXME: Presumably skip_go_tests should be defined here,
+# FIXME: Presumably allow_go_tests should be defined here,
 # but for consistency with other languages it currently lives in gdb.exp.
 
 # Auxiliary function to set the language to Go.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 66/79] Rename to allow_hw_watchpoint_access_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (64 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 65/79] Rename to allow_go_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 67/79] Rename to allow_hw_watchpoint_multi_tests Tom Tromey
                   ` (14 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_hw_watchpoint_access_tests to invert the sense, and
renames it to allow_hw_watchpoint_access_tests.
---
 gdb/testsuite/gdb.base/break-idempotent.exp        |  2 +-
 gdb/testsuite/gdb.base/watch-before-fork.exp       |  2 +-
 gdb/testsuite/gdb.base/watch-read.exp              |  2 +-
 gdb/testsuite/gdb.base/watch_thread_num.exp        |  2 +-
 gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp  |  2 +-
 gdb/testsuite/gdb.multi/watchpoint-multi.exp       |  2 +-
 gdb/testsuite/gdb.threads/watchthreads-reorder.exp |  2 +-
 gdb/testsuite/lib/gdb.exp                          | 10 +++++-----
 8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 058c9327dcd..e967b563dda 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -184,7 +184,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
 	    test_break $always_inserted "watch"
 	}
 
-	if {![skip_hw_watchpoint_access_tests]
+	if {[allow_hw_watchpoint_access_tests]
 	    && ![skip_hw_watchpoint_multi_tests]} {
 	    test_break $always_inserted "rwatch"
 	    test_break $always_inserted "awatch"
diff --git a/gdb/testsuite/gdb.base/watch-before-fork.exp b/gdb/testsuite/gdb.base/watch-before-fork.exp
index 41574169e8f..a9e212026bf 100644
--- a/gdb/testsuite/gdb.base/watch-before-fork.exp
+++ b/gdb/testsuite/gdb.base/watch-before-fork.exp
@@ -18,7 +18,7 @@
 # followed by a catchpoint hit.
 
 # This test uses "awatch".
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/watch-read.exp b/gdb/testsuite/gdb.base/watch-read.exp
index 6533ee2f14c..2c2e165394e 100644
--- a/gdb/testsuite/gdb.base/watch-read.exp
+++ b/gdb/testsuite/gdb.base/watch-read.exp
@@ -24,7 +24,7 @@
 
 standard_testfile .c
 
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp
index 799b386a390..28b8581ba5a 100644
--- a/gdb/testsuite/gdb.base/watch_thread_num.exp
+++ b/gdb/testsuite/gdb.base/watch_thread_num.exp
@@ -23,7 +23,7 @@
 # so the test is only meaningful on a system with hardware watchpoints.
 # More specifically, the implementation of this test uses access
 # watchpoints, so skip it when those are not available.
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
index e93391a6512..fa16b3c456c 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
@@ -13,7 +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/>.
 
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 set test watchpoint-hw-hit-once
 set srcfile ${test}.c
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
index e29e0675d8e..69996ba88d2 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
@@ -22,7 +22,7 @@ require !use_gdb_stub
 
 # Do not use simple hardware watchpoints ("watch") as its false hit may be
 # unnoticed by GDB if it reads it still has the same value.
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
index 2469b3ada0c..d5de2c68684 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
@@ -25,7 +25,7 @@
 # could be assigned during continuation of a thread with pending SIGTRAP to the
 # different/new watchpoint, just based on the watchpoint/debug register number.
 
-require !skip_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
+require allow_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
 if {![istarget *-*-linux*]} {
     return 0
 }
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index f3f0bfac762..13d1ae881b5 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4081,19 +4081,19 @@ proc skip_hw_watchpoint_multi_tests {} {
     return 0
 }
 
-# Return a 1 if we should skip tests that require read/access watchpoints
+# Return a 1 if we should run tests that require read/access watchpoints
 
-proc skip_hw_watchpoint_access_tests {} {
+proc allow_hw_watchpoint_access_tests {} {
     if { [skip_hw_watchpoint_tests] } {
-	return 1
+	return 0
     }
 
     # These targets support just write watchpoints
     if { [istarget "s390*-*-*"] } {
-	return 1
+	return 0
     }
 
-    return 0
+    return 1
 }
 
 # Return 1 if we should skip tests that require the runtime unwinder
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 67/79] Rename to allow_hw_watchpoint_multi_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (65 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 66/79] Rename to allow_hw_watchpoint_access_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 68/79] Rename to allow_hw_watchpoint_tests Tom Tromey
                   ` (13 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_hw_watchpoint_multi_tests to invert the sense, and
renames it to allow_hw_watchpoint_multi_tests.
---
 gdb/testsuite/gdb.base/break-idempotent.exp            |  2 +-
 gdb/testsuite/gdb.base/watchpoint.exp                  |  2 +-
 gdb/testsuite/gdb.multi/watchpoint-multi.exp           |  2 +-
 gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp |  2 +-
 gdb/testsuite/gdb.threads/watchthreads-reorder.exp     |  2 +-
 gdb/testsuite/gdb.threads/watchthreads.exp             |  2 +-
 gdb/testsuite/lib/gdb.exp                              | 10 +++++-----
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index e967b563dda..4d74bb54a1e 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -185,7 +185,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
 	}
 
 	if {[allow_hw_watchpoint_access_tests]
-	    && ![skip_hw_watchpoint_multi_tests]} {
+	    && [allow_hw_watchpoint_multi_tests]} {
 	    test_break $always_inserted "rwatch"
 	    test_break $always_inserted "awatch"
 	}
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index c47e083d083..5f5e7923c79 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -771,7 +771,7 @@ proc test_inaccessible_watchpoint {} {
 
 	# This step requires two HW watchpoints.  Since some platforms only
 	# have a single one, accept either SW or HW watchpoint in this case.
-	if {[skip_hw_watchpoint_multi_tests]} {
+	if {![allow_hw_watchpoint_multi_tests]} {
 	    set watchpoint_msg "(Watchpoint|Hardware watchpoint)"
 	}
 
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
index 69996ba88d2..109defa864a 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
@@ -62,7 +62,7 @@ gdb_breakpoint "marker_exit"
 
 gdb_test "inferior 1" "witching to inferior 1 .*" "switch back to inferior 1"
 
-if [skip_hw_watchpoint_multi_tests] {
+if {![allow_hw_watchpoint_multi_tests]} {
     # On single hardware watchpoint at least test the watchpoint in inferior
     # 2 is not hit.
 } else {
diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
index 2f627a05980..d58c777cef6 100644
--- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
+++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
@@ -19,7 +19,7 @@
 # thread other than the thread the local watchpoint was set in stops
 # for a breakpoint.
 
-require !skip_hw_watchpoint_multi_tests
+require allow_hw_watchpoint_multi_tests
 
 standard_testfile
 if {[gdb_compile_pthreads \
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
index d5de2c68684..68409eff325 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
@@ -25,7 +25,7 @@
 # could be assigned during continuation of a thread with pending SIGTRAP to the
 # different/new watchpoint, just based on the watchpoint/debug register number.
 
-require allow_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
+require allow_hw_watchpoint_access_tests allow_hw_watchpoint_multi_tests
 if {![istarget *-*-linux*]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp
index d2a95bf7d5c..1aa7957c867 100644
--- a/gdb/testsuite/gdb.threads/watchthreads.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads.exp
@@ -20,7 +20,7 @@
 
 # This test verifies that a watchpoint is detected in the proper thread
 # so the test is only meaningful on a system with hardware watchpoints.
-require !skip_hw_watchpoint_multi_tests
+require allow_hw_watchpoint_multi_tests
 
 proc target_no_stopped_data { } {
     return [istarget s390*-*-*]
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 13d1ae881b5..446f89a8a25 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4064,21 +4064,21 @@ proc skip_hw_watchpoint_tests {} {
     return 1
 }
 
-# Return a 1 if we should skip tests that require *multiple* hardware
+# Return a 1 if we should run tests that require *multiple* hardware
 # watchpoints to be active at the same time
 
-proc skip_hw_watchpoint_multi_tests {} {
+proc allow_hw_watchpoint_multi_tests {} {
     if { [skip_hw_watchpoint_tests] } {
-	return 1
+	return 0
     }
 
     # These targets support just a single hardware watchpoint
     if { [istarget "arm*-*-*"]
 	 || [istarget "powerpc*-*-linux*"] } {
-	return 1
+	return 0
     }
 
-    return 0
+    return 1
 }
 
 # Return a 1 if we should run tests that require read/access watchpoints
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 68/79] Rename to allow_hw_watchpoint_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (66 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 67/79] Rename to allow_hw_watchpoint_multi_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 69/79] Rename to allow_ifunc_tests Tom Tromey
                   ` (12 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_hw_watchpoint_tests to invert the sense, and renames
it to allow_hw_watchpoint_tests.
---
 gdb/testsuite/gdb.ada/task_watch.exp          |  2 +-
 gdb/testsuite/gdb.base/break-idempotent.exp   |  8 +++---
 gdb/testsuite/gdb.base/commands.exp           |  8 +++---
 gdb/testsuite/gdb.base/cond-eval-mode.exp     |  8 +++---
 gdb/testsuite/gdb.base/display.exp            |  6 ++--
 gdb/testsuite/gdb.base/gdb11531.exp           |  6 ++--
 gdb/testsuite/gdb.base/pr11022.exp            |  2 +-
 gdb/testsuite/gdb.base/recurse.exp            |  8 +++---
 gdb/testsuite/gdb.base/value-double-free.exp  |  6 ++--
 gdb/testsuite/gdb.base/watch-bitfields.exp    |  6 ++--
 gdb/testsuite/gdb.base/watch-cond-infcall.exp |  6 ++--
 gdb/testsuite/gdb.base/watch-cond.exp         | 10 +++----
 gdb/testsuite/gdb.base/watch-vfork.exp        |  2 +-
 .../gdb.base/watchpoint-hw-attach.exp         |  2 +-
 gdb/testsuite/gdb.base/watchpoint-hw.exp      |  2 +-
 .../gdb.base/watchpoint-reuse-slot.exp        |  6 ++--
 gdb/testsuite/gdb.base/watchpoint-solib.exp   |  6 ++--
 .../watchpoint-stops-at-right-insn.exp        |  2 +-
 .../gdb.base/watchpoint-unaligned.exp         |  2 +-
 gdb/testsuite/gdb.base/watchpoint.exp         | 28 +++++++++----------
 gdb/testsuite/gdb.base/watchpoints.exp        |  6 ++--
 gdb/testsuite/gdb.cp/watch-cp.exp             |  2 +-
 gdb/testsuite/gdb.mi/mi-watch-nonstop.exp     |  2 +-
 gdb/testsuite/gdb.mi/mi-watch.exp             |  8 +++---
 gdb/testsuite/gdb.mi/pr11022.exp              |  2 +-
 gdb/testsuite/gdb.python/py-breakpoint.exp    | 16 +++++------
 .../process-dies-while-detaching.exp          |  2 +-
 .../step-over-trips-on-watchpoint.exp         |  2 +-
 gdb/testsuite/gdb.threads/watchpoint-fork.exp | 10 +++----
 gdb/testsuite/gdb.threads/watchthreads2.exp   |  2 +-
 gdb/testsuite/gdb.threads/wp-replication.exp  |  2 +-
 gdb/testsuite/lib/gdb.exp                     | 14 +++++-----
 32 files changed, 97 insertions(+), 97 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp
index fc8319e271c..0641008fb51 100644
--- a/gdb/testsuite/gdb.ada/task_watch.exp
+++ b/gdb/testsuite/gdb.ada/task_watch.exp
@@ -19,7 +19,7 @@ load_lib "ada.exp"
 
 require allow_ada_tests
 
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 4d74bb54a1e..559a3a6306b 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -36,11 +36,11 @@
 
 standard_testfile
 
-# The skip_hw_watchpoint_tests starts GDB on a small test program to
+# The allow_hw_watchpoint_tests starts GDB on a small test program to
 # check if HW watchpoints are supported.  We do not want to restart
 # GDB after this test script has itself started GDB, so call
-# skip_hw_watchpoint_tests first and cache the result.
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+# allow_hw_watchpoint_tests first and cache the result.
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 # Force a breakpoint re-set in GDB.  Currently this is done by
 # reloading symbols with the "file" command.
@@ -180,7 +180,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
 	    test_break $always_inserted "hbreak"
 	}
 
-	if {!$skip_hw_watchpoint_tests_p} {
+	if {$allow_hw_watchpoint_tests_p} {
 	    test_break $always_inserted "watch"
 	}
 
diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp
index 2c3f168d21e..316897f9c5c 100644
--- a/gdb/testsuite/gdb.base/commands.exp
+++ b/gdb/testsuite/gdb.base/commands.exp
@@ -17,13 +17,13 @@
 # test special commands (if, while, etc)
 #
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -550,10 +550,10 @@ proc_with_prefix user_defined_command_manyargs_test {} {
 
 proc_with_prefix watchpoint_command_test {} {
     global gdb_prompt
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     # Disable hardware watchpoints if necessary.
-    if {$skip_hw_watchpoint_tests_p} {
+    if {!$allow_hw_watchpoint_tests_p} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
 
diff --git a/gdb/testsuite/gdb.base/cond-eval-mode.exp b/gdb/testsuite/gdb.base/cond-eval-mode.exp
index 010350f1458..16fb067bde8 100644
--- a/gdb/testsuite/gdb.base/cond-eval-mode.exp
+++ b/gdb/testsuite/gdb.base/cond-eval-mode.exp
@@ -15,13 +15,13 @@
 
 # Test 'set breakpoint condition-evaluation' settings
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -119,10 +119,10 @@ proc test_break { break_command } {
 #
 proc test_watch { watch_command } {
     global gdb_prompt
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     with_test_prefix "$watch_command" {
-	if {$skip_hw_watchpoint_tests_p} {
+	if {!$allow_hw_watchpoint_tests_p} {
 	    unsupported "no target support"
 	    return
 	}
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index 405ae6935ca..cacd6f530d4 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -17,13 +17,13 @@
 #               Also do some printing stuff for coverage's sake.
 #
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -65,7 +65,7 @@ if {![runto_main]} {
 }
 
 # Disable hardware watchpoints if necessary.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
diff --git a/gdb/testsuite/gdb.base/gdb11531.exp b/gdb/testsuite/gdb.base/gdb11531.exp
index 9b5c70ee75a..bf4fcfbe238 100644
--- a/gdb/testsuite/gdb.base/gdb11531.exp
+++ b/gdb/testsuite/gdb.base/gdb11531.exp
@@ -19,13 +19,13 @@
 # This is a problem related to CANNOT_STEP_HW_WATCHPOINTS macro.
 # It affects Solaris native targets.
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -34,7 +34,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
 }
 
 # Disable hardware watchpoints if necessary.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
diff --git a/gdb/testsuite/gdb.base/pr11022.exp b/gdb/testsuite/gdb.base/pr11022.exp
index bf329bc383f..ffafe2d3222 100644
--- a/gdb/testsuite/gdb.base/pr11022.exp
+++ b/gdb/testsuite/gdb.base/pr11022.exp
@@ -13,7 +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/>.
 
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/recurse.exp
index 21b378ed7c6..c9a44e9e4e2 100644
--- a/gdb/testsuite/gdb.base/recurse.exp
+++ b/gdb/testsuite/gdb.base/recurse.exp
@@ -15,13 +15,13 @@
 
 # This file was written by Jeff Law. (law@cs.utah.edu)
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -32,9 +32,9 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
 proc recurse_tests {} {
 
     # Disable hardware watchpoints if necessary.
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
-    if {$skip_hw_watchpoint_tests_p} {
+    if {!$allow_hw_watchpoint_tests_p} {
 	 gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
 
diff --git a/gdb/testsuite/gdb.base/value-double-free.exp b/gdb/testsuite/gdb.base/value-double-free.exp
index 7602097d959..9ac7a0715dc 100644
--- a/gdb/testsuite/gdb.base/value-double-free.exp
+++ b/gdb/testsuite/gdb.base/value-double-free.exp
@@ -13,13 +13,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -32,7 +32,7 @@ if ![runto_main] {
 }
 
 # Disable hardware watchpoints if necessary.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
diff --git a/gdb/testsuite/gdb.base/watch-bitfields.exp b/gdb/testsuite/gdb.base/watch-bitfields.exp
index 07ab2934394..ce2aee2ac18 100644
--- a/gdb/testsuite/gdb.base/watch-bitfields.exp
+++ b/gdb/testsuite/gdb.base/watch-bitfields.exp
@@ -15,14 +15,14 @@
 
 # This file is part of the gdb testsuite
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 # Disable hardware watchpoints if the target does not support them.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -101,7 +101,7 @@ proc test_regular_watch {} {
 }
 
 # Disable hardware watchpoints if the target does not support them.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
diff --git a/gdb/testsuite/gdb.base/watch-cond-infcall.exp b/gdb/testsuite/gdb.base/watch-cond-infcall.exp
index bdad05a0740..c8f5d584fc7 100644
--- a/gdb/testsuite/gdb.base/watch-cond-infcall.exp
+++ b/gdb/testsuite/gdb.base/watch-cond-infcall.exp
@@ -16,13 +16,13 @@
 # Test for watchpoints with conditions that involve inferior function
 # calls.
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -57,7 +57,7 @@ proc test_watchpoint { hw } {
 	"atchpoint \[0-9\]+: var\r\n\r\nOld value = 0\r\nNew value = 1\r\n.*watchpoint-stop.*"
 }
 
-if { !$skip_hw_watchpoint_tests_p } {
+if { $allow_hw_watchpoint_tests_p } {
     with_test_prefix "hw" { test_watchpoint 1 }
 }
 
diff --git a/gdb/testsuite/gdb.base/watch-cond.exp b/gdb/testsuite/gdb.base/watch-cond.exp
index 884b5f85e9d..ddcde9a94c2 100644
--- a/gdb/testsuite/gdb.base/watch-cond.exp
+++ b/gdb/testsuite/gdb.base/watch-cond.exp
@@ -17,13 +17,13 @@
 # Tests involving watchpoint conditions with local expressions.
 #
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile .c
 
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 # Disable hardware watchpoints if necessary.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
@@ -51,7 +51,7 @@ gdb_test "continue" \
 clean_restart ${testfile}
 
 # Disable hardware watchpoints if necessary.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
@@ -70,7 +70,7 @@ gdb_test "continue" \
 clean_restart ${testfile}
 
 # Disable hardware watchpoints if necessary.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
diff --git a/gdb/testsuite/gdb.base/watch-vfork.exp b/gdb/testsuite/gdb.base/watch-vfork.exp
index 180641ab6b7..2d36a4d5446 100644
--- a/gdb/testsuite/gdb.base/watch-vfork.exp
+++ b/gdb/testsuite/gdb.base/watch-vfork.exp
@@ -44,7 +44,7 @@ proc test_watchpoint_across_vfork { hw teststr } {
 	"Watchpoint triggers after vfork ($teststr)"
 }
 
-if { ![skip_hw_watchpoint_tests] } {
+if { [allow_hw_watchpoint_tests] } {
     test_watchpoint_across_vfork 1 "hw"
 }
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
index e8720458072..785fc35f7bc 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
@@ -16,7 +16,7 @@
 # watchpoint-hw-attach.exp -- Test if hardware watchpoints are used
 # when attaching to a target.
 
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 require can_spawn_for_attach
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp
index 4b32215344a..13871912d09 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw.exp
@@ -15,7 +15,7 @@
 
 require !use_gdb_stub
 
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
index 24ab5b3d3e6..9772d09f170 100644
--- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
@@ -22,13 +22,13 @@
 # operation.  (Note that we don't have any of these watchpoints
 # trigger.)
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 # starting the test.
 
@@ -295,7 +295,7 @@ proc setup_and_run_watchpoints_tests { hw_wp_p } {
 
 # Run tests with hardware watchpoints disabled, then again with them
 # enabled (if this target supports hardware watchpoints).
-if { !$skip_hw_watchpoint_tests_p } {
+if { $allow_hw_watchpoint_tests_p } {
     # Run test with H/W enabled.
     setup_and_run_watchpoints_tests 1
 }
diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.exp b/gdb/testsuite/gdb.base/watchpoint-solib.exp
index 559d77c82be..0492cf66037 100644
--- a/gdb/testsuite/gdb.base/watchpoint-solib.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-solib.exp
@@ -13,13 +13,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 #
 # test running programs
@@ -60,7 +60,7 @@ gdb_load_shlib $lib_sl
 runto_main
 
 # Disable hardware watchpoints if necessary.
-if {$skip_hw_watchpoint_tests_p} {
+if {!$allow_hw_watchpoint_tests_p} {
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
index 585669dd0fd..d45cfd9c742 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -71,7 +71,7 @@
 standard_testfile
 
 # No use testing this if we can't use hardware watchpoints.
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
index 33fc1c1b5d0..ce5a1e5bf66 100644
--- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
@@ -17,7 +17,7 @@
 
 # Test inserting read watchpoints on unaligned addresses.
 
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 standard_testfile
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index 5f5e7923c79..513964ebf86 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -15,13 +15,13 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 standard_testfile
 
@@ -631,14 +631,14 @@ proc test_watch_location {} {
 proc test_wide_location_1 {} {
     global no_hw
     global gdb_prompt
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     # This test watches two words on most 32-bit ABIs, and one word on
     # most 64-bit ABIs.
 
     # Platforms where the target can't watch such a large region
     # should clear hw_expected below.
-    if { $no_hw || $skip_hw_watchpoint_tests_p
+    if { $no_hw || !$allow_hw_watchpoint_tests_p
          || [istarget arm*-*-*]
          || ([istarget powerpc*-*-*] && ![is_lp64_target])} {
 	set hw_expected 0
@@ -679,14 +679,14 @@ proc test_wide_location_1 {} {
 proc test_wide_location_2 {} {
     global no_hw
     global gdb_prompt
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     # This test watches four words on most 32-bit ABIs, and two words
     # on 64-bit ABIs.
 
     # Platforms where the target can't watch such a large region
     # should clear hw_expected below.
-    if { $no_hw || $skip_hw_watchpoint_tests_p
+    if { $no_hw || !$allow_hw_watchpoint_tests_p
          || [istarget arm*-*-*]
          || [istarget powerpc*-*-*]} {
 	set hw_expected 0
@@ -803,7 +803,7 @@ proc test_inaccessible_watchpoint {} {
 
 proc test_no_hw_watchpoints {} {
     global testfile
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     clean_restart $testfile
 
@@ -849,7 +849,7 @@ proc test_no_hw_watchpoints {} {
 
 
     # Re-enable hardware watchpoints if necessary.
-    if {!$skip_hw_watchpoint_tests_p} {
+    if {$allow_hw_watchpoint_tests_p} {
         gdb_test_no_output "set can-use-hw-watchpoints 1" ""
     }
 }
@@ -901,9 +901,9 @@ proc test_watchpoint_in_big_blob {} {
 
 proc test_watch_register_location {} {
     global no_hw
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
-    if {!$no_hw && !$skip_hw_watchpoint_tests_p} {
+    if {!$no_hw && $allow_hw_watchpoint_tests_p} {
 	# Non-memory read/access watchpoints are not supported, they would
 	# require software read/access watchpoint support (which is not
 	# currently available).
@@ -927,11 +927,11 @@ test_no_hw_watchpoints
 proc do_tests {} {
     global testfile
     global no_hw
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     clean_restart $testfile
 
-    if {$no_hw || $skip_hw_watchpoint_tests_p} {
+    if {$no_hw || !$allow_hw_watchpoint_tests_p} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0"\
 	    "disable fast watches, 1"
     }
@@ -951,7 +951,7 @@ proc do_tests {} {
     # `initialize' anymore.
     clean_restart $testfile
 
-    if {$no_hw || $skip_hw_watchpoint_tests_p} {
+    if {$no_hw || !$allow_hw_watchpoint_tests_p} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" \
 	    "disable fast watches, 2"
     }
@@ -989,7 +989,7 @@ proc do_tests {} {
 # watchpoints force-disabled.
 
 do_tests
-if {!$skip_hw_watchpoint_tests_p} {
+if {$allow_hw_watchpoint_tests_p} {
     with_test_prefix "no-hw" {
 	set no_hw 1
 	do_tests
diff --git a/gdb/testsuite/gdb.base/watchpoints.exp b/gdb/testsuite/gdb.base/watchpoints.exp
index 150389c1602..6860774fcc8 100644
--- a/gdb/testsuite/gdb.base/watchpoints.exp
+++ b/gdb/testsuite/gdb.base/watchpoints.exp
@@ -15,13 +15,13 @@
 
 # This file was written by Pierre Muller. (muller@ics.u-strasbg.fr)
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 
 standard_testfile
@@ -56,7 +56,7 @@ with_test_prefix "before inferior start" {
     clean_restart ${binfile}
 
     # Disable hardware watchpoints if necessary.
-    if {$skip_hw_watchpoint_tests_p} {
+    if {!$allow_hw_watchpoint_tests_p} {
         gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
 
diff --git a/gdb/testsuite/gdb.cp/watch-cp.exp b/gdb/testsuite/gdb.cp/watch-cp.exp
index 6ef245e9e72..4dc345d9403 100644
--- a/gdb/testsuite/gdb.cp/watch-cp.exp
+++ b/gdb/testsuite/gdb.cp/watch-cp.exp
@@ -13,7 +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/>.
 
-require allow_cplus_tests !skip_hw_watchpoint_tests
+require allow_cplus_tests allow_hw_watchpoint_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
index b3dc7b772e4..bb884c69a0b 100644
--- a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
@@ -13,7 +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/>.
 
-require !skip_hw_watchpoint_tests support_displaced_stepping
+require allow_hw_watchpoint_tests support_displaced_stepping
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp
index d6053a17f69..a6e6f89bc11 100644
--- a/gdb/testsuite/gdb.mi/mi-watch.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch.exp
@@ -20,13 +20,13 @@
 # The goal is not to test gdb functionality, which is done by other
 # tests, but to verify the correct output response to MI operations.
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
@@ -146,9 +146,9 @@ proc test_watchpoint_all {mi_mode type} {
     upvar srcdir srcdir
     upvar subdir subdir
     upvar binfile binfile
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
-    if {$type == "hw" && $skip_hw_watchpoint_tests_p } {
+    if {$type == "hw" && !$allow_hw_watchpoint_tests_p } {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.mi/pr11022.exp b/gdb/testsuite/gdb.mi/pr11022.exp
index fcfad4400d3..0df19bb6c5d 100644
--- a/gdb/testsuite/gdb.mi/pr11022.exp
+++ b/gdb/testsuite/gdb.mi/pr11022.exp
@@ -13,7 +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/>.
 
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index 0995ae49ead..a3a8512c4d9 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -16,13 +16,13 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing breakpoints to Python.
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 load_lib gdb-python.exp
 
@@ -283,13 +283,13 @@ proc_with_prefix test_hardware_breakpoints { } {
 
 proc_with_prefix test_watchpoints { } {
     global srcfile testfile hex decimal
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
     # Disable hardware watchpoints if necessary.
-    if {$skip_hw_watchpoint_tests_p} {
+    if {!$allow_hw_watchpoint_tests_p} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
 
@@ -307,13 +307,13 @@ proc_with_prefix test_watchpoints { } {
 
 proc_with_prefix test_bkpt_internal { } {
     global srcfile testfile hex decimal
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
     # Disable hardware watchpoints if necessary.
-    if {$skip_hw_watchpoint_tests_p} {
+    if {!$allow_hw_watchpoint_tests_p} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
     if {![runto_main]} {
@@ -355,13 +355,13 @@ proc_with_prefix test_bkpt_internal { } {
 
 proc_with_prefix test_bkpt_eval_funcs { } {
     global srcfile testfile hex decimal
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
 
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
     # Disable hardware watchpoints if necessary.
-    if {$skip_hw_watchpoint_tests_p} {
+    if {!$allow_hw_watchpoint_tests_p} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
     if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
index 34003678d4f..bbbe82df30c 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
+++ b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
@@ -235,7 +235,7 @@ proc test_detach {multi_process cmd} {
 # Same as test_detach, except set a watchpoint before detaching.
 
 proc test_detach_watch {wp multi_process cmd} {
-    if { $wp == "hw" && [skip_hw_watchpoint_tests] } {
+    if { $wp == "hw" && ![allow_hw_watchpoint_tests] } {
 	unsupported "hw watchpoint"
 	return
     }
diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
index f271c468aff..45f4b76958d 100644
--- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
+++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
@@ -22,7 +22,7 @@ set executable ${testfile}
 # This test verifies that a watchpoint is detected in a multithreaded
 # program so the test is only meaningful on a system with hardware
 # watchpoints.
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable [list debug "incdir=${objdir}"]] != "" } {
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
index ed562f0eae3..d3804e68f88 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
@@ -15,13 +15,13 @@
 
 # Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-# The skip_hw_watchpoint_tests checks if watchpoints are supported by the
+# The allow_hw_watchpoint_tests checks if watchpoints are supported by the
 # processor.  On PowerPC, the check runs a small test program under gdb
 # to determine if the Power processor supports HW watchpoints.  The check
 # must be done before starting the test so as to not disrupt the execution
 # of the actual test.
 
-set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 set testfile watchpoint-fork
 
@@ -29,7 +29,7 @@ set testfile watchpoint-fork
 set debug 0
 
 proc test {type symbol} {
-    global skip_hw_watchpoint_tests_p
+    global allow_hw_watchpoint_tests_p
     global debug
     with_test_prefix "$type" {
 	global testfile subdir srcdir gdb_prompt
@@ -50,7 +50,7 @@ proc test {type symbol} {
 
 	    clean_restart $executable
 
-	    if {$skip_hw_watchpoint_tests_p} {
+	    if {!$allow_hw_watchpoint_tests_p} {
 		# The software watchpoint functionality is in GDB an unrelated test.
 		gdb_test_no_output "set can-use-hw-watchpoints 0"
 		# Software watchpoints can be quite slow on remote targets
@@ -102,7 +102,7 @@ proc test {type symbol} {
 
 	# threads
 
-	if {$skip_hw_watchpoint_tests_p} {
+	if {!$allow_hw_watchpoint_tests_p} {
 	    # Watchpoint hits would get detected in unexpected threads.
 	    return
 	}
diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp
index e9db6781708..09858aee486 100644
--- a/gdb/testsuite/gdb.threads/watchthreads2.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads2.exp
@@ -24,7 +24,7 @@ set X_INCR_COUNT 10
 
 # This test verifies that a watchpoint is detected in the proper thread
 # so the test is only meaningful on a system with hardware watchpoints.
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index 7da66f386ab..ccb05b57852 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -27,7 +27,7 @@ set NR_TRIGGERS_PER_THREAD 2
 # This test verifies that a hardware watchpoint gets replicated to
 # every existing thread and is detected properly.  This test is
 # only meaningful on a target with hardware watchpoint support.
-require !skip_hw_watchpoint_tests
+require allow_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 446f89a8a25..7143908bbc2 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4039,12 +4039,12 @@ proc skip_hw_breakpoint_tests {} {
     return 1
 }
 
-# Return a 1 if we should skip tests that require hardware watchpoints
+# Return a 1 if we should run tests that require hardware watchpoints
 
-proc skip_hw_watchpoint_tests {} {
+proc allow_hw_watchpoint_tests {} {
     # Skip tests if requested by the board
     if { [target_info exists gdb,no_hardware_watchpoints]} {
-	return 1
+	return 0
     }
 
     # These targets support hardware watchpoints natively
@@ -4058,17 +4058,17 @@ proc skip_hw_watchpoint_tests {} {
 	 || [istarget "aarch64*-*-*"]
 	 || ([istarget "powerpc*-*-linux*"] && [has_hw_wp_support])
 	 || [istarget "s390*-*-*"] } {
-	return 0
+	return 1
     }
 
-    return 1
+    return 0
 }
 
 # Return a 1 if we should run tests that require *multiple* hardware
 # watchpoints to be active at the same time
 
 proc allow_hw_watchpoint_multi_tests {} {
-    if { [skip_hw_watchpoint_tests] } {
+    if { ![allow_hw_watchpoint_tests] } {
 	return 0
     }
 
@@ -4084,7 +4084,7 @@ proc allow_hw_watchpoint_multi_tests {} {
 # Return a 1 if we should run tests that require read/access watchpoints
 
 proc allow_hw_watchpoint_access_tests {} {
-    if { [skip_hw_watchpoint_tests] } {
+    if { ![allow_hw_watchpoint_tests] } {
 	return 0
     }
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 69/79] Rename to allow_ifunc_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (67 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 68/79] Rename to allow_hw_watchpoint_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 70/79] Rename to allow_opencl_tests Tom Tromey
                   ` (11 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_ifunc_tests to invert the sense, and renames it to
allow_ifunc_tests.
---
 gdb/testsuite/gdb.base/gnu-ifunc.exp        | 2 +-
 gdb/testsuite/gdb.compile/compile-ifunc.exp | 2 +-
 gdb/testsuite/lib/gdb.exp                   | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 967d1e053e7..81119f764b8 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests !skip_ifunc_tests
+require !skip_shlib_tests allow_ifunc_tests
 
 standard_testfile .c
 set staticexecutable ${testfile}-static
diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp
index bfbe65a503b..990d35a53f6 100644
--- a/gdb/testsuite/gdb.compile/compile-ifunc.exp
+++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp
@@ -15,7 +15,7 @@
 
 load_lib compile-support.exp
 
-require !skip_ifunc_tests
+require allow_ifunc_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 7143908bbc2..3a1936ffc82 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3972,17 +3972,17 @@ gdb_caching_proc has_int128_cxx {
     return [gdb_int128_helper c++]
 }
 
-# Return true if the IFUNC feature is unsupported.
-gdb_caching_proc skip_ifunc_tests {
+# Return true if the IFUNC feature is supported.
+gdb_caching_proc allow_ifunc_tests {
     if [gdb_can_simple_compile ifunc {
 	extern void f_ ();
 	typedef void F (void);
 	F* g (void) { return &f_; }
 	void f () __attribute__ ((ifunc ("g")));
     } object] {
-	return 0
-    } else {
 	return 1
+    } else {
+	return 0
     }
 }
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 70/79] Rename to allow_opencl_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (68 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 69/79] Rename to allow_ifunc_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 71/79] Rename to allow_perf_tests Tom Tromey
                   ` (10 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_opencl_tests to invert the sense, and renames it to
allow_opencl_tests.
---
 gdb/testsuite/gdb.opencl/callfuncs.exp   |  2 +-
 gdb/testsuite/gdb.opencl/convs_casts.exp |  2 +-
 gdb/testsuite/gdb.opencl/datatypes.exp   |  2 +-
 gdb/testsuite/gdb.opencl/operators.exp   |  2 +-
 gdb/testsuite/gdb.opencl/vec_comps.exp   |  2 +-
 gdb/testsuite/lib/opencl.exp             | 16 ++++++++--------
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.opencl/callfuncs.exp b/gdb/testsuite/gdb.opencl/callfuncs.exp
index 98b34ab08cd..1fa3f8abcb0 100644
--- a/gdb/testsuite/gdb.opencl/callfuncs.exp
+++ b/gdb/testsuite/gdb.opencl/callfuncs.exp
@@ -19,7 +19,7 @@
 
 load_lib opencl.exp
 
-require !skip_opencl_tests
+require allow_opencl_tests
 
 set testfile "callfuncs"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/convs_casts.exp b/gdb/testsuite/gdb.opencl/convs_casts.exp
index 9764d75fcb5..d648b7f6f0d 100644
--- a/gdb/testsuite/gdb.opencl/convs_casts.exp
+++ b/gdb/testsuite/gdb.opencl/convs_casts.exp
@@ -19,7 +19,7 @@
 
 load_lib opencl.exp
 
-require !skip_opencl_tests
+require allow_opencl_tests
 
 set testfile "convs_casts"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/datatypes.exp b/gdb/testsuite/gdb.opencl/datatypes.exp
index 69d07e7b695..b59567f65e2 100644
--- a/gdb/testsuite/gdb.opencl/datatypes.exp
+++ b/gdb/testsuite/gdb.opencl/datatypes.exp
@@ -19,7 +19,7 @@
 
 load_lib opencl.exp
 
-require !skip_opencl_tests
+require allow_opencl_tests
 
 set testfile "datatypes"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/operators.exp b/gdb/testsuite/gdb.opencl/operators.exp
index 31a7ee87873..a70e169112d 100644
--- a/gdb/testsuite/gdb.opencl/operators.exp
+++ b/gdb/testsuite/gdb.opencl/operators.exp
@@ -19,7 +19,7 @@
 
 load_lib opencl.exp
 
-require !skip_opencl_tests
+require allow_opencl_tests
 
 set testfile "operators"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/gdb.opencl/vec_comps.exp b/gdb/testsuite/gdb.opencl/vec_comps.exp
index 1ea2bd9d7ec..4c9f8012b79 100644
--- a/gdb/testsuite/gdb.opencl/vec_comps.exp
+++ b/gdb/testsuite/gdb.opencl/vec_comps.exp
@@ -19,7 +19,7 @@
 
 load_lib opencl.exp
 
-require !skip_opencl_tests
+require allow_opencl_tests
 
 set testfile "vec_comps"
 set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
diff --git a/gdb/testsuite/lib/opencl.exp b/gdb/testsuite/lib/opencl.exp
index 3f1b364fa00..4c66d2a9ecd 100644
--- a/gdb/testsuite/lib/opencl.exp
+++ b/gdb/testsuite/lib/opencl.exp
@@ -27,13 +27,13 @@ proc gdb_compile_opencl_hostapp {clsource executable options} {
     return [gdb_compile ${src} ${binfile} "executable" ${options_opencl}]
 }
 
-# Run a test on the target to check if it supports OpenCL. Return 0 if so, 1 if
+# Run a test on the target to check if it supports OpenCL. Return 1 if so, 0 if
 # it does not.
-gdb_caching_proc skip_opencl_tests {
+gdb_caching_proc allow_opencl_tests {
     global srcdir objdir subdir gdb_prompt
     global inferior_exited_re
 
-    set me "skip_opencl_tests"
+    set me "allow_opencl_tests"
 
     # Set up, compile, and execute an OpenCL program.  Include the current
     # process ID in the file name of the executable to prevent conflicts with
@@ -46,8 +46,8 @@ gdb_caching_proc skip_opencl_tests {
 
     if { [gdb_compile_opencl_hostapp "${clprogram}" "${executable}" "${compile_flags}" ] != "" } {
 	remote_file target delete ${clprogram}
-        verbose "$me:  compiling OpenCL binary failed, returning 1" 2
-	return 1
+	verbose "$me:  compiling OpenCL binary failed, returning 0" 2
+	return 0
     }
 
     # Compilation succeeded so now run it via gdb.
@@ -56,15 +56,15 @@ gdb_caching_proc skip_opencl_tests {
     gdb_expect 30 {
         -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
             verbose -log "\n$me: OpenCL support detected"
-            set result 0
+	    set result 1
         }
         -re ".*$inferior_exited_re with code.*${gdb_prompt} $" {
             verbose -log "\n$me: OpenCL support not detected"
-            set result 1
+	    set result 0
         }
         default {
             verbose -log "\n$me OpenCL support not detected (default case)"
-            set result 1
+	    set result 0
         }
     }
     gdb_exit
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 71/79] Rename to allow_perf_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (69 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 70/79] Rename to allow_opencl_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 72/79] Rename to allow_python_tests Tom Tromey
                   ` (9 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_perf_tests to invert the sense, and renames it to
allow_perf_tests.
---
 gdb/testsuite/gdb.perf/backtrace.exp                   |  2 +-
 gdb/testsuite/gdb.perf/disassemble.exp                 |  2 +-
 gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp       |  2 +-
 gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp |  2 +-
 gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp        |  2 +-
 gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp      |  2 +-
 gdb/testsuite/gdb.perf/gmonster1-runto-main.exp        |  2 +-
 gdb/testsuite/gdb.perf/gmonster1-select-file.exp       |  2 +-
 gdb/testsuite/gdb.perf/gmonster1.exp                   |  2 +-
 gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp       |  2 +-
 gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp |  2 +-
 gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp        |  2 +-
 gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp      |  2 +-
 gdb/testsuite/gdb.perf/gmonster2-runto-main.exp        |  2 +-
 gdb/testsuite/gdb.perf/gmonster2-select-file.exp       |  2 +-
 gdb/testsuite/gdb.perf/gmonster2.exp                   |  2 +-
 gdb/testsuite/gdb.perf/single-step.exp                 |  2 +-
 gdb/testsuite/gdb.perf/skip-command.exp                |  2 +-
 gdb/testsuite/gdb.perf/skip-prologue.exp               |  2 +-
 gdb/testsuite/gdb.perf/solib.exp                       |  2 +-
 gdb/testsuite/gdb.perf/template-breakpoints.exp        |  2 +-
 gdb/testsuite/lib/perftest.exp                         | 10 +++++-----
 22 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/gdb/testsuite/gdb.perf/backtrace.exp b/gdb/testsuite/gdb.perf/backtrace.exp
index d8b046b5cd1..38cdd5da0a8 100644
--- a/gdb/testsuite/gdb.perf/backtrace.exp
+++ b/gdb/testsuite/gdb.perf/backtrace.exp
@@ -21,7 +21,7 @@
 
 load_lib perftest.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/disassemble.exp b/gdb/testsuite/gdb.perf/disassemble.exp
index ee33dcf0481..067754747ec 100644
--- a/gdb/testsuite/gdb.perf/disassemble.exp
+++ b/gdb/testsuite/gdb.perf/disassemble.exp
@@ -17,7 +17,7 @@
 # some large functions in GDB.
 load_lib perftest.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 global GDB
 
diff --git a/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp b/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp
index 1c17cd7f450..706ea7a87d4 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-null-lookup.exp
@@ -19,6 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-null-lookup.py NullLookup
diff --git a/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp b/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp
index ae175f3a1ef..b3b992a6872 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-pervasive-typedef.exp
@@ -21,6 +21,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-pervasive-typedef.py PervasiveTypedef
diff --git a/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp b/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp
index 54f7f00b42b..a0827339025 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-print-cerr.exp
@@ -19,6 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-print-cerr.py PrintCerr
diff --git a/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp b/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp
index f37cead361f..426c968995c 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-ptype-string.exp
@@ -19,6 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-ptype-string.py GmonsterPtypeString
diff --git a/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp b/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp
index 8b4311ed43d..ad235dbe897 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-runto-main.exp
@@ -19,6 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-runto-main.py GmonsterRuntoMain
diff --git a/gdb/testsuite/gdb.perf/gmonster1-select-file.exp b/gdb/testsuite/gdb.perf/gmonster1-select-file.exp
index 71b3d61b772..1e720acf147 100644
--- a/gdb/testsuite/gdb.perf/gmonster1-select-file.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1-select-file.exp
@@ -19,6 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster1.exp make_testcase_config gmonster-select-file.py GmonsterSelectFile
diff --git a/gdb/testsuite/gdb.perf/gmonster1.exp b/gdb/testsuite/gdb.perf/gmonster1.exp
index 900452501eb..7ccf9fa9b53 100644
--- a/gdb/testsuite/gdb.perf/gmonster1.exp
+++ b/gdb/testsuite/gdb.perf/gmonster1.exp
@@ -36,7 +36,7 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 if ![info exists MONSTER] {
     set MONSTER "n"
diff --git a/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp b/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp
index 353e6f12202..f98c5a5a658 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-null-lookup.exp
@@ -20,6 +20,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-null-lookup.py NullLookup
diff --git a/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp b/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp
index e37c1a4b2f6..ce3d48b8ba8 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-pervasive-typedef.exp
@@ -21,6 +21,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-pervasive-typedef.py PervasiveTypedef
diff --git a/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp b/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp
index ccb9e733fb4..2020ddffdbe 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-print-cerr.exp
@@ -19,6 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-print-cerr.py PrintCerr
diff --git a/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp b/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp
index a21fa349b7a..c153b2f2c19 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-ptype-string.exp
@@ -20,6 +20,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-ptype-string.py GmonsterPtypeString
diff --git a/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp b/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp
index 05e2ec37dca..b1cbfe1de0f 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-runto-main.exp
@@ -19,6 +19,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-runto-main.py GmonsterRuntoMain
diff --git a/gdb/testsuite/gdb.perf/gmonster2-select-file.exp b/gdb/testsuite/gdb.perf/gmonster2-select-file.exp
index 869f048e091..aa0428cfe4b 100644
--- a/gdb/testsuite/gdb.perf/gmonster2-select-file.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2-select-file.exp
@@ -20,6 +20,6 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 GenPerfTest::standard_run_driver gmonster2.exp make_testcase_config gmonster-select-file.py GmonsterSelectFile
diff --git a/gdb/testsuite/gdb.perf/gmonster2.exp b/gdb/testsuite/gdb.perf/gmonster2.exp
index bb0b76994b9..b1f1c5f642d 100644
--- a/gdb/testsuite/gdb.perf/gmonster2.exp
+++ b/gdb/testsuite/gdb.perf/gmonster2.exp
@@ -36,7 +36,7 @@
 load_lib perftest.exp
 load_lib gen-perf-test.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 if ![info exists MONSTER] {
     set MONSTER "n"
diff --git a/gdb/testsuite/gdb.perf/single-step.exp b/gdb/testsuite/gdb.perf/single-step.exp
index b46f838ea8c..4638c55e68b 100644
--- a/gdb/testsuite/gdb.perf/single-step.exp
+++ b/gdb/testsuite/gdb.perf/single-step.exp
@@ -19,7 +19,7 @@
 
 load_lib perftest.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/skip-command.exp b/gdb/testsuite/gdb.perf/skip-command.exp
index c0019331cac..0b691992861 100644
--- a/gdb/testsuite/gdb.perf/skip-command.exp
+++ b/gdb/testsuite/gdb.perf/skip-command.exp
@@ -25,7 +25,7 @@
 
 load_lib perftest.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 standard_testfile .cc skip-funcs.cc
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/skip-prologue.exp b/gdb/testsuite/gdb.perf/skip-prologue.exp
index aaa0bbfe6ff..4b246296741 100644
--- a/gdb/testsuite/gdb.perf/skip-prologue.exp
+++ b/gdb/testsuite/gdb.perf/skip-prologue.exp
@@ -21,7 +21,7 @@
 
 load_lib perftest.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/solib.exp b/gdb/testsuite/gdb.perf/solib.exp
index 95d014090f8..7c37288c42a 100644
--- a/gdb/testsuite/gdb.perf/solib.exp
+++ b/gdb/testsuite/gdb.perf/solib.exp
@@ -24,7 +24,7 @@
 
 load_lib perftest.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 standard_testfile .c
 set executable $testfile
diff --git a/gdb/testsuite/gdb.perf/template-breakpoints.exp b/gdb/testsuite/gdb.perf/template-breakpoints.exp
index fae5c24681c..b737f3a888e 100644
--- a/gdb/testsuite/gdb.perf/template-breakpoints.exp
+++ b/gdb/testsuite/gdb.perf/template-breakpoints.exp
@@ -21,7 +21,7 @@
 
 load_lib perftest.exp
 
-require !skip_perf_tests
+require allow_perf_tests
 
 standard_testfile .cc
 set executable $testfile
diff --git a/gdb/testsuite/lib/perftest.exp b/gdb/testsuite/lib/perftest.exp
index 7ecd79651ed..14dd057ed54 100644
--- a/gdb/testsuite/lib/perftest.exp
+++ b/gdb/testsuite/lib/perftest.exp
@@ -129,9 +129,9 @@ namespace eval PerfTest {
     }
 }
 
-# Return true if performance tests are skipped.
+# Return true if performance tests are to be run.
 
-proc skip_perf_tests { } {
+proc allow_perf_tests { } {
     global GDB_PERFTEST_MODE
 
     if [info exists GDB_PERFTEST_MODE] {
@@ -139,13 +139,13 @@ proc skip_perf_tests { } {
 	     && "$GDB_PERFTEST_MODE" != "run"
 	     && "$GDB_PERFTEST_MODE" != "both" } {
 	    error "Unknown value of GDB_PERFTEST_MODE."
-	    return 1
+	    return 0
 	}
 
-	return 0
+	return 1
     }
 
-    return 1
+    return 0
 }
 
 # Given a list of tcl strings, return the same list as the text form of a
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 72/79] Rename to allow_python_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (70 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 71/79] Rename to allow_perf_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 73/79] Rename to allow_rust_tests Tom Tromey
                   ` (8 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_python_tests to invert the sense, and renames it to
allow_python_tests.
---
 gdb/testsuite/gdb.ada/array_of_variant.exp                  | 2 +-
 gdb/testsuite/gdb.ada/pp-rec-component.exp                  | 2 +-
 gdb/testsuite/gdb.ada/py_range.exp                          | 2 +-
 gdb/testsuite/gdb.ada/py_taft.exp                           | 2 +-
 gdb/testsuite/gdb.ada/variant.exp                           | 2 +-
 gdb/testsuite/gdb.arch/i386-mpx.exp                         | 2 +-
 gdb/testsuite/gdb.base/default.exp                          | 2 +-
 gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp        | 2 +-
 gdb/testsuite/gdb.base/jit-reader.exp                       | 4 ++--
 gdb/testsuite/gdb.base/non-lazy-array-index.exp             | 2 +-
 gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp    | 2 +-
 gdb/testsuite/gdb.base/style.exp                            | 2 +-
 gdb/testsuite/gdb.dwarf2/symtab-producer.exp                | 2 +-
 gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp            | 6 +++---
 gdb/testsuite/gdb.gdb/python-helper.exp                     | 2 +-
 gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp     | 4 ++--
 gdb/testsuite/gdb.multi/tids.exp                            | 2 +-
 gdb/testsuite/gdb.python/compare-enum-type.exp              | 2 +-
 gdb/testsuite/gdb.python/flexible-array-member.exp          | 2 +-
 gdb/testsuite/gdb.python/lib-types.exp                      | 2 +-
 gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp      | 2 +-
 gdb/testsuite/gdb.python/py-arch-reg-groups.exp             | 2 +-
 gdb/testsuite/gdb.python/py-arch-reg-names.exp              | 2 +-
 gdb/testsuite/gdb.python/py-arch.exp                        | 2 +-
 gdb/testsuite/gdb.python/py-as-string.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-auto-load-chaining.exp          | 2 +-
 .../py-autoloaded-pretty-printers-in-newobjfile-event.exp   | 2 +-
 gdb/testsuite/gdb.python/py-bad-printers.exp                | 2 +-
 gdb/testsuite/gdb.python/py-block.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-bp-locations.exp                | 2 +-
 gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp      | 2 +-
 gdb/testsuite/gdb.python/py-breakpoint.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-caller-is.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-charset.exp                     | 2 +-
 gdb/testsuite/gdb.python/py-cmd.exp                         | 2 +-
 gdb/testsuite/gdb.python/py-completion.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-connection-removed.exp          | 2 +-
 gdb/testsuite/gdb.python/py-connection.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-disasm.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-doc-reformat.exp                | 2 +-
 gdb/testsuite/gdb.python/py-error.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-event-load.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-events.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-evsignal.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-evthreads.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-explore-cc.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-explore.exp                     | 2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp  | 2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp           | 2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint2.exp          | 2 +-
 gdb/testsuite/gdb.python/py-format-address.exp              | 2 +-
 gdb/testsuite/gdb.python/py-format-string.exp               | 2 +-
 gdb/testsuite/gdb.python/py-frame-args.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-frame-inline.exp                | 2 +-
 gdb/testsuite/gdb.python/py-frame.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-framefilter-addr.exp            | 2 +-
 gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp      | 2 +-
 gdb/testsuite/gdb.python/py-framefilter.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-function.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-inferior-leak.exp               | 2 +-
 gdb/testsuite/gdb.python/py-inferior.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-infthread.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-label-symbol-value.exp          | 2 +-
 gdb/testsuite/gdb.python/py-lazy-string.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-linetable.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-lookup-type.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-mi-events.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-mi-objfile.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp | 2 +-
 gdb/testsuite/gdb.python/py-nested-maps.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-objfile-script.exp              | 2 +-
 gdb/testsuite/gdb.python/py-objfile.exp                     | 2 +-
 gdb/testsuite/gdb.python/py-parameter.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-pending-frame-level.exp         | 2 +-
 gdb/testsuite/gdb.python/py-pp-integral.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-pp-maint.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-pp-re-notag.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-pp-registration.exp             | 2 +-
 gdb/testsuite/gdb.python/py-prettyprint.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-progspace.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-prompt.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-rbreak.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-record-btrace-threads.exp       | 2 +-
 gdb/testsuite/gdb.python/py-record-btrace.exp               | 2 +-
 gdb/testsuite/gdb.python/py-record-full.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-recurse-unwind.exp              | 2 +-
 gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp         | 2 +-
 gdb/testsuite/gdb.python/py-section-script.exp              | 2 +-
 gdb/testsuite/gdb.python/py-send-packet.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-shared.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-source-styling.exp              | 2 +-
 gdb/testsuite/gdb.python/py-startup-opt.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-strfns.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-symbol.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-symtab.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-sync-interp.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-template.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-thrhandle.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-type.exp                        | 2 +-
 gdb/testsuite/gdb.python/py-typeprint.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-unwind-inline.exp               | 2 +-
 gdb/testsuite/gdb.python/py-unwind-maint.exp                | 2 +-
 gdb/testsuite/gdb.python/py-unwind-user-regs.exp            | 2 +-
 gdb/testsuite/gdb.python/py-unwind.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-value-cc.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-value.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-xmethods.exp                    | 2 +-
 gdb/testsuite/gdb.python/tui-window-disabled.exp            | 2 +-
 gdb/testsuite/gdb.python/tui-window-names.exp               | 2 +-
 gdb/testsuite/gdb.python/tui-window.exp                     | 2 +-
 gdb/testsuite/gdb.rust/pp.exp                               | 2 +-
 gdb/testsuite/gdb.rust/simple.exp                           | 2 +-
 gdb/testsuite/gdb.server/server-kill-python.exp             | 2 +-
 gdb/testsuite/gdb.server/server-pipe.exp                    | 2 +-
 gdb/testsuite/gdb.threads/tls.exp                           | 2 +-
 gdb/testsuite/lib/gdb.exp                                   | 6 +++---
 116 files changed, 122 insertions(+), 122 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/array_of_variant.exp b/gdb/testsuite/gdb.ada/array_of_variant.exp
index 6110ec69b66..532fb1c1e29 100644
--- a/gdb/testsuite/gdb.ada/array_of_variant.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variant.exp
@@ -78,7 +78,7 @@ foreach_with_prefix scenario {all minimal} {
 	"print second array slice"
 
     # This is only supported for the DWARF encoding.
-    if {$scenario == "minimal" && ![skip_python_tests]} {
+    if {$scenario == "minimal" && [allow_python_tests]} {
 	gdb_test_no_output \
 	    "python o = gdb.parse_and_eval('objects')" \
 	    "fetch value for python"
diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp
index c77ee59bf37..2678195d38e 100644
--- a/gdb/testsuite/gdb.ada/pp-rec-component.exp
+++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp
@@ -15,7 +15,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests !skip_python_tests
+require allow_ada_tests allow_python_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp
index 83474b459c9..2972db21827 100644
--- a/gdb/testsuite/gdb.ada/py_range.exp
+++ b/gdb/testsuite/gdb.ada/py_range.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require allow_ada_tests !skip_python_tests
+require allow_ada_tests allow_python_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/py_taft.exp b/gdb/testsuite/gdb.ada/py_taft.exp
index 97c33e47da3..0ce9df72005 100644
--- a/gdb/testsuite/gdb.ada/py_taft.exp
+++ b/gdb/testsuite/gdb.ada/py_taft.exp
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require allow_ada_tests !skip_python_tests
+require allow_ada_tests allow_python_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/variant.exp b/gdb/testsuite/gdb.ada/variant.exp
index 414aed6f0d7..620761c40ed 100644
--- a/gdb/testsuite/gdb.ada/variant.exp
+++ b/gdb/testsuite/gdb.ada/variant.exp
@@ -48,7 +48,7 @@ foreach_with_prefix scenario {none all minimal} {
 	" = \\(one => 3, two => 7, str => \"zzz\", onevalue => 33, str2 => \"qqqqqqq\", twovalue => 88\\)"
 
     # This is only supported for the DWARF encoding.
-    if {$scenario == "minimal" && ![skip_python_tests]} {
+    if {$scenario == "minimal" && [allow_python_tests]} {
 	gdb_test_no_output \
 	    "python t = gdb.lookup_type('nested_and_variable')" \
 	    "fetch type for python"
diff --git a/gdb/testsuite/gdb.arch/i386-mpx.exp b/gdb/testsuite/gdb.arch/i386-mpx.exp
index d211f7be38a..96cd8fe9092 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx.exp
@@ -130,7 +130,7 @@ gdb_test "print \$bndstatus.status.error" "= 2" "bndstatus error is 2\
 after a failure on allocating an entry"
 
 # Going to test the python extension for lenght.
-if { [skip_python_tests] } { continue }
+if { ![allow_python_tests] } { continue }
 # Verify if size is right
 set test_string ".*\\\: size 0x11.*"
 gdb_test "print /x \$bnd0 = {0x10, 0x20}" "$test_string" "verify size for bnd0"
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 75788562704..4b1a3345f55 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -611,7 +611,7 @@ set show_conv_list \
 	{$_shell_exitsignal = void} \
 	{$_shell_exitcode = 0} \
     }
-if ![skip_python_tests] {
+if [allow_python_tests] {
     append show_conv_list \
 	{
 	    {$_memeq = <internal function _memeq>} \
diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
index 88e95d13ae2..a215dde0ece 100644
--- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
+++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
@@ -51,7 +51,7 @@
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return -1
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 1ff3f2a0c21..8023ef66e78 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -219,7 +219,7 @@ proc jit_reader_test {} {
 		    "cannot assign to register"
 	    }
 
-	    if { ![skip_python_tests] } {
+	    if { [allow_python_tests] } {
 		gdb_test "python print(gdb.objfiles())" \
 		    "$any<gdb.Objfile filename=<< JIT compiled code at $hex >>>$any" \
 		    "python gdb.Objfile.__repr__ ()"
@@ -263,7 +263,7 @@ proc jit_reader_test {} {
 		]
     }
 
-    if {![skip_python_tests]} {
+    if {[allow_python_tests]} {
 	gdb_test "python print(any(\[not x.is_file for x in gdb.objfiles()\]))" \
 	    "True" \
 	    "at least one non-file objfile"
diff --git a/gdb/testsuite/gdb.base/non-lazy-array-index.exp b/gdb/testsuite/gdb.base/non-lazy-array-index.exp
index 75c22526c2b..f88cf6f5c7a 100644
--- a/gdb/testsuite/gdb.base/non-lazy-array-index.exp
+++ b/gdb/testsuite/gdb.base/non-lazy-array-index.exp
@@ -80,7 +80,7 @@ gdb_test_multiple "p \$.array\[1\]" "" {
 
 gdb_test "set debug target 0" ".*"
 
-if { ! [skip_python_tests] } {
+if { [allow_python_tests] } {
     gdb_test_no_output "python val = gdb.parse_and_eval('global_foo')"
     gdb_test "python print('val = %s' % val)" "val = \\{f = 1, array = \\{1, 2, 3, 4, 5\\}\\}"
     gdb_test "python print('val.is_lazy = %s' % val.is_lazy)" "val\\.is_lazy = False"
diff --git a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
index f5c55f58425..fe906cefb14 100644
--- a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
+++ b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
@@ -36,7 +36,7 @@
 
 standard_testfile .c
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index 033c1faf6e3..0a7228c6890 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -471,7 +471,7 @@ proc test_startup_version_string { } {
 # expected or not, this styling requires Python support in GDB, and
 # the Python pygments module to be available.
 clean_restart ${binfile}
-if {![skip_python_tests] && [gdb_py_module_available "pygments"]} {
+if {[allow_python_tests] && [gdb_py_module_available "pygments"]} {
     set python_disassembly_styling true
 } else {
     set python_disassembly_styling false
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index 545d76f1246..02826ed4855 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 load_lib gdb-python.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support !skip_python_tests
+require dwarf2_support allow_python_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
index 8e5a1ab0111..f5dfc9c0793 100644
--- a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
+++ b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
@@ -72,8 +72,8 @@ gdb_test "break func" "Breakpoint .*" \
     "set breakpoint in func"
 gdb_continue_to_breakpoint "continue to func"
 
-set skip_python [skip_python_tests]
-if {!$skip_python} {
+set allow_python [allow_python_tests]
+if {$allow_python} {
     gdb_test "python finishbp = gdb.FinishBreakpoint()" \
 	"Temporary breakpoint.*" "set FinishBreakpoint"
 }
@@ -82,7 +82,7 @@ gdb_test "finish" [multi_line \
 		       "Run till exit from #0  $hex in func \\\(\\\)" \
 		       ".*$hex in main \\\(\\\)"]
 
-if {!$skip_python} {
+if {$allow_python} {
     gdb_test "python print (finishbp.return_value)" "None" \
 	"check that return_value is None"
 }
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
index 3c0e2e57304..c147c6bcbb0 100644
--- a/gdb/testsuite/gdb.gdb/python-helper.exp
+++ b/gdb/testsuite/gdb.gdb/python-helper.exp
@@ -24,7 +24,7 @@ if [target_info exists gdb,noinferiorio] {
     return
 }
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp
index e5d62cd31e2..487d2095aca 100644
--- a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp
+++ b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp
@@ -23,8 +23,8 @@ if {![multi_target_prepare]} {
     return
 }
 
-# Cache the result of calling skip_python_tests into a local variable.
-set run_python_tests [expr ! [skip_python_tests]]
+# Cache the result of calling allow_python_tests into a local variable.
+set run_python_tests [allow_python_tests]
 
 # Test "info inferiors" and "info connections".  MULTI_PROCESS
 # indicates whether the multi-process feature of remote targets is
diff --git a/gdb/testsuite/gdb.multi/tids.exp b/gdb/testsuite/gdb.multi/tids.exp
index ff48d422c9b..18fc4970fe7 100644
--- a/gdb/testsuite/gdb.multi/tids.exp
+++ b/gdb/testsuite/gdb.multi/tids.exp
@@ -415,7 +415,7 @@ with_test_prefix "two inferiors" {
 	"No threads match '3.1'\."
 }
 
-if { ![skip_python_tests] } {
+if { [allow_python_tests] } {
     with_test_prefix "python" {
 	# Check that InferiorThread.num and InferiorThread.global_num
 	# return the expected numbers.
diff --git a/gdb/testsuite/gdb.python/compare-enum-type.exp b/gdb/testsuite/gdb.python/compare-enum-type.exp
index 0cc6bd93daa..8a899e78f1f 100644
--- a/gdb/testsuite/gdb.python/compare-enum-type.exp
+++ b/gdb/testsuite/gdb.python/compare-enum-type.exp
@@ -17,7 +17,7 @@
 
 standard_testfile -a.c -b.c
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" "compare-enum-type" \
 	  [list $srcfile $srcfile2]] } {
diff --git a/gdb/testsuite/gdb.python/flexible-array-member.exp b/gdb/testsuite/gdb.python/flexible-array-member.exp
index 23f1da067a5..7849c137c36 100644
--- a/gdb/testsuite/gdb.python/flexible-array-member.exp
+++ b/gdb/testsuite/gdb.python/flexible-array-member.exp
@@ -17,7 +17,7 @@
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" \
 	${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp
index 92359c941a6..21ed23f0909 100644
--- a/gdb/testsuite/gdb.python/lib-types.exp
+++ b/gdb/testsuite/gdb.python/lib-types.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
index 64414a3c23b..7ab2b1facf7 100644
--- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
+++ b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
@@ -19,7 +19,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
index 5a0077d020d..2ba7c9c0752 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
@@ -16,7 +16,7 @@
 # Check the gdb.Architecture.register_groups functionality.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile py-arch.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-names.exp b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
index 73e41401f51..ff7a124d615 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-names.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
@@ -16,7 +16,7 @@
 # Check the gdb.Architecture.registers functionality.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile py-arch.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-arch.exp b/gdb/testsuite/gdb.python/py-arch.exp
index 449613bc0fb..4f4b4aa766f 100644
--- a/gdb/testsuite/gdb.python/py-arch.exp
+++ b/gdb/testsuite/gdb.python/py-arch.exp
@@ -13,7 +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/>.
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-as-string.exp b/gdb/testsuite/gdb.python/py-as-string.exp
index 8bf248a59ad..9c0503e90e5 100644
--- a/gdb/testsuite/gdb.python/py-as-string.exp
+++ b/gdb/testsuite/gdb.python/py-as-string.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
index aac6eb305b9..dbe9a6775d7 100644
--- a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
+++ b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
@@ -19,7 +19,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .c -f1.c -f2.c
 
diff --git a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
index a67ae48b316..2217e2e6527 100644
--- a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
+++ b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
@@ -19,7 +19,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile -main.cc
 
diff --git a/gdb/testsuite/gdb.python/py-bad-printers.exp b/gdb/testsuite/gdb.python/py-bad-printers.exp
index 26e6a97916c..7f53278f0fe 100644
--- a/gdb/testsuite/gdb.python/py-bad-printers.exp
+++ b/gdb/testsuite/gdb.python/py-bad-printers.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp
index 90c3b4d0fb0..3bdf97294ae 100644
--- a/gdb/testsuite/gdb.python/py-block.exp
+++ b/gdb/testsuite/gdb.python/py-block.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-bp-locations.exp b/gdb/testsuite/gdb.python/py-bp-locations.exp
index 55aca67eb9d..f8649f6c105 100644
--- a/gdb/testsuite/gdb.python/py-bp-locations.exp
+++ b/gdb/testsuite/gdb.python/py-bp-locations.exp
@@ -15,7 +15,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
index 6c1a262ad47..a3b0c3f96aa 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index a3a8512c4d9..bee2ceaf032 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -26,7 +26,7 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-caller-is.exp b/gdb/testsuite/gdb.python/py-caller-is.exp
index 66e0ce516e4..8acf8ffc38f 100644
--- a/gdb/testsuite/gdb.python/py-caller-is.exp
+++ b/gdb/testsuite/gdb.python/py-caller-is.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-charset.exp b/gdb/testsuite/gdb.python/py-charset.exp
index 9e831954cdd..bc61f742f5f 100644
--- a/gdb/testsuite/gdb.python/py-charset.exp
+++ b/gdb/testsuite/gdb.python/py-charset.exp
@@ -15,7 +15,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp
index 0eb785f6d4d..016ea445f10 100644
--- a/gdb/testsuite/gdb.python/py-cmd.exp
+++ b/gdb/testsuite/gdb.python/py-cmd.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-completion.exp b/gdb/testsuite/gdb.python/py-completion.exp
index bf1abf32ee2..b3acebf66a1 100644
--- a/gdb/testsuite/gdb.python/py-completion.exp
+++ b/gdb/testsuite/gdb.python/py-completion.exp
@@ -17,7 +17,7 @@ set testfile "py-completion"
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 set discard 0
diff --git a/gdb/testsuite/gdb.python/py-connection-removed.exp b/gdb/testsuite/gdb.python/py-connection-removed.exp
index efbcf46516f..afae0a7436d 100644
--- a/gdb/testsuite/gdb.python/py-connection-removed.exp
+++ b/gdb/testsuite/gdb.python/py-connection-removed.exp
@@ -25,7 +25,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-connection.c
 
diff --git a/gdb/testsuite/gdb.python/py-connection.exp b/gdb/testsuite/gdb.python/py-connection.exp
index 78710fd27de..b1a8d692b91 100644
--- a/gdb/testsuite/gdb.python/py-connection.exp
+++ b/gdb/testsuite/gdb.python/py-connection.exp
@@ -20,7 +20,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-disasm.exp b/gdb/testsuite/gdb.python/py-disasm.exp
index 57f8fdfce41..38a2b766320 100644
--- a/gdb/testsuite/gdb.python/py-disasm.exp
+++ b/gdb/testsuite/gdb.python/py-disasm.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-doc-reformat.exp b/gdb/testsuite/gdb.python/py-doc-reformat.exp
index 3829873c4cc..63079e7eafa 100644
--- a/gdb/testsuite/gdb.python/py-doc-reformat.exp
+++ b/gdb/testsuite/gdb.python/py-doc-reformat.exp
@@ -19,7 +19,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 clean_restart
 
diff --git a/gdb/testsuite/gdb.python/py-error.exp b/gdb/testsuite/gdb.python/py-error.exp
index 0a8fd190c18..230c827a139 100644
--- a/gdb/testsuite/gdb.python/py-error.exp
+++ b/gdb/testsuite/gdb.python/py-error.exp
@@ -20,7 +20,7 @@ set testfile "py-error"
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Start with a fresh gdb.
 gdb_exit
diff --git a/gdb/testsuite/gdb.python/py-event-load.exp b/gdb/testsuite/gdb.python/py-event-load.exp
index f3631251148..7dc47f1538a 100644
--- a/gdb/testsuite/gdb.python/py-event-load.exp
+++ b/gdb/testsuite/gdb.python/py-event-load.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests !skip_python_tests
+require !skip_shlib_tests allow_python_tests
 
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
index ea1a6f502ff..064a779c50b 100644
--- a/gdb/testsuite/gdb.python/py-events.exp
+++ b/gdb/testsuite/gdb.python/py-events.exp
@@ -13,7 +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/>.
 
-require !use_gdb_stub !skip_python_tests
+require !use_gdb_stub allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-evsignal.exp b/gdb/testsuite/gdb.python/py-evsignal.exp
index 2f0e791884e..5eab7b29aeb 100644
--- a/gdb/testsuite/gdb.python/py-evsignal.exp
+++ b/gdb/testsuite/gdb.python/py-evsignal.exp
@@ -22,7 +22,7 @@ if {[target_info gdb_protocol] == "remote"
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-evthreads.c
 
diff --git a/gdb/testsuite/gdb.python/py-evthreads.exp b/gdb/testsuite/gdb.python/py-evthreads.exp
index e993c6fe9b2..fcb069ea5af 100644
--- a/gdb/testsuite/gdb.python/py-evthreads.exp
+++ b/gdb/testsuite/gdb.python/py-evthreads.exp
@@ -13,7 +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/>.
 
-require support_displaced_stepping !skip_python_tests
+require support_displaced_stepping allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp
index a467e84a482..04aa06c7019 100644
--- a/gdb/testsuite/gdb.python/py-explore-cc.exp
+++ b/gdb/testsuite/gdb.python/py-explore-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile py-explore.cc
 
diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp
index dd36740bac5..0536532511f 100644
--- a/gdb/testsuite/gdb.python/py-explore.exp
+++ b/gdb/testsuite/gdb.python/py-explore.exp
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
index d414268b1cb..202173d2778 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index d37508c7d5c..9e5a0a6f754 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_shlib_tests !skip_python_tests
+require !skip_shlib_tests allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
index 300020553a1..66587b8b9a0 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-format-address.exp b/gdb/testsuite/gdb.python/py-format-address.exp
index d9fed3f6ef2..48de1c82d5d 100644
--- a/gdb/testsuite/gdb.python/py-format-address.exp
+++ b/gdb/testsuite/gdb.python/py-format-address.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile
 
 foreach func_name { foo bar } {
diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp
index 30a57b2254f..122130d4016 100644
--- a/gdb/testsuite/gdb.python/py-format-string.exp
+++ b/gdb/testsuite/gdb.python/py-format-string.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsuite/gdb.python/py-frame-args.exp
index 091e26dd5b1..5c099e01264 100644
--- a/gdb/testsuite/gdb.python/py-frame-args.exp
+++ b/gdb/testsuite/gdb.python/py-frame-args.exp
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-frame-inline.exp b/gdb/testsuite/gdb.python/py-frame-inline.exp
index 719ec18aa37..5fb336193dd 100644
--- a/gdb/testsuite/gdb.python/py-frame-inline.exp
+++ b/gdb/testsuite/gdb.python/py-frame-inline.exp
@@ -15,7 +15,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index f17e2f9844a..5aebb6beb5f 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-framefilter-addr.exp b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
index 5dad3bd0f2d..3bb759b97bf 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-addr.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
@@ -19,7 +19,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
index 86a830d5eef..d2c29afa81d 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
@@ -15,7 +15,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile amd64-py-framefilter-invalidarg.S
 
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index 81101c11809..6897518a20e 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp
index 7c48f7a0bd8..25b83a797aa 100644
--- a/gdb/testsuite/gdb.python/py-function.exp
+++ b/gdb/testsuite/gdb.python/py-function.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Start with a fresh gdb.
 
diff --git a/gdb/testsuite/gdb.python/py-inferior-leak.exp b/gdb/testsuite/gdb.python/py-inferior-leak.exp
index 4e2fa641545..b0456de360f 100644
--- a/gdb/testsuite/gdb.python/py-inferior-leak.exp
+++ b/gdb/testsuite/gdb.python/py-inferior-leak.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp
index 0286d82394c..424050a6166 100644
--- a/gdb/testsuite/gdb.python/py-inferior.exp
+++ b/gdb/testsuite/gdb.python/py-inferior.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp
index 47c6b19dbfc..0b10ce9ff77 100644
--- a/gdb/testsuite/gdb.python/py-infthread.exp
+++ b/gdb/testsuite/gdb.python/py-infthread.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-label-symbol-value.exp b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
index f3e91b74a46..b781eece304 100644
--- a/gdb/testsuite/gdb.python/py-label-symbol-value.exp
+++ b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
@@ -17,7 +17,7 @@
 # symbol (i.e. a symbol for a goto label).
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-lazy-string.exp b/gdb/testsuite/gdb.python/py-lazy-string.exp
index 9f3bad5c660..522530cb128 100644
--- a/gdb/testsuite/gdb.python/py-lazy-string.exp
+++ b/gdb/testsuite/gdb.python/py-lazy-string.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-linetable.exp b/gdb/testsuite/gdb.python/py-linetable.exp
index ff438216cf3..d19516df9a8 100644
--- a/gdb/testsuite/gdb.python/py-linetable.exp
+++ b/gdb/testsuite/gdb.python/py-linetable.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 set opts {}
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.python/py-lookup-type.exp b/gdb/testsuite/gdb.python/py-lookup-type.exp
index 7527c13a925..c914ea1068b 100644
--- a/gdb/testsuite/gdb.python/py-lookup-type.exp
+++ b/gdb/testsuite/gdb.python/py-lookup-type.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Note that the purpose of this testcase is to test the behavior
 # of gdb.lookup_type searching for the primitive types internally
diff --git a/gdb/testsuite/gdb.python/py-mi-events.exp b/gdb/testsuite/gdb.python/py-mi-events.exp
index 4ed3405730a..cc417d48bfe 100644
--- a/gdb/testsuite/gdb.python/py-mi-events.exp
+++ b/gdb/testsuite/gdb.python/py-mi-events.exp
@@ -18,7 +18,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
-require !skip_python_tests
+require allow_python_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.python/py-mi-objfile.exp b/gdb/testsuite/gdb.python/py-mi-objfile.exp
index 1b258623fb8..bc02da252bc 100644
--- a/gdb/testsuite/gdb.python/py-mi-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-mi-objfile.exp
@@ -18,7 +18,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
-require !skip_python_tests
+require allow_python_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
index b618b08e393..df5fc08dcfe 100644
--- a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
+++ b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
@@ -18,7 +18,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-require !skip_python_tests
+require allow_python_tests
 
 #
 # Start here
diff --git a/gdb/testsuite/gdb.python/py-nested-maps.exp b/gdb/testsuite/gdb.python/py-nested-maps.exp
index 76e38c2555c..3dfdcf61a72 100644
--- a/gdb/testsuite/gdb.python/py-nested-maps.exp
+++ b/gdb/testsuite/gdb.python/py-nested-maps.exp
@@ -19,7 +19,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-objfile-script.exp b/gdb/testsuite/gdb.python/py-objfile-script.exp
index 550a68447b8..80ccb51800c 100644
--- a/gdb/testsuite/gdb.python/py-objfile-script.exp
+++ b/gdb/testsuite/gdb.python/py-objfile-script.exp
@@ -18,7 +18,7 @@
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp
index cf9d5aedc19..61b9942de79 100644
--- a/gdb/testsuite/gdb.python/py-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-objfile.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-parameter.exp b/gdb/testsuite/gdb.python/py-parameter.exp
index ab99817b5f3..e6a26ddc1ba 100644
--- a/gdb/testsuite/gdb.python/py-parameter.exp
+++ b/gdb/testsuite/gdb.python/py-parameter.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Start with a fresh gdb.
 clean_restart
diff --git a/gdb/testsuite/gdb.python/py-pending-frame-level.exp b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
index b83eaa31095..54db88dd7de 100644
--- a/gdb/testsuite/gdb.python/py-pending-frame-level.exp
+++ b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-pp-integral.exp b/gdb/testsuite/gdb.python/py-pp-integral.exp
index 3fa247661ae..55b6a908c8b 100644
--- a/gdb/testsuite/gdb.python/py-pp-integral.exp
+++ b/gdb/testsuite/gdb.python/py-pp-integral.exp
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp
index 5e6f23aeb9d..5e5b8030d20 100644
--- a/gdb/testsuite/gdb.python/py-pp-maint.exp
+++ b/gdb/testsuite/gdb.python/py-pp-maint.exp
@@ -23,7 +23,7 @@ if [is_remote host] {
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-pp-re-notag.exp b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
index 3fa247661ae..55b6a908c8b 100644
--- a/gdb/testsuite/gdb.python/py-pp-re-notag.exp
+++ b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-pp-registration.exp b/gdb/testsuite/gdb.python/py-pp-registration.exp
index c85fc4a1a79..6b4f7600f3e 100644
--- a/gdb/testsuite/gdb.python/py-pp-registration.exp
+++ b/gdb/testsuite/gdb.python/py-pp-registration.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index 8166e118693..674a4edd0d2 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-progspace.exp b/gdb/testsuite/gdb.python/py-progspace.exp
index 23b328aa680..c7be9489601 100644
--- a/gdb/testsuite/gdb.python/py-progspace.exp
+++ b/gdb/testsuite/gdb.python/py-progspace.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index 56a0b47c78d..b5628933e0f 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -21,7 +21,7 @@ standard_testfile
 load_lib gdb-python.exp
 load_lib prompt.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-rbreak.exp b/gdb/testsuite/gdb.python/py-rbreak.exp
index 6c5f77ef3b1..43e13cdcb1f 100644
--- a/gdb/testsuite/gdb.python/py-rbreak.exp
+++ b/gdb/testsuite/gdb.python/py-rbreak.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-rbreak.c py-rbreak-func2.c
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
index ca9552754f3..19382d7bec0 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 
-require allow_btrace_tests !skip_python_tests
+require allow_btrace_tests allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 1b9824e284b..555b70ae336 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -17,7 +17,7 @@
 
 # Skip this test if btrace is disabled.
 
-require allow_btrace_tests !skip_python_tests
+require allow_btrace_tests allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp
index eb40d51f218..3c03bb4a923 100644
--- a/gdb/testsuite/gdb.python/py-record-full.exp
+++ b/gdb/testsuite/gdb.python/py-record-full.exp
@@ -17,7 +17,7 @@
 
 # Skip this test if target does not support recording.
 
-require supports_process_record !skip_python_tests
+require supports_process_record allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.exp b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
index 498443e9e54..1f12e5521d1 100644
--- a/gdb/testsuite/gdb.python/py-recurse-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
@@ -24,7 +24,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
index aeb3f9c93cd..d91912fe924 100644
--- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
@@ -17,7 +17,7 @@
 # exposing rvalue reference values to Python.  It is based on
 # gdb.python/py-value-cc.exp.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index 96dafdbfd67..24d207416af 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -28,7 +28,7 @@ if {![istarget *-*-linux*]
     return
 }
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp
index 75e7bb6aa9c..e48d08a7a92 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.exp
+++ b/gdb/testsuite/gdb.python/py-send-packet.exp
@@ -24,7 +24,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require allow_gdbserver_tests !skip_python_tests
+require allow_gdbserver_tests allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp
index fdec1df2cc8..bd5f9a1da2d 100644
--- a/gdb/testsuite/gdb.python/py-shared.exp
+++ b/gdb/testsuite/gdb.python/py-shared.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests !skip_python_tests
+require !skip_shlib_tests allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-source-styling.exp b/gdb/testsuite/gdb.python/py-source-styling.exp
index 8a22b7f4e8c..f92d6f7a706 100644
--- a/gdb/testsuite/gdb.python/py-source-styling.exp
+++ b/gdb/testsuite/gdb.python/py-source-styling.exp
@@ -31,7 +31,7 @@ save_vars { env(TERM) } {
 	return -1
     }
 
-    if { [skip_python_tests] } { continue }
+    if { ![allow_python_tests] } { continue }
 
     if { ![gdb_py_module_available "pygments"] } {
 	unsupported "pygments module not available"
diff --git a/gdb/testsuite/gdb.python/py-startup-opt.exp b/gdb/testsuite/gdb.python/py-startup-opt.exp
index 2d9fd2a0444..08d1c79eee3 100644
--- a/gdb/testsuite/gdb.python/py-startup-opt.exp
+++ b/gdb/testsuite/gdb.python/py-startup-opt.exp
@@ -16,7 +16,7 @@
 # Test the flags within GDB that can be used to control how Python is
 # initialized.
 
-require !skip_python_tests
+require allow_python_tests
 
 # Return a list containing two directory paths for newly created home
 # directories.
diff --git a/gdb/testsuite/gdb.python/py-strfns.exp b/gdb/testsuite/gdb.python/py-strfns.exp
index 162e1026eb5..2f30e54b587 100644
--- a/gdb/testsuite/gdb.python/py-strfns.exp
+++ b/gdb/testsuite/gdb.python/py-strfns.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
index a0bf34d8aa1..9ec2f44e9c0 100644
--- a/gdb/testsuite/gdb.python/py-symbol.exp
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-symbol.c py-symbol-2.c
 
diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index 5b68524140e..b706cca092e 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-symbol.c
 
diff --git a/gdb/testsuite/gdb.python/py-sync-interp.exp b/gdb/testsuite/gdb.python/py-sync-interp.exp
index 1e994bf7393..665b9561ecd 100644
--- a/gdb/testsuite/gdb.python/py-sync-interp.exp
+++ b/gdb/testsuite/gdb.python/py-sync-interp.exp
@@ -20,7 +20,7 @@
 
 standard_testfile
 
-require can_spawn_for_attach !skip_python_tests
+require can_spawn_for_attach allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp
index b337bfb8f01..a89a813578d 100644
--- a/gdb/testsuite/gdb.python/py-template.exp
+++ b/gdb/testsuite/gdb.python/py-template.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile .cc
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
diff --git a/gdb/testsuite/gdb.python/py-thrhandle.exp b/gdb/testsuite/gdb.python/py-thrhandle.exp
index 0806f8995c1..e8004c77ad1 100644
--- a/gdb/testsuite/gdb.python/py-thrhandle.exp
+++ b/gdb/testsuite/gdb.python/py-thrhandle.exp
@@ -21,7 +21,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp
index 31d50d24418..e7837d7405f 100644
--- a/gdb/testsuite/gdb.python/py-type.exp
+++ b/gdb/testsuite/gdb.python/py-type.exp
@@ -351,7 +351,7 @@ if { [build_inferior "${binfile}" "c"] == 0 } {
   restart_gdb "${binfile}"
 
   # Skip all tests if Python scripting is not enabled.
-  if { [skip_python_tests] } { continue }
+  if { ![allow_python_tests] } { continue }
 
   gdb_test "python print (gdb.lookup_type ('char').objfile)" "None"
 
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index 219e8527ecb..40f7e53847f 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -13,7 +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/>.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 load_lib gdb-python.exp
 load_lib cp-support.exp
diff --git a/gdb/testsuite/gdb.python/py-unwind-inline.exp b/gdb/testsuite/gdb.python/py-unwind-inline.exp
index c0dc7f2f49b..e75b060cde9 100644
--- a/gdb/testsuite/gdb.python/py-unwind-inline.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-inline.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-unwind-maint.exp b/gdb/testsuite/gdb.python/py-unwind-maint.exp
index 3fcbe4f6054..e226121c97a 100644
--- a/gdb/testsuite/gdb.python/py-unwind-maint.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-maint.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
index 1598f865699..96692d69808 100644
--- a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
@@ -38,7 +38,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
index 2d279bf71b1..0d817378d97 100644
--- a/gdb/testsuite/gdb.python/py-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp
index 69439e226bf..1ea10ad0058 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-value-cc.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
index 26ad72a5401..898208b90d1 100644
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index c164fec82aa..97d560476fc 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile py-xmethods.cc
 
diff --git a/gdb/testsuite/gdb.python/tui-window-disabled.exp b/gdb/testsuite/gdb.python/tui-window-disabled.exp
index 60486548825..36ecb0b5ef1 100644
--- a/gdb/testsuite/gdb.python/tui-window-disabled.exp
+++ b/gdb/testsuite/gdb.python/tui-window-disabled.exp
@@ -48,7 +48,7 @@ proc clean_restart_and_setup { prefix } {
 	Term::clean_restart 24 80 $testfile
 
 	# Skip all tests if Python scripting is not enabled.
-	if { [skip_python_tests] } { return 0 }
+	if { ![allow_python_tests] } { return 0 }
 
 	# Now source the python script.
 	gdb_test_no_output "source ${remote_python_file}" \
diff --git a/gdb/testsuite/gdb.python/tui-window-names.exp b/gdb/testsuite/gdb.python/tui-window-names.exp
index 48f3c6b07cd..125a5f5a9b5 100644
--- a/gdb/testsuite/gdb.python/tui-window-names.exp
+++ b/gdb/testsuite/gdb.python/tui-window-names.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 tuiterm_env
 
diff --git a/gdb/testsuite/gdb.python/tui-window.exp b/gdb/testsuite/gdb.python/tui-window.exp
index 2f0415557bd..529ed16b641 100644
--- a/gdb/testsuite/gdb.python/tui-window.exp
+++ b/gdb/testsuite/gdb.python/tui-window.exp
@@ -16,7 +16,7 @@
 # Test a TUI window implemented in Python.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 tuiterm_env
 
 # This test doesn't care about the inferior.
diff --git a/gdb/testsuite/gdb.rust/pp.exp b/gdb/testsuite/gdb.rust/pp.exp
index d23463e89dd..28ae0545c5a 100644
--- a/gdb/testsuite/gdb.rust/pp.exp
+++ b/gdb/testsuite/gdb.rust/pp.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 load_lib rust-support.exp
-require !skip_rust_tests !skip_python_tests
+require !skip_rust_tests allow_python_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 7314aab395c..5925a4cd12d 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -386,7 +386,7 @@ gdb_test "print empty_enum_value.0" ""
 gdb_test "print empty_enum_value.something" ""
 
 load_lib gdb-python.exp
-if {[skip_python_tests]} {
+if {![allow_python_tests]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index bc62cbfc431..7b8f29b2890 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -23,7 +23,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile multi-ui-errors.c
 
-require allow_gdbserver_tests !skip_python_tests
+require allow_gdbserver_tests allow_python_tests
 
 if {[build_executable "failed to prepare" ${testfile} \
 	 ${srcfile}] == -1} {
diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp
index 693771e942e..48b79fe723c 100644
--- a/gdb/testsuite/gdb.server/server-pipe.exp
+++ b/gdb/testsuite/gdb.server/server-pipe.exp
@@ -66,7 +66,7 @@ proc do_test { target } {
 
     gdb_test "info connections" "${target} \| ${::gdbserver} - ${::binfile} \[^\r\n\]+"
 
-    if { ![skip_python_tests] } {
+    if { [allow_python_tests] } {
 	gdb_test_no_output "python conn = gdb.selected_inferior().connection"
 	gdb_test "python print(conn.details)" "\| ${::gdbserver} - ${::binfile}"
     }
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index 78ce9879b42..99e9951f1f6 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -72,7 +72,7 @@ proc check_thread_local {number} {
 	    "= $expected_value" \
 	    "${number} thread local storage"
 
-    if {![skip_python_tests]} {
+    if {[allow_python_tests]} {
 	gdb_test_no_output \
 	    "python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
 	    "${number} look up a_thread_local symbol"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3a1936ffc82..b6eff66f94d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2447,11 +2447,11 @@ proc skip_rust_tests {} {
     return 0
 }
 
-# Return a 1 for configurations that do not support Python scripting.
+# Return a 1 for configurations that support Python scripting.
 
-gdb_caching_proc skip_python_tests {
+gdb_caching_proc allow_python_tests {
     set output [remote_exec host $::GDB --configuration]
-    return [expr {[string first "--with-python" $output] == -1}]
+    return [expr {[string first "--with-python" $output] != -1}]
 }
 
 # Return a 1 if we should skip shared library tests.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 73/79] Rename to allow_rust_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (71 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 72/79] Rename to allow_python_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 74/79] Rename to allow_shlib_tests Tom Tromey
                   ` (7 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_rust_tests to invert the sense, and renames it to
allow_rust_tests.
---
 gdb/testsuite/gdb.rust/dwindex.exp    |  2 +-
 gdb/testsuite/gdb.rust/expr.exp       |  2 +-
 gdb/testsuite/gdb.rust/fnfield.exp    |  2 +-
 gdb/testsuite/gdb.rust/generics.exp   |  2 +-
 gdb/testsuite/gdb.rust/methods.exp    |  2 +-
 gdb/testsuite/gdb.rust/modules.exp    |  2 +-
 gdb/testsuite/gdb.rust/pp.exp         |  2 +-
 gdb/testsuite/gdb.rust/rawids.exp     |  2 +-
 gdb/testsuite/gdb.rust/rust-style.exp |  2 +-
 gdb/testsuite/gdb.rust/simple.exp     |  2 +-
 gdb/testsuite/gdb.rust/traits.exp     |  2 +-
 gdb/testsuite/gdb.rust/unicode.exp    |  2 +-
 gdb/testsuite/gdb.rust/union.exp      |  2 +-
 gdb/testsuite/gdb.rust/unsized.exp    |  2 +-
 gdb/testsuite/gdb.rust/watch.exp      |  2 +-
 gdb/testsuite/lib/gdb.exp             | 10 +++++-----
 16 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/gdb/testsuite/gdb.rust/dwindex.exp b/gdb/testsuite/gdb.rust/dwindex.exp
index a617457571f..841db216680 100644
--- a/gdb/testsuite/gdb.rust/dwindex.exp
+++ b/gdb/testsuite/gdb.rust/dwindex.exp
@@ -16,7 +16,7 @@
 # Test that a rustc-produced .debug_aranges can be read.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 
diff --git a/gdb/testsuite/gdb.rust/expr.exp b/gdb/testsuite/gdb.rust/expr.exp
index 8fd6b23023f..4a0a48ade62 100644
--- a/gdb/testsuite/gdb.rust/expr.exp
+++ b/gdb/testsuite/gdb.rust/expr.exp
@@ -17,7 +17,7 @@
 # Rust compiler.  This serves as a smoke test.
 
 load_lib "rust-support.exp"
-require !skip_rust_tests
+require allow_rust_tests
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.rust/fnfield.exp b/gdb/testsuite/gdb.rust/fnfield.exp
index 2f6ddd74828..413104cca64 100644
--- a/gdb/testsuite/gdb.rust/fnfield.exp
+++ b/gdb/testsuite/gdb.rust/fnfield.exp
@@ -16,7 +16,7 @@
 # Test trait object printing.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/generics.exp b/gdb/testsuite/gdb.rust/generics.exp
index 5c0c105abe5..41112afd572 100644
--- a/gdb/testsuite/gdb.rust/generics.exp
+++ b/gdb/testsuite/gdb.rust/generics.exp
@@ -16,7 +16,7 @@
 # Test expressions involving generics.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/methods.exp b/gdb/testsuite/gdb.rust/methods.exp
index dfbebd6bc38..8374ab162ec 100644
--- a/gdb/testsuite/gdb.rust/methods.exp
+++ b/gdb/testsuite/gdb.rust/methods.exp
@@ -16,7 +16,7 @@
 # Test method calls.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/modules.exp b/gdb/testsuite/gdb.rust/modules.exp
index 9ab758b5d30..0ad1a4a6b75 100644
--- a/gdb/testsuite/gdb.rust/modules.exp
+++ b/gdb/testsuite/gdb.rust/modules.exp
@@ -16,7 +16,7 @@
 # Test name lookup.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/pp.exp b/gdb/testsuite/gdb.rust/pp.exp
index 28ae0545c5a..553bce3c1a9 100644
--- a/gdb/testsuite/gdb.rust/pp.exp
+++ b/gdb/testsuite/gdb.rust/pp.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 load_lib rust-support.exp
-require !skip_rust_tests allow_python_tests
+require allow_rust_tests allow_python_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/rawids.exp b/gdb/testsuite/gdb.rust/rawids.exp
index 234b4329f91..976b723833e 100644
--- a/gdb/testsuite/gdb.rust/rawids.exp
+++ b/gdb/testsuite/gdb.rust/rawids.exp
@@ -16,7 +16,7 @@
 # Test raw identifiers.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 set v [split [rust_compiler_version] .]
 if {[lindex $v 0] == 1 && [lindex $v 1] < 30} {
diff --git a/gdb/testsuite/gdb.rust/rust-style.exp b/gdb/testsuite/gdb.rust/rust-style.exp
index ed76fbf9760..c942673bddb 100644
--- a/gdb/testsuite/gdb.rust/rust-style.exp
+++ b/gdb/testsuite/gdb.rust/rust-style.exp
@@ -16,7 +16,7 @@
 # Test CLI output styling for Rust.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 save_vars { env(TERM) } {
     # We need an ANSI-capable terminal to get the output.
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 5925a4cd12d..25152a35cd0 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -16,7 +16,7 @@
 # Test expression parsing and evaluation that requires Rust compiler.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/traits.exp b/gdb/testsuite/gdb.rust/traits.exp
index 63a6df451f8..9aa4cbfc75c 100644
--- a/gdb/testsuite/gdb.rust/traits.exp
+++ b/gdb/testsuite/gdb.rust/traits.exp
@@ -16,7 +16,7 @@
 # Test trait object printing.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/unicode.exp b/gdb/testsuite/gdb.rust/unicode.exp
index aa1ace0608a..2b4766b5553 100644
--- a/gdb/testsuite/gdb.rust/unicode.exp
+++ b/gdb/testsuite/gdb.rust/unicode.exp
@@ -16,7 +16,7 @@
 # Test raw identifiers.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 # Non-ASCII identifiers were allowed starting in 1.53.
 set v [split [rust_compiler_version] .]
diff --git a/gdb/testsuite/gdb.rust/union.exp b/gdb/testsuite/gdb.rust/union.exp
index 28b787b38da..5f128c563a3 100644
--- a/gdb/testsuite/gdb.rust/union.exp
+++ b/gdb/testsuite/gdb.rust/union.exp
@@ -16,7 +16,7 @@
 # Test of "union" for Rust.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/unsized.exp b/gdb/testsuite/gdb.rust/unsized.exp
index ac46b2eefac..f81be8a3078 100644
--- a/gdb/testsuite/gdb.rust/unsized.exp
+++ b/gdb/testsuite/gdb.rust/unsized.exp
@@ -16,7 +16,7 @@
 # Test expression parsing and evaluation that requires Rust compiler.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/watch.exp b/gdb/testsuite/gdb.rust/watch.exp
index 2c0e57db427..83cb41cc1eb 100644
--- a/gdb/testsuite/gdb.rust/watch.exp
+++ b/gdb/testsuite/gdb.rust/watch.exp
@@ -16,7 +16,7 @@
 # Test watch -location with Rust.
 
 load_lib rust-support.exp
-require !skip_rust_tests
+require allow_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b6eff66f94d..9ce7c6b3aaf 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2427,10 +2427,10 @@ proc allow_d_tests {} {
     return 1
 }
 
-# Return 1 to skip Rust tests, 0 to try them.
-proc skip_rust_tests {} {
+# Return 1 to try Rust tests, 0 to skip them.
+proc allow_rust_tests {} {
     if { ![isnative] } {
-	return 1
+	return 0
     }
 
     # The rust compiler does not support "-m32", skip.
@@ -2439,12 +2439,12 @@ proc skip_rust_tests {} {
     if {[board_info $board exists multilib_flags]} {
 	foreach flag [board_info $board multilib_flags] {
 	    if { $flag == "-m32" } {
-		return 1
+		return 0
 	    }
 	}
     }
 
-    return 0
+    return 1
 }
 
 # Return a 1 for configurations that support Python scripting.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 74/79] Rename to allow_shlib_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (72 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 73/79] Rename to allow_rust_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 75/79] Rename to allow_tsx_tests Tom Tromey
                   ` (6 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_shlib_tests to invert the sense, and renames it to
allow_shlib_tests.
---
 gdb/testsuite/gdb.ada/catch_ex_std.exp               |  2 +-
 gdb/testsuite/gdb.base/attach-pie-misread.exp        |  2 +-
 gdb/testsuite/gdb.base/bfd-errors.exp                |  2 +-
 gdb/testsuite/gdb.base/break-interp.exp              |  2 +-
 gdb/testsuite/gdb.base/break-probes.exp              |  2 +-
 gdb/testsuite/gdb.base/catch-load.exp                |  2 +-
 gdb/testsuite/gdb.base/corefile-buildid.exp          |  2 +-
 gdb/testsuite/gdb.base/ctxobj.exp                    |  2 +-
 gdb/testsuite/gdb.base/dprintf-pending.exp           |  2 +-
 gdb/testsuite/gdb.base/dso2dso.exp                   |  2 +-
 gdb/testsuite/gdb.base/fixsection.exp                |  2 +-
 .../gdb.base/fork-no-detach-follow-child-dlopen.exp  |  2 +-
 gdb/testsuite/gdb.base/gcore-relro.exp               |  2 +-
 gdb/testsuite/gdb.base/gdb1555.exp                   |  2 +-
 gdb/testsuite/gdb.base/global-var-nested-by-dso.exp  |  2 +-
 gdb/testsuite/gdb.base/gnu-ifunc.exp                 |  2 +-
 gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp |  2 +-
 gdb/testsuite/gdb.base/info-fun.exp                  |  2 +-
 gdb/testsuite/gdb.base/info-shared.exp               |  2 +-
 gdb/testsuite/gdb.base/info_sources_2.exp            |  2 +-
 gdb/testsuite/gdb.base/jit-bfd-name.exp              |  2 +-
 gdb/testsuite/gdb.base/jit-elf-fork.exp              |  2 +-
 gdb/testsuite/gdb.base/jit-elf-so.exp                |  2 +-
 gdb/testsuite/gdb.base/jit-elf.exp                   |  2 +-
 gdb/testsuite/gdb.base/jit-reader-simple.exp         |  2 +-
 gdb/testsuite/gdb.base/jit-reader.exp                |  2 +-
 gdb/testsuite/gdb.base/msym-bp-shl.exp               |  2 +-
 gdb/testsuite/gdb.base/pending.exp                   |  2 +-
 gdb/testsuite/gdb.base/prelink.exp                   |  2 +-
 gdb/testsuite/gdb.base/print-file-var.exp            |  2 +-
 gdb/testsuite/gdb.base/print-symbol-loading.exp      |  2 +-
 gdb/testsuite/gdb.base/rtld-step.exp                 |  2 +-
 gdb/testsuite/gdb.base/shlib-call.exp                |  2 +-
 gdb/testsuite/gdb.base/shreloc.exp                   |  2 +-
 gdb/testsuite/gdb.base/signed-builtin-types.exp      |  2 +-
 gdb/testsuite/gdb.base/skip-solib.exp                |  2 +-
 gdb/testsuite/gdb.base/so-impl-ld.exp                |  2 +-
 gdb/testsuite/gdb.base/solib-corrupted.exp           |  2 +-
 gdb/testsuite/gdb.base/solib-disc.exp                |  2 +-
 gdb/testsuite/gdb.base/solib-display.exp             |  2 +-
 gdb/testsuite/gdb.base/solib-nodir.exp               |  2 +-
 gdb/testsuite/gdb.base/solib-overlap.exp             |  2 +-
 gdb/testsuite/gdb.base/solib-search.exp              |  2 +-
 gdb/testsuite/gdb.base/solib-symbol.exp              |  2 +-
 gdb/testsuite/gdb.base/solib-vanish.exp              |  2 +-
 gdb/testsuite/gdb.base/solib-weak.exp                |  2 +-
 gdb/testsuite/gdb.base/sym-file.exp                  |  2 +-
 gdb/testsuite/gdb.base/symtab-search-order.exp       |  2 +-
 gdb/testsuite/gdb.base/type-opaque.exp               |  2 +-
 gdb/testsuite/gdb.base/unload.exp                    |  2 +-
 gdb/testsuite/gdb.base/watchpoint-solib.exp          |  2 +-
 gdb/testsuite/gdb.btrace/dlopen.exp                  |  2 +-
 gdb/testsuite/gdb.compile/compile.exp                |  2 +-
 gdb/testsuite/gdb.cp/except-multi-location.exp       |  2 +-
 gdb/testsuite/gdb.cp/gdb2384.exp                     |  2 +-
 gdb/testsuite/gdb.cp/infcall-dlopen.exp              |  2 +-
 gdb/testsuite/gdb.cp/re-set-overloaded.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp          |  2 +-
 .../gdb.dwarf2/locexpr-data-member-location.exp      |  2 +-
 gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp       |  2 +-
 gdb/testsuite/gdb.mi/mi-catch-load.exp               |  2 +-
 gdb/testsuite/gdb.mi/mi-dprintf-pending.exp          |  2 +-
 gdb/testsuite/gdb.mi/mi-pending.exp                  |  2 +-
 gdb/testsuite/gdb.mi/mi-solib.exp                    |  2 +-
 gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp     |  2 +-
 gdb/testsuite/gdb.opt/solib-intra-step.exp           |  2 +-
 gdb/testsuite/gdb.python/py-event-load.exp           |  2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp    |  2 +-
 gdb/testsuite/gdb.python/py-shared.exp               |  2 +-
 gdb/testsuite/gdb.reverse/solib-precsave.exp         |  2 +-
 gdb/testsuite/gdb.reverse/solib-reverse.exp          |  2 +-
 gdb/testsuite/gdb.server/server-exec-info.exp        |  4 ++--
 gdb/testsuite/gdb.server/solib-list.exp              |  2 +-
 gdb/testsuite/gdb.threads/dlopen-libpthread.exp      |  2 +-
 gdb/testsuite/gdb.trace/change-loc.exp               |  2 +-
 gdb/testsuite/gdb.trace/ftrace-lock.exp              |  2 +-
 gdb/testsuite/gdb.trace/ftrace.exp                   |  2 +-
 gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp    |  2 +-
 gdb/testsuite/gdb.trace/pending.exp                  |  2 +-
 gdb/testsuite/gdb.trace/range-stepping.exp           |  2 +-
 gdb/testsuite/gdb.trace/strace.exp                   |  2 +-
 gdb/testsuite/gdb.trace/trace-break.exp              |  2 +-
 gdb/testsuite/gdb.trace/trace-condition.exp          |  2 +-
 gdb/testsuite/gdb.trace/trace-enable-disable.exp     |  2 +-
 gdb/testsuite/gdb.trace/trace-mt.exp                 |  2 +-
 gdb/testsuite/gdb.trace/tspeed.exp                   |  2 +-
 gdb/testsuite/lib/gdb.exp                            | 12 ++++++------
 87 files changed, 93 insertions(+), 93 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index 3621b798b7c..73cbdaf90ca 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 load_lib "ada.exp"
 
diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
index 9adf107ad92..96f02429abd 100644
--- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-require !use_gdb_stub isnative !skip_shlib_tests
+require !use_gdb_stub isnative allow_shlib_tests
 if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
diff --git a/gdb/testsuite/gdb.base/bfd-errors.exp b/gdb/testsuite/gdb.base/bfd-errors.exp
index f55fd296d4b..08de1141336 100644
--- a/gdb/testsuite/gdb.base/bfd-errors.exp
+++ b/gdb/testsuite/gdb.base/bfd-errors.exp
@@ -46,7 +46,7 @@
 
 # This test can't be run on targets lacking shared library support
 # or for non-ELF targets.
-require !skip_shlib_tests is_elf_target
+require allow_shlib_tests is_elf_target
 
 # Library file names and flags:
 set lib_basename ${::gdb_test_file_name}-lib
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 21452d8569e..9652b32b632 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-require !use_gdb_stub isnative !skip_shlib_tests
+require !use_gdb_stub isnative allow_shlib_tests
 if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp
index d0a3786e2c2..227e4f81c83 100644
--- a/gdb/testsuite/gdb.base/break-probes.exp
+++ b/gdb/testsuite/gdb.base/break-probes.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/catch-load.exp b/gdb/testsuite/gdb.base/catch-load.exp
index f53e162a35e..f91b2670eaf 100644
--- a/gdb/testsuite/gdb.base/catch-load.exp
+++ b/gdb/testsuite/gdb.base/catch-load.exp
@@ -13,7 +13,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
diff --git a/gdb/testsuite/gdb.base/corefile-buildid.exp b/gdb/testsuite/gdb.base/corefile-buildid.exp
index 88867870e1b..3c2702e0cd3 100644
--- a/gdb/testsuite/gdb.base/corefile-buildid.exp
+++ b/gdb/testsuite/gdb.base/corefile-buildid.exp
@@ -296,7 +296,7 @@ build_corefile_buildid_exec
 do_corefile_buildid_tests
 do_corefile_buildid_tests -sepdebug
 
-if {![skip_shlib_tests]} {
+if {[allow_shlib_tests]} {
     build_corefile_buildid_shared
     do_corefile_buildid_tests -shared
     do_corefile_buildid_tests -shared -sepdebug
diff --git a/gdb/testsuite/gdb.base/ctxobj.exp b/gdb/testsuite/gdb.base/ctxobj.exp
index 4d54ed90de4..dd445d63a33 100644
--- a/gdb/testsuite/gdb.base/ctxobj.exp
+++ b/gdb/testsuite/gdb.base/ctxobj.exp
@@ -13,7 +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/>.  */
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set executable ctxobj-m
 
diff --git a/gdb/testsuite/gdb.base/dprintf-pending.exp b/gdb/testsuite/gdb.base/dprintf-pending.exp
index bb30ce5528d..79abd69cd62 100644
--- a/gdb/testsuite/gdb.base/dprintf-pending.exp
+++ b/gdb/testsuite/gdb.base/dprintf-pending.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 set libfile "dprintf-pendshr"
diff --git a/gdb/testsuite/gdb.base/dso2dso.exp b/gdb/testsuite/gdb.base/dso2dso.exp
index 5615254588a..59eccb85320 100644
--- a/gdb/testsuite/gdb.base/dso2dso.exp
+++ b/gdb/testsuite/gdb.base/dso2dso.exp
@@ -23,7 +23,7 @@
 # also happens to exercise an issue with displaced stepping on amd64
 # when libdso1 is mapped at an address greater than 0xffffffff.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/fixsection.exp b/gdb/testsuite/gdb.base/fixsection.exp
index ec2d7931161..b998a151fce 100644
--- a/gdb/testsuite/gdb.base/fixsection.exp
+++ b/gdb/testsuite/gdb.base/fixsection.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
index 5e907c2a43d..6bc734ebf0f 100644
--- a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
+++ b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
@@ -23,7 +23,7 @@
 # in the source of the shlib, and "list" should display the source where
 # the program stopped.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c -shlib.c
 set shlib_path [standard_output_file ${testfile}-lib.so]
diff --git a/gdb/testsuite/gdb.base/gcore-relro.exp b/gdb/testsuite/gdb.base/gcore-relro.exp
index efae85a2eb0..97d5c566287 100644
--- a/gdb/testsuite/gdb.base/gcore-relro.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile gcore-relro-main.c
 set libfile gcore-relro-lib
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
index 6cf1c71d1b0..f3f07cd0975 100644
--- a/gdb/testsuite/gdb.base/gdb1555.exp
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -17,7 +17,7 @@
 # a shared library (PR gdb/1555, was PR shlib/1280, shlib/1237).
 # Tested on ppc-yellowdog-linux (Yellow Dog Linux 3.0 3.2.2-2a)
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile gdb1555-main.c gdb1555.c
 
diff --git a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
index 37e3c9e1112..da94f4fa8d1 100644
--- a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
+++ b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 81119f764b8..0a435806409 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests allow_ifunc_tests
+require allow_shlib_tests allow_ifunc_tests
 
 standard_testfile .c
 set staticexecutable ${testfile}-static
diff --git a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
index f5e608eb1c3..cf4083b7e43 100644
--- a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
+++ b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
@@ -17,7 +17,7 @@
 # when the target doesn't support hw breakpoints doesn't silently
 # error out without informing the user.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set main_src hbreak-in-shr-unsupported.c
 set lib_src hbreak-in-shr-unsupported-shr.c
diff --git a/gdb/testsuite/gdb.base/info-fun.exp b/gdb/testsuite/gdb.base/info-fun.exp
index 07520049244..683c732e671 100644
--- a/gdb/testsuite/gdb.base/info-fun.exp
+++ b/gdb/testsuite/gdb.base/info-fun.exp
@@ -12,7 +12,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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 if { [is_remote target] } {
     return 0
 }
diff --git a/gdb/testsuite/gdb.base/info-shared.exp b/gdb/testsuite/gdb.base/info-shared.exp
index 29f77ceb479..43c513d913c 100644
--- a/gdb/testsuite/gdb.base/info-shared.exp
+++ b/gdb/testsuite/gdb.base/info-shared.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/info_sources_2.exp b/gdb/testsuite/gdb.base/info_sources_2.exp
index 58dfbe4c2eb..bee86e31e5e 100644
--- a/gdb/testsuite/gdb.base/info_sources_2.exp
+++ b/gdb/testsuite/gdb.base/info_sources_2.exp
@@ -16,7 +16,7 @@
 # Test 'info sources' when the test file makes use of a shared
 # library.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set is_remote_target [is_remote target]
 
diff --git a/gdb/testsuite/gdb.base/jit-bfd-name.exp b/gdb/testsuite/gdb.base/jit-bfd-name.exp
index cd7056df252..80f06269524 100644
--- a/gdb/testsuite/gdb.base/jit-bfd-name.exp
+++ b/gdb/testsuite/gdb.base/jit-bfd-name.exp
@@ -20,7 +20,7 @@
 # Additionally, check that GDB cau use 'dump binary memory' to write
 # out the in-memory JIT files.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-elf-fork.exp b/gdb/testsuite/gdb.base/jit-elf-fork.exp
index 51f68cd75cd..acc90b3003e 100644
--- a/gdb/testsuite/gdb.base/jit-elf-fork.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-fork.exp
@@ -15,7 +15,7 @@
 
 # Test fork handling of an inferior that has JIT-ed objfiles.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-elf-so.exp b/gdb/testsuite/gdb.base/jit-elf-so.exp
index 148a0fc3b6f..97d1a6a04f9 100644
--- a/gdb/testsuite/gdb.base/jit-elf-so.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-so.exp
@@ -16,7 +16,7 @@
 # The same tests as in jit.exp, but loading JITer itself from a shared
 # library.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-elf.exp b/gdb/testsuite/gdb.base/jit-elf.exp
index 42c5339eb76..a7609dc26b3 100644
--- a/gdb/testsuite/gdb.base/jit-elf.exp
+++ b/gdb/testsuite/gdb.base/jit-elf.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 load_lib jit-elf-helpers.exp
 
diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp
index e46628d6ae2..dff19564875 100644
--- a/gdb/testsuite/gdb.base/jit-reader-simple.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp
@@ -24,7 +24,7 @@
 # For completeness, also test when the JIT descriptor does not change
 # address between runs.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 8023ef66e78..fd0c5f56d6e 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -22,7 +22,7 @@ if { (![istarget x86_64-*-*] && ![istarget i?86-*-*]) || ![is_lp64_target] } {
     return -1;
 }
 
-require !skip_shlib_tests isnative
+require allow_shlib_tests isnative
 
 # Increase this to see more detail.
 set test_verbose 0
diff --git a/gdb/testsuite/gdb.base/msym-bp-shl.exp b/gdb/testsuite/gdb.base/msym-bp-shl.exp
index 05587580962..3cc2a9f8444 100644
--- a/gdb/testsuite/gdb.base/msym-bp-shl.exp
+++ b/gdb/testsuite/gdb.base/msym-bp-shl.exp
@@ -18,7 +18,7 @@
 # static function named "foo" exists in the shared library.  Tests
 # both with and without debug info.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile msym-bp-shl-main.c msym-bp-shl-main-2.c msym-bp-shl-lib.c
 set srcfile ${srcdir}/${subdir}/${srcfile}
diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp
index c1fbe77d8ee..c3e6bb4d58a 100644
--- a/gdb/testsuite/gdb.base/pending.exp
+++ b/gdb/testsuite/gdb.base/pending.exp
@@ -19,7 +19,7 @@
 # test running programs
 #
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c
 set libfile "pendshr"
diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp
index 4d61686c530..6945a923194 100644
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -19,7 +19,7 @@
 # This file was written by Alexandre Oliva <aoliva@redhat.com>
 
 
-require isnative !skip_shlib_tests is_c_compiler_gcc
+require isnative allow_shlib_tests is_c_compiler_gcc
 if { [is_remote host] } {
     return
 }
diff --git a/gdb/testsuite/gdb.base/print-file-var.exp b/gdb/testsuite/gdb.base/print-file-var.exp
index 936ab2a17e3..3c730b3e1a3 100644
--- a/gdb/testsuite/gdb.base/print-file-var.exp
+++ b/gdb/testsuite/gdb.base/print-file-var.exp
@@ -13,7 +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/>.  */
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 proc test {hidden dlopen version_id_main lang} {
     global srcdir subdir
diff --git a/gdb/testsuite/gdb.base/print-symbol-loading.exp b/gdb/testsuite/gdb.base/print-symbol-loading.exp
index e91fea9e5d8..c8d1ee763bf 100644
--- a/gdb/testsuite/gdb.base/print-symbol-loading.exp
+++ b/gdb/testsuite/gdb.base/print-symbol-loading.exp
@@ -15,7 +15,7 @@
 
 # Test the "print symbol-loading" option.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile print-symbol-loading-main.c
 set libfile print-symbol-loading-lib
diff --git a/gdb/testsuite/gdb.base/rtld-step.exp b/gdb/testsuite/gdb.base/rtld-step.exp
index 99f1a822b8d..f2cf0b14996 100644
--- a/gdb/testsuite/gdb.base/rtld-step.exp
+++ b/gdb/testsuite/gdb.base/rtld-step.exp
@@ -35,7 +35,7 @@
 # or for non-ELF targets.  (We're not really testing or building
 # shared libraries here, but having a RTLD implies having shared
 # libraries on the target.)
-require !skip_shlib_tests is_elf_target
+require allow_shlib_tests is_elf_target
 
 # (Pretend) RTLD file names and flags:
 set rtld_basename ${::gdb_test_file_name}-rtld
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index 4dadb256b31..88c43534b01 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -29,7 +29,7 @@
 #prop lib shr2.sl
 
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 if { [is_remote host] } {
     gdb_remote_download host $srcdir/$subdir/ss.h
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
index d1d99ae42c9..315250c5529 100644
--- a/gdb/testsuite/gdb.base/shreloc.exp
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -19,7 +19,7 @@
 # them gets relocated at load-time. Check that gdb gets the right
 # values for the debugging and minimal symbols.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 #
 # This file uses shreloc.c, shreloc1.c and shreloc2.c
diff --git a/gdb/testsuite/gdb.base/signed-builtin-types.exp b/gdb/testsuite/gdb.base/signed-builtin-types.exp
index 94f73f97854..aaddf18aa71 100644
--- a/gdb/testsuite/gdb.base/signed-builtin-types.exp
+++ b/gdb/testsuite/gdb.base/signed-builtin-types.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c -lib.c
 
diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp
index f5850c7a0b1..e04bec9c504 100644
--- a/gdb/testsuite/gdb.base/skip-solib.exp
+++ b/gdb/testsuite/gdb.base/skip-solib.exp
@@ -20,7 +20,7 @@
 #
 
 # This only works on GNU/Linux.
-require isnative !skip_shlib_tests
+require isnative allow_shlib_tests
 if { [is_remote host] || ![istarget *-linux*] } {
     return
 }
diff --git a/gdb/testsuite/gdb.base/so-impl-ld.exp b/gdb/testsuite/gdb.base/so-impl-ld.exp
index f8516b741a3..e3052cbc6ae 100644
--- a/gdb/testsuite/gdb.base/so-impl-ld.exp
+++ b/gdb/testsuite/gdb.base/so-impl-ld.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c
 set libfile "solib1"
diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp
index 068a0188110..644c8ece11f 100644
--- a/gdb/testsuite/gdb.base/solib-corrupted.exp
+++ b/gdb/testsuite/gdb.base/solib-corrupted.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 if {[is_remote target]} {
     # gdbserver prints the warning message but expect is parsing only the GDB
diff --git a/gdb/testsuite/gdb.base/solib-disc.exp b/gdb/testsuite/gdb.base/solib-disc.exp
index 84f6d928e79..0e3acfce954 100644
--- a/gdb/testsuite/gdb.base/solib-disc.exp
+++ b/gdb/testsuite/gdb.base/solib-disc.exp
@@ -15,7 +15,7 @@
 
 # Test connecting and disconnecting at shared library events.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set gdbserver_reconnect_p 1
 if { [info proc gdb_reconnect] == "" } {
diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
index 96bddc147ca..aaaa134007b 100644
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -28,7 +28,7 @@
 # (and thus aren't affected by shared library unloading) are not
 # disabled prematurely.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # This test is currently not supported for stub targets, because it uses the
 # start command (through gdb_start_cmd).  In theory, it could be changed to
diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp
index a8b205a5d68..dd0724909ad 100644
--- a/gdb/testsuite/gdb.base/solib-nodir.exp
+++ b/gdb/testsuite/gdb.base/solib-nodir.exp
@@ -13,7 +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/>.  */
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # The testcase assumes the target can access the OBJDIR.
 if [is_remote target] {
diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp
index 2c0e6f87286..c9e4f09e49f 100644
--- a/gdb/testsuite/gdb.base/solib-overlap.exp
+++ b/gdb/testsuite/gdb.base/solib-overlap.exp
@@ -27,7 +27,7 @@
 #   difference appears to be caused by prelink, adjusting expectations
 # In such case both disk libraries will be loaded at VMAs starting at zero.
 
-require !skip_shlib_tests can_spawn_for_attach
+require allow_shlib_tests can_spawn_for_attach
 
 # Library file.
 set libname "solib-overlap-lib"
diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp
index c77fcc4f5ca..5e9e3d43ee0 100644
--- a/gdb/testsuite/gdb.base/solib-search.exp
+++ b/gdb/testsuite/gdb.base/solib-search.exp
@@ -16,7 +16,7 @@
 # Test solib-search-path, and in the case of solib-svr4.c whether l_addr_p
 # is properly reset when the path is changed.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 if {[is_remote target]} {
     untested "skipping remote target and shared library tests"
     return -1
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
index da6812884c3..dfc32c66e96 100644
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
@@ -15,7 +15,7 @@
 # Contributed by Markus Deuling <deuling@de.ibm.com>.
 #
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # Library file.
 set libname "solib-symbol-lib"
diff --git a/gdb/testsuite/gdb.base/solib-vanish.exp b/gdb/testsuite/gdb.base/solib-vanish.exp
index 5e6b9cb2517..a26767ce699 100644
--- a/gdb/testsuite/gdb.base/solib-vanish.exp
+++ b/gdb/testsuite/gdb.base/solib-vanish.exp
@@ -53,7 +53,7 @@
 # 1) GDB does not segfault when stepping
 # 2) The stack frame is printed
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # Library 2
 set lib2name "solib-vanish-lib2"
diff --git a/gdb/testsuite/gdb.base/solib-weak.exp b/gdb/testsuite/gdb.base/solib-weak.exp
index 655cf087838..9a140c1d9ac 100644
--- a/gdb/testsuite/gdb.base/solib-weak.exp
+++ b/gdb/testsuite/gdb.base/solib-weak.exp
@@ -17,7 +17,7 @@
 # than one shared library, when one of the implementations is a "weak"
 # symbol.  GDB should set a breakpoint at the first copy it finds.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # These targets have shared libraries, but weak symbols are not meaningful.
 if {([istarget *-*-mingw*]
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index c4c5f746943..cb5204ecff0 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -31,7 +31,7 @@
 
 require is_elf_target
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set target_size TARGET_UNKNOWN
 if {[is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.base/symtab-search-order.exp b/gdb/testsuite/gdb.base/symtab-search-order.exp
index 06b03c01dc0..fc8750147dd 100644
--- a/gdb/testsuite/gdb.base/symtab-search-order.exp
+++ b/gdb/testsuite/gdb.base/symtab-search-order.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c symtab-search-order-1.c symtab-search-order-shlib-1.c
 set srcfile  $srcdir/$subdir/$srcfile
diff --git a/gdb/testsuite/gdb.base/type-opaque.exp b/gdb/testsuite/gdb.base/type-opaque.exp
index e602f341322..4d6fcddea56 100644
--- a/gdb/testsuite/gdb.base/type-opaque.exp
+++ b/gdb/testsuite/gdb.base/type-opaque.exp
@@ -15,7 +15,7 @@
 
 # Test resolving of an opaque type from the loaded shared library.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile type-opaque-main.c
 
diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp
index 3f74e45b499..3e340e9fada 100644
--- a/gdb/testsuite/gdb.base/unload.exp
+++ b/gdb/testsuite/gdb.base/unload.exp
@@ -19,7 +19,7 @@
 # test running programs
 #
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set testfile "unload"
 set libfile "unloadshr"
diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.exp b/gdb/testsuite/gdb.base/watchpoint-solib.exp
index 0492cf66037..142680c58cb 100644
--- a/gdb/testsuite/gdb.base/watchpoint-solib.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-solib.exp
@@ -26,7 +26,7 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 #
 
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set testfile "watchpoint-solib"
 set libfile "watchpoint-solib-shr"
diff --git a/gdb/testsuite/gdb.btrace/dlopen.exp b/gdb/testsuite/gdb.btrace/dlopen.exp
index 8cd0b9db9aa..2f41970ecc6 100644
--- a/gdb/testsuite/gdb.btrace/dlopen.exp
+++ b/gdb/testsuite/gdb.btrace/dlopen.exp
@@ -15,7 +15,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/>.
 
-require allow_btrace_tests !skip_shlib_tests
+require allow_btrace_tests allow_shlib_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index d5f71d952a3..9fdd36719ae 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -366,7 +366,7 @@ if { $srcfile3 != "" } {
 
 # Shared library tests.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set libbin [standard_output_file ${testfile}-shlib.so]
 set binfile [standard_output_file ${testfile}-shlib]
diff --git a/gdb/testsuite/gdb.cp/except-multi-location.exp b/gdb/testsuite/gdb.cp/except-multi-location.exp
index 3730d468000..a7433177575 100644
--- a/gdb/testsuite/gdb.cp/except-multi-location.exp
+++ b/gdb/testsuite/gdb.cp/except-multi-location.exp
@@ -19,7 +19,7 @@
 # on the libstc++.so DSO (which is how GDB was built and revealed the
 # bug), and vice versa.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # STATIC_BIN indicates whether to build the main binary with
 # -static-libgcc/-static-libstdc++.  STATIC_LIB is the same, but for
diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp
index 3f53573180e..46d93d27e7b 100644
--- a/gdb/testsuite/gdb.cp/gdb2384.exp
+++ b/gdb/testsuite/gdb.cp/gdb2384.exp
@@ -21,7 +21,7 @@
 #
 # PR c++/9489.
 
-require allow_cplus_tests !skip_shlib_tests
+require allow_cplus_tests allow_shlib_tests
 
 standard_testfile .cc gdb2384-base.cc
 
diff --git a/gdb/testsuite/gdb.cp/infcall-dlopen.exp b/gdb/testsuite/gdb.cp/infcall-dlopen.exp
index bd66213daaf..0f65f1974af 100644
--- a/gdb/testsuite/gdb.cp/infcall-dlopen.exp
+++ b/gdb/testsuite/gdb.cp/infcall-dlopen.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .cc infcall-dlopen-lib.cc
 set libfile [standard_output_file ${testfile}.so]
diff --git a/gdb/testsuite/gdb.cp/re-set-overloaded.exp b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
index 2b52be119dd..73556a5f7ab 100644
--- a/gdb/testsuite/gdb.cp/re-set-overloaded.exp
+++ b/gdb/testsuite/gdb.cp/re-set-overloaded.exp
@@ -13,7 +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/>.
 
-require allow_cplus_tests !skip_shlib_tests
+require allow_cplus_tests allow_shlib_tests
 
 standard_testfile bool.cc .cc
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
index 06cf8daa5d6..4649f990fca 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
@@ -19,7 +19,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support !skip_shlib_tests
+require dwarf2_support allow_shlib_tests
 
 standard_testfile .c -shlib.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index 4b1334bb6c3..a5b301e26fb 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -49,7 +49,7 @@
 # which is then used by a shared object.
 
 # This test can't be run on targets lacking shared library support.
-require !skip_shlib_tests
+require allow_shlib_tests
 
 load_lib dwarf.exp
 
diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
index e2d9172495d..5cc2fe840fb 100644
--- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
@@ -13,7 +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/>.
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 load_lib mi-support.exp
 
diff --git a/gdb/testsuite/gdb.mi/mi-catch-load.exp b/gdb/testsuite/gdb.mi/mi-catch-load.exp
index f182e380770..842f4b47f1d 100644
--- a/gdb/testsuite/gdb.mi/mi-catch-load.exp
+++ b/gdb/testsuite/gdb.mi/mi-catch-load.exp
@@ -14,7 +14,7 @@
 #
 load_lib mi-support.exp
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile mi-catch-load.c
 
diff --git a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
index 54b9ca53bcd..66a30426a8b 100644
--- a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
@@ -19,7 +19,7 @@
 
 load_lib mi-support.exp
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile mi-dprintf-pending.c
 
diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp
index c19f3c33852..271908c9855 100644
--- a/gdb/testsuite/gdb.mi/mi-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-pending.exp
@@ -20,7 +20,7 @@ set MIFLAGS "-i=mi"
 # test running programs
 #
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile mi-pending.c
 
diff --git a/gdb/testsuite/gdb.mi/mi-solib.exp b/gdb/testsuite/gdb.mi/mi-solib.exp
index 0a5650d83bf..03637651d92 100644
--- a/gdb/testsuite/gdb.mi/mi-solib.exp
+++ b/gdb/testsuite/gdb.mi/mi-solib.exp
@@ -16,7 +16,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp b/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp
index 9e738fb1fb5..94eccdf63a0 100644
--- a/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp
@@ -20,7 +20,7 @@
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile .c -lib.c
 set shlib_path [standard_output_file ${testfile}-lib.so]
diff --git a/gdb/testsuite/gdb.opt/solib-intra-step.exp b/gdb/testsuite/gdb.opt/solib-intra-step.exp
index c0e9cba0051..79d337efe9a 100644
--- a/gdb/testsuite/gdb.opt/solib-intra-step.exp
+++ b/gdb/testsuite/gdb.opt/solib-intra-step.exp
@@ -15,7 +15,7 @@
 
 standard_testfile
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # Library file.
 set libname "${testfile}-lib"
diff --git a/gdb/testsuite/gdb.python/py-event-load.exp b/gdb/testsuite/gdb.python/py-event-load.exp
index 7dc47f1538a..ac2331cdd8b 100644
--- a/gdb/testsuite/gdb.python/py-event-load.exp
+++ b/gdb/testsuite/gdb.python/py-event-load.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests allow_python_tests
+require allow_shlib_tests allow_python_tests
 
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index 9e5a0a6f754..b6bd7a63c8f 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_shlib_tests allow_python_tests
+require allow_shlib_tests allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp
index bd5f9a1da2d..b7603162cf2 100644
--- a/gdb/testsuite/gdb.python/py-shared.exp
+++ b/gdb/testsuite/gdb.python/py-shared.exp
@@ -17,7 +17,7 @@
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests allow_python_tests
+require allow_shlib_tests allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp
index 92d0a0d30a0..88261b6f6b0 100644
--- a/gdb/testsuite/gdb.reverse/solib-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp
@@ -17,7 +17,7 @@
 # with shared libraries and a logfile.
 
 # This test suitable only for process record-replay
-require supports_process_record !skip_shlib_tests
+require supports_process_record allow_shlib_tests
 
 standard_testfile solib-reverse.c
 set precsave [standard_output_file solib.precsave]
diff --git a/gdb/testsuite/gdb.reverse/solib-reverse.exp b/gdb/testsuite/gdb.reverse/solib-reverse.exp
index b562ac9fa12..0afe21926c5 100644
--- a/gdb/testsuite/gdb.reverse/solib-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/solib-reverse.exp
@@ -16,7 +16,7 @@
 # This file is part of the GDB testsuite.  It tests reverse debugging
 # with shared libraries.
 
-require supports_reverse !skip_shlib_tests
+require supports_reverse allow_shlib_tests
 
 standard_testfile
 set lib1file "shr1"
diff --git a/gdb/testsuite/gdb.server/server-exec-info.exp b/gdb/testsuite/gdb.server/server-exec-info.exp
index b1a392883b0..6bee4bffff6 100644
--- a/gdb/testsuite/gdb.server/server-exec-info.exp
+++ b/gdb/testsuite/gdb.server/server-exec-info.exp
@@ -15,10 +15,10 @@
 
 load_lib gdbserver-support.exp
 
-# We test for skip_shlib_tests in this test because without a main
+# We test for allow_shlib_tests in this test because without a main
 # exec file we only have the exec target loaded if shared libraries
 # are present.
-require allow_gdbserver_tests !skip_shlib_tests
+require allow_gdbserver_tests allow_shlib_tests
 
 standard_testfile server.c
 if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp
index ef99be74747..2a239838477 100644
--- a/gdb/testsuite/gdb.server/solib-list.exp
+++ b/gdb/testsuite/gdb.server/solib-list.exp
@@ -23,7 +23,7 @@
 load_lib gdbserver-support.exp
 load_lib prelink-support.exp
 
-require allow_gdbserver_tests !skip_shlib_tests
+require allow_gdbserver_tests allow_shlib_tests
 
 standard_testfile solib-list-main.c
 set srclibfile ${testfile}-lib.c
diff --git a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
index 7ab61bfa890..fd68e27d260 100644
--- a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
@@ -13,7 +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/>.
 
-require isnative !skip_shlib_tests
+require isnative allow_shlib_tests
 if {![istarget *-linux*]} {
     return 0
 }
diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp
index 2bab45da37e..4c4f54d89be 100644
--- a/gdb/testsuite/gdb.trace/change-loc.exp
+++ b/gdb/testsuite/gdb.trace/change-loc.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 require gdb_trace_common_supports_arch
 
diff --git a/gdb/testsuite/gdb.trace/ftrace-lock.exp b/gdb/testsuite/gdb.trace/ftrace-lock.exp
index 92374c9fdc7..b795d6d4011 100644
--- a/gdb/testsuite/gdb.trace/ftrace-lock.exp
+++ b/gdb/testsuite/gdb.trace/ftrace-lock.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
index 7d7d684f8af..1e38bd7bc1b 100644
--- a/gdb/testsuite/gdb.trace/ftrace.exp
+++ b/gdb/testsuite/gdb.trace/ftrace.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
index f6b12b59eba..cdd28cb6f96 100644
--- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
+++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
@@ -15,7 +15,7 @@
 
 load_lib trace-support.exp
 
-require !skip_shlib_tests
+require allow_shlib_tests
 require gdb_trace_common_supports_arch
 
 standard_testfile pending.c
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index 8778c1f9bcf..76d28652820 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 require gdb_trace_common_supports_arch
 
diff --git a/gdb/testsuite/gdb.trace/range-stepping.exp b/gdb/testsuite/gdb.trace/range-stepping.exp
index cf0758e745f..e9e26de2dcb 100644
--- a/gdb/testsuite/gdb.trace/range-stepping.exp
+++ b/gdb/testsuite/gdb.trace/range-stepping.exp
@@ -65,7 +65,7 @@ proc range_stepping_with_tracepoint { type } {
 
 range_stepping_with_tracepoint "trace"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp
index f3904c21189..bbdd8b78619 100644
--- a/gdb/testsuite/gdb.trace/strace.exp
+++ b/gdb/testsuite/gdb.trace/strace.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp
index 6e5415cbe35..c1a6d3c5348 100644
--- a/gdb/testsuite/gdb.trace/trace-break.exp
+++ b/gdb/testsuite/gdb.trace/trace-break.exp
@@ -342,7 +342,7 @@ foreach at_first_loc { "1" "0" } {
 break_trace_same_addr_6 "trace" "enable" "trace" "disable"
 break_trace_same_addr_6 "trace" "disable" "trace" "enable"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
index d49b792143e..32ebf5a376a 100644
--- a/gdb/testsuite/gdb.trace/trace-condition.exp
+++ b/gdb/testsuite/gdb.trace/trace-condition.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/trace-enable-disable.exp b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
index 76b5b9a4d74..184d2758b5e 100644
--- a/gdb/testsuite/gdb.trace/trace-enable-disable.exp
+++ b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 standard_testfile
 set executable $testfile
diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp
index 0fc2f0069c2..ed813844277 100644
--- a/gdb/testsuite/gdb.trace/trace-mt.exp
+++ b/gdb/testsuite/gdb.trace/trace-mt.exp
@@ -105,7 +105,7 @@ foreach break_always_inserted { "on" "off" } {
 
 step_over_tracepoint "trace"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp
index cbb958ae41b..2a4590fbaee 100644
--- a/gdb/testsuite/gdb.trace/tspeed.exp
+++ b/gdb/testsuite/gdb.trace/tspeed.exp
@@ -15,7 +15,7 @@
 
 load_lib "trace-support.exp"
 
-require !skip_shlib_tests
+require allow_shlib_tests
 
 # Do not run if gdbsever debug is enabled - the output file is many Gb.
 if [gdbserver_debug_enabled] {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 9ce7c6b3aaf..c989d9e0b1f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2454,12 +2454,12 @@ gdb_caching_proc allow_python_tests {
     return [expr {[string first "--with-python" $output] != -1}]
 }
 
-# Return a 1 if we should skip shared library tests.
+# Return a 1 if we should run shared library tests.
 
-proc skip_shlib_tests {} {
+proc allow_shlib_tests {} {
     # Run the shared library tests on native systems.
     if {[isnative]} {
-	return 0
+	return 1
     }
 
     # An abbreviated list of remote targets where we should be able to
@@ -2470,10 +2470,10 @@ proc skip_shlib_tests {} {
 	 || [istarget *-*-mingw*]
 	 || [istarget *-*-cygwin*]
 	 || [istarget *-*-pe*])} {
-	return 0
+	return 1
     }
 
-    return 1
+    return 0
 }
 
 # Return 1 if we should run dlmopen tests, 0 if we should not.
@@ -2482,7 +2482,7 @@ gdb_caching_proc allow_dlmopen_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
     # We need shared library support.
-    if { [skip_shlib_tests] } {
+    if { ![allow_shlib_tests] } {
 	return 0
     }
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 75/79] Rename to allow_tsx_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (73 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 74/79] Rename to allow_shlib_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 76/79] Rename to allow_hw_breakpoint_tests Tom Tromey
                   ` (5 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_tsx_tests to invert the sense, and renames it to
allow_tsx_tests.
---
 gdb/testsuite/gdb.btrace/tsx.exp |  2 +-
 gdb/testsuite/lib/gdb.exp        | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
index 222c352c368..b56fd2858e0 100644
--- a/gdb/testsuite/gdb.btrace/tsx.exp
+++ b/gdb/testsuite/gdb.btrace/tsx.exp
@@ -15,7 +15,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/>.
 
-require allow_btrace_pt_tests !skip_tsx_tests
+require allow_btrace_pt_tests allow_tsx_tests
 
 standard_testfile .c x86-tsx.S
 if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" {debug}] {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index c989d9e0b1f..94dccf8a6a1 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3649,13 +3649,13 @@ gdb_caching_proc skip_vsx_tests {
     return $skip_vsx_tests
 }
 
-# Run a test on the target to see if it supports TSX hardware.  Return 0 if so,
-# 1 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
+# Run a test on the target to see if it supports TSX hardware.  Return 1 if so,
+# 0 if it does not.  Based on 'check_vmx_hw_available' from the GCC testsuite.
 
-gdb_caching_proc skip_tsx_tests {
+gdb_caching_proc allow_tsx_tests {
     global srcdir subdir gdb_prompt inferior_exited_re
 
-    set me "skip_tsx_tests"
+    set me "allow_tsx_tests"
 
     # Compile a test program.
     set src {
@@ -3667,7 +3667,7 @@ gdb_caching_proc skip_tsx_tests {
         }
     }
     if {![gdb_simple_compile $me $src executable]} {
-        return 1
+	return 0
     }
 
     # No error message, compilation succeeded so now run it via gdb.
@@ -3680,22 +3680,22 @@ gdb_caching_proc skip_tsx_tests {
     gdb_expect {
         -re ".*Illegal instruction.*${gdb_prompt} $" {
             verbose -log "$me:  TSX hardware not detected."
-            set skip_tsx_tests 1
+	    set allow_tsx_tests 0
         }
         -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
             verbose -log "$me:  TSX hardware detected."
-            set skip_tsx_tests 0
+	    set allow_tsx_tests 1
         }
         default {
             warning "\n$me:  default case taken."
-            set skip_tsx_tests 1
+	    set allow_tsx_tests 0
         }
     }
     gdb_exit
     remote_file build delete $obj
 
-    verbose "$me:  returning $skip_tsx_tests" 2
-    return $skip_tsx_tests
+    verbose "$me:  returning $allow_tsx_tests" 2
+    return $allow_tsx_tests
 }
 
 # Run a test on the target to see if it supports avx512bf16.  Return 1 if so,
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 76/79] Rename to allow_hw_breakpoint_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (74 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 75/79] Rename to allow_tsx_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 77/79] Rename to allow_guile_tests Tom Tromey
                   ` (4 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_hw_breakpoint_tests to invert the sense, and renames
it to allow_hw_breakpoint_tests.  This also converts some tests to use
"require" -- I missed this particular check in the first series.
---
 gdb/testsuite/gdb.base/break-idempotent.exp         |  2 +-
 gdb/testsuite/gdb.base/break-unload-file.exp        |  2 +-
 gdb/testsuite/gdb.base/hbreak-unmapped.exp          |  4 +---
 gdb/testsuite/gdb.base/hbreak.exp                   |  4 +---
 gdb/testsuite/gdb.base/hw-sw-break-same-address.exp |  4 +---
 gdb/testsuite/gdb.python/py-breakpoint.exp          |  2 +-
 gdb/testsuite/gdb.threads/watchpoint-fork.exp       |  2 +-
 gdb/testsuite/lib/gdb.exp                           | 10 +++++-----
 8 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 559a3a6306b..4090cd29f66 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -176,7 +176,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
     foreach_with_prefix always_inserted { "off" "on" } {
 	test_break $always_inserted "break"
 
-	if {![skip_hw_breakpoint_tests]} {
+	if {[allow_hw_breakpoint_tests]} {
 	    test_break $always_inserted "hbreak"
 	}
 
diff --git a/gdb/testsuite/gdb.base/break-unload-file.exp b/gdb/testsuite/gdb.base/break-unload-file.exp
index 3bf10d08522..82e96940252 100644
--- a/gdb/testsuite/gdb.base/break-unload-file.exp
+++ b/gdb/testsuite/gdb.base/break-unload-file.exp
@@ -149,7 +149,7 @@ foreach initial_load { "cmdline" "file" } {
     # coverage.
     foreach always_inserted { "off" "on" } {
 	test_break $initial_load $always_inserted "break"
-	if {![skip_hw_breakpoint_tests]} {
+	if {[allow_hw_breakpoint_tests]} {
 	    test_break $initial_load $always_inserted "hbreak"
 	}
     }
diff --git a/gdb/testsuite/gdb.base/hbreak-unmapped.exp b/gdb/testsuite/gdb.base/hbreak-unmapped.exp
index 3572452a7c6..18d9c092395 100644
--- a/gdb/testsuite/gdb.base/hbreak-unmapped.exp
+++ b/gdb/testsuite/gdb.base/hbreak-unmapped.exp
@@ -13,9 +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_hw_breakpoint_tests]} {
-    return 0
-}
+require allow_hw_breakpoint_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/hbreak.exp b/gdb/testsuite/gdb.base/hbreak.exp
index f18d23de29b..7fc1bb2930e 100644
--- a/gdb/testsuite/gdb.base/hbreak.exp
+++ b/gdb/testsuite/gdb.base/hbreak.exp
@@ -13,9 +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_hw_breakpoint_tests]} {
-    return 0
-}
+require allow_hw_breakpoint_tests
 
 set test hbreak
 set srcfile ${test}.c
diff --git a/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp b/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp
index 1f6832688f0..9f941186454 100644
--- a/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp
+++ b/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp
@@ -18,9 +18,7 @@
 # breakpoint locations as duplicate locations, which would lead to bad
 # behavior.  See PR gdb/25741.
 
-if {[skip_hw_breakpoint_tests]} {
-    return 0
-}
+require allow_hw_breakpoint_tests
 
 set test hbreak
 set srcfile ${test}.c
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index bee2ceaf032..9535040e3a2 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -259,7 +259,7 @@ proc_with_prefix test_hardware_breakpoints { } {
     global srcfile testfile hex decimal
 
     # Skip these tests if the HW does not support hardware breakpoints.
-    if { [skip_hw_breakpoint_tests] } { return 0 }
+    if { ![allow_hw_breakpoint_tests] } { return 0 }
 
     # Start with a fresh gdb.
     clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
index d3804e68f88..b484fa80406 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
@@ -74,7 +74,7 @@ proc test {type symbol} {
 	    gdb_test "watch var" "atchpoint \[0-9\]+: var" "set the watchpoint"
 
 	    # It is never hit but it should not be left over in the fork()ed-off child.
-	    if [skip_hw_breakpoint_tests] {
+	    if {![allow_hw_breakpoint_tests]} {
 		set hbreak "break"
 	    } else {
 		set hbreak "hbreak"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 94dccf8a6a1..31f11b22f87 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4017,13 +4017,13 @@ proc skip_inline_var_tests {} {
     return 0
 }
 
-# Return a 1 if we should skip tests that require hardware breakpoints
+# Return a 1 if we should run tests that require hardware breakpoints
 
-proc skip_hw_breakpoint_tests {} {
+proc allow_hw_breakpoint_tests {} {
     # Skip tests if requested by the board (note that no_hardware_watchpoints
     # disables both watchpoints and breakpoints)
     if { [target_info exists gdb,no_hardware_watchpoints]} {
-	return 1
+	return 0
     }
 
     # These targets support hardware breakpoints natively
@@ -4033,10 +4033,10 @@ proc skip_hw_breakpoint_tests {} {
 	 || [istarget "arm*-*-*"]
 	 || [istarget "aarch64*-*-*"]
 	 || [istarget "s390*-*-*"] } {
-	return 0
+	return 1
     }
 
-    return 1
+    return 0
 }
 
 # Return a 1 if we should run tests that require hardware watchpoints
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 77/79] Rename to allow_guile_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (75 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 76/79] Rename to allow_hw_breakpoint_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-14 16:22   ` Tom de Vries
  2023-01-12  3:00 ` [PATCH v2 78/79] Rename to allow_tui_tests Tom Tromey
                   ` (3 subsequent siblings)
  80 siblings, 1 reply; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_guile_tests to invert the sense, and renames it to
allow_guile_tests.  It also rewrites this proc to check the output of
"gdb --configuration", as was done for Python.  Then it changes the
code to use "require" where possible.
---
 gdb/testsuite/gdb.guile/scm-arch.exp          |  5 ++---
 gdb/testsuite/gdb.guile/scm-block.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-breakpoint.exp    |  5 ++---
 gdb/testsuite/gdb.guile/scm-cmd.exp           |  5 ++---
 gdb/testsuite/gdb.guile/scm-disasm.exp        |  5 ++---
 gdb/testsuite/gdb.guile/scm-equal.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-error.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-frame-args.exp    |  5 ++---
 gdb/testsuite/gdb.guile/scm-frame-inline.exp  |  5 ++---
 gdb/testsuite/gdb.guile/scm-frame.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-gsmob.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-iterator.exp      |  5 ++---
 gdb/testsuite/gdb.guile/scm-lazy-string.exp   |  5 ++---
 gdb/testsuite/gdb.guile/scm-math.exp          |  5 ++---
 .../gdb.guile/scm-objfile-script.exp          |  5 ++---
 gdb/testsuite/gdb.guile/scm-objfile.exp       |  5 ++---
 gdb/testsuite/gdb.guile/scm-parameter.exp     |  5 ++---
 gdb/testsuite/gdb.guile/scm-ports.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-pretty-print.exp  |  5 ++---
 gdb/testsuite/gdb.guile/scm-progspace.exp     |  5 ++---
 .../gdb.guile/scm-section-script.exp          |  5 ++---
 gdb/testsuite/gdb.guile/scm-symbol.exp        |  5 ++---
 gdb/testsuite/gdb.guile/scm-symtab.exp        |  5 ++---
 gdb/testsuite/gdb.guile/scm-type.exp          |  2 +-
 gdb/testsuite/gdb.guile/scm-value-cc.exp      |  5 +----
 gdb/testsuite/gdb.guile/scm-value.exp         |  5 ++---
 gdb/testsuite/gdb.guile/types-module.exp      |  5 ++---
 gdb/testsuite/lib/gdb-guile.exp               | 21 ++++---------------
 28 files changed, 56 insertions(+), 97 deletions(-)

diff --git a/gdb/testsuite/gdb.guile/scm-arch.exp b/gdb/testsuite/gdb.guile/scm-arch.exp
index 7ec1db108ef..c2554d853d9 100644
--- a/gdb/testsuite/gdb.guile/scm-arch.exp
+++ b/gdb/testsuite/gdb.guile/scm-arch.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-block.exp b/gdb/testsuite/gdb.guile/scm-block.exp
index 666d6fd458d..20fbd1784b5 100644
--- a/gdb/testsuite/gdb.guile/scm-block.exp
+++ b/gdb/testsuite/gdb.guile/scm-block.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
index cd469ca4488..a9e656ddfc0 100644
--- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
+++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 proc_with_prefix test_bkpt_basic { } {
     global srcfile testfile hex decimal
 
diff --git a/gdb/testsuite/gdb.guile/scm-cmd.exp b/gdb/testsuite/gdb.guile/scm-cmd.exp
index 1d4e13d7aef..a7fb59b0089 100644
--- a/gdb/testsuite/gdb.guile/scm-cmd.exp
+++ b/gdb/testsuite/gdb.guile/scm-cmd.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-disasm.exp b/gdb/testsuite/gdb.guile/scm-disasm.exp
index 6609c746756..37b710f9f99 100644
--- a/gdb/testsuite/gdb.guile/scm-disasm.exp
+++ b/gdb/testsuite/gdb.guile/scm-disasm.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-equal.exp b/gdb/testsuite/gdb.guile/scm-equal.exp
index d2fb9ef0161..3f6e0c51986 100644
--- a/gdb/testsuite/gdb.guile/scm-equal.exp
+++ b/gdb/testsuite/gdb.guile/scm-equal.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-error.exp b/gdb/testsuite/gdb.guile/scm-error.exp
index b0de521cb5c..168d71d1b9e 100644
--- a/gdb/testsuite/gdb.guile/scm-error.exp
+++ b/gdb/testsuite/gdb.guile/scm-error.exp
@@ -19,13 +19,12 @@ set testfile "scm-error"
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # Test error while loading .scm.
 
 set remote_guile_file_1 [gdb_remote_download host \
diff --git a/gdb/testsuite/gdb.guile/scm-frame-args.exp b/gdb/testsuite/gdb.guile/scm-frame-args.exp
index 075f4419c17..67c10f65b3e 100644
--- a/gdb/testsuite/gdb.guile/scm-frame-args.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame-args.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-frame-inline.exp b/gdb/testsuite/gdb.guile/scm-frame-inline.exp
index 88a69fd882b..1f73ed67b90 100644
--- a/gdb/testsuite/gdb.guile/scm-frame-inline.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame-inline.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-frame.exp b/gdb/testsuite/gdb.guile/scm-frame.exp
index 3118d6bcd2f..2e854967d36 100644
--- a/gdb/testsuite/gdb.guile/scm-frame.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # The following tests require execution.
 
 if ![gdb_guile_runto_main] {
diff --git a/gdb/testsuite/gdb.guile/scm-gsmob.exp b/gdb/testsuite/gdb.guile/scm-gsmob.exp
index ded2a85c9d2..a7c95c01c11 100644
--- a/gdb/testsuite/gdb.guile/scm-gsmob.exp
+++ b/gdb/testsuite/gdb.guile/scm-gsmob.exp
@@ -18,13 +18,12 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_reinitialize_dir $srcdir/$subdir
 
 gdb_install_guile_utils
diff --git a/gdb/testsuite/gdb.guile/scm-iterator.exp b/gdb/testsuite/gdb.guile/scm-iterator.exp
index 15974523324..0bf459518a1 100644
--- a/gdb/testsuite/gdb.guile/scm-iterator.exp
+++ b/gdb/testsuite/gdb.guile/scm-iterator.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-lazy-string.exp b/gdb/testsuite/gdb.guile/scm-lazy-string.exp
index 9b2960a4093..605235648a3 100644
--- a/gdb/testsuite/gdb.guile/scm-lazy-string.exp
+++ b/gdb/testsuite/gdb.guile/scm-lazy-string.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 #gdb_install_guile_utils
 #gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/scm-math.exp b/gdb/testsuite/gdb.guile/scm-math.exp
index 97a2e58766b..42e195a0778 100644
--- a/gdb/testsuite/gdb.guile/scm-math.exp
+++ b/gdb/testsuite/gdb.guile/scm-math.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 proc test_value_numeric_ops {} {
@@ -335,9 +337,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c}]} {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-objfile-script.exp b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
index bd0fd003cb6..5b480d1ea55 100644
--- a/gdb/testsuite/gdb.guile/scm-objfile-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
@@ -28,9 +30,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # Make the -gdb.scm script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
diff --git a/gdb/testsuite/gdb.guile/scm-objfile.exp b/gdb/testsuite/gdb.guile/scm-objfile.exp
index eb49600aa2c..f27c9f4027c 100644
--- a/gdb/testsuite/gdb.guile/scm-objfile.exp
+++ b/gdb/testsuite/gdb.guile/scm-objfile.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp
index db76fc2d1c8..d62ae473faa 100644
--- a/gdb/testsuite/gdb.guile/scm-parameter.exp
+++ b/gdb/testsuite/gdb.guile/scm-parameter.exp
@@ -18,14 +18,13 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_install_guile_utils
 gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/scm-ports.exp b/gdb/testsuite/gdb.guile/scm-ports.exp
index 318c434241a..f0af5d4bbad 100644
--- a/gdb/testsuite/gdb.guile/scm-ports.exp
+++ b/gdb/testsuite/gdb.guile/scm-ports.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-pretty-print.exp b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
index f21ed41bffd..3c20edf5061 100644
--- a/gdb/testsuite/gdb.guile/scm-pretty-print.exp
+++ b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 proc run_lang_tests {exefile lang} {
     with_test_prefix "lang=$lang" {
 	global srcdir subdir srcfile testfile hex
diff --git a/gdb/testsuite/gdb.guile/scm-progspace.exp b/gdb/testsuite/gdb.guile/scm-progspace.exp
index f43e65e9673..c12a81e8ed1 100644
--- a/gdb/testsuite/gdb.guile/scm-progspace.exp
+++ b/gdb/testsuite/gdb.guile/scm-progspace.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
@@ -30,9 +32,6 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_install_guile_utils
 gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/scm-section-script.exp b/gdb/testsuite/gdb.guile/scm-section-script.exp
index 34ee6de3fdb..9e52939aae3 100644
--- a/gdb/testsuite/gdb.guile/scm-section-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-section-script.exp
@@ -30,6 +30,8 @@ if {![istarget *-*-linux*]
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 # Make this available to gdb before the program starts, it is
@@ -48,9 +50,6 @@ if {[build_executable $testfile.exp $testfile $srcfile \
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_reinitialize_dir $srcdir/$subdir
 
 # Try first with a restrictive safe-path.
diff --git a/gdb/testsuite/gdb.guile/scm-symbol.exp b/gdb/testsuite/gdb.guile/scm-symbol.exp
index f4b935f787f..fa2cf778284 100644
--- a/gdb/testsuite/gdb.guile/scm-symbol.exp
+++ b/gdb/testsuite/gdb.guile/scm-symbol.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # These tests are done before we call gdb_guile_runto_main so we have to
 # import the gdb module ourselves.
 gdb_install_guile_utils
diff --git a/gdb/testsuite/gdb.guile/scm-symtab.exp b/gdb/testsuite/gdb.guile/scm-symtab.exp
index 33308e0f008..0f468b7d373 100644
--- a/gdb/testsuite/gdb.guile/scm-symtab.exp
+++ b/gdb/testsuite/gdb.guile/scm-symtab.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile scm-symtab.c scm-symtab-2.c
 
 if {[prepare_for_testing "failed to prepare" $testfile \
@@ -25,9 +27,6 @@ if {[prepare_for_testing "failed to prepare" $testfile \
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-type.exp b/gdb/testsuite/gdb.guile/scm-type.exp
index f8902a30a62..45139cba0d5 100644
--- a/gdb/testsuite/gdb.guile/scm-type.exp
+++ b/gdb/testsuite/gdb.guile/scm-type.exp
@@ -43,7 +43,7 @@ proc restart_gdb {exefile} {
     gdb_reinitialize_dir $srcdir/$subdir
     gdb_load ${exefile}
 
-    if { [skip_guile_tests] } {
+    if { ![allow_guile_tests] } {
 	return 0
     }
 
diff --git a/gdb/testsuite/gdb.guile/scm-value-cc.exp b/gdb/testsuite/gdb.guile/scm-value-cc.exp
index 5b2a3c96c80..921d7a939a3 100644
--- a/gdb/testsuite/gdb.guile/scm-value-cc.exp
+++ b/gdb/testsuite/gdb.guile/scm-value-cc.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-guile.exp
 
-require allow_cplus_tests
+require allow_cplus_tests allow_guile_tests
 
 standard_testfile .cc
 
@@ -26,9 +26,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp
index 9858b1c1a38..a00c9409086 100644
--- a/gdb/testsuite/gdb.guile/scm-value.exp
+++ b/gdb/testsuite/gdb.guile/scm-value.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 set has_argv0 [gdb_has_argv0]
@@ -427,9 +429,6 @@ if { [build_inferior "${binfile}" "c"] < 0 } {
 # Start with a fresh gdb.
 clean_restart ${binfile}
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_install_guile_utils
 gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/types-module.exp b/gdb/testsuite/gdb.guile/types-module.exp
index 520c9021575..2b90d1b613a 100644
--- a/gdb/testsuite/gdb.guile/types-module.exp
+++ b/gdb/testsuite/gdb.guile/types-module.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile .cc
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/lib/gdb-guile.exp b/gdb/testsuite/lib/gdb-guile.exp
index 845d584b914..f2307372b8b 100644
--- a/gdb/testsuite/lib/gdb-guile.exp
+++ b/gdb/testsuite/lib/gdb-guile.exp
@@ -18,24 +18,11 @@
 # Guile doesn't print the 0x prefix on hex numbers.
 set ghex {[0-9a-f]+}
 
-# Return a 1 for configurations that do not support Guile scripting.
+# Return a 1 for configurations that support Guile scripting.
 
-proc skip_guile_tests {} {
-    global gdb_prompt
-
-    gdb_test_multiple "guile (display \"test\\n\")" "verify guile support" {
-	-re "Undefined command.*$gdb_prompt $" {
-	    unsupported "Guile not supported."
-	    return 1
-	}
-	-re "not supported.*$gdb_prompt $" {
-	    unsupported "Guile support is disabled."
-	    return 1
-	}
-	-re "$gdb_prompt $" {}
-    }
-
-    return 0
+gdb_caching_proc allow_guile_tests {
+    set output [exec $::GDB --configuration]
+    return [expr {[string first "--with-guile" $output] != -1}]
 }
 
 # Run a command in GDB, and report a failure if a Scheme exception is thrown.
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 78/79] Rename to allow_tui_tests
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (76 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 77/79] Rename to allow_guile_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-12  3:00 ` [PATCH v2 79/79] Consolidate calls to require Tom Tromey
                   ` (2 subsequent siblings)
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes skip_tui_tests to invert the sense, and renames it to
allow_tui_tests.  It also rewrites this function to use the output of
"gdb --configuration", and it adds a note about the state of the TUI
to that output.
---
 gdb/testsuite/gdb.base/options.exp              |  2 +-
 .../gdb.python/tui-window-disabled.exp          |  4 +---
 gdb/testsuite/gdb.python/tui-window-names.exp   |  6 +-----
 gdb/testsuite/gdb.python/tui-window.exp         |  5 +----
 gdb/testsuite/gdb.tui/completion.exp            |  4 +++-
 gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp |  2 +-
 gdb/testsuite/gdb.tui/tui-layout.exp            |  6 ++----
 .../gdb.tui/tui-nl-filtered-output.exp          |  6 ++----
 gdb/testsuite/lib/completion-support.exp        |  2 +-
 gdb/testsuite/lib/gdb.exp                       | 17 ++++-------------
 gdb/testsuite/lib/tuiterm.exp                   |  2 +-
 gdb/top.c                                       | 10 ++++++++++
 12 files changed, 28 insertions(+), 38 deletions(-)

diff --git a/gdb/testsuite/gdb.base/options.exp b/gdb/testsuite/gdb.base/options.exp
index 2be7f878e7e..486192e3472 100644
--- a/gdb/testsuite/gdb.base/options.exp
+++ b/gdb/testsuite/gdb.base/options.exp
@@ -47,7 +47,7 @@ if { ![readline_is_used] } {
     return -1
 }
 
-set tui_supported_p [expr ![skip_tui_tests]]
+set tui_supported_p [allow_tui_tests]
 
 # Check the completion result, as returned by the "maintenance show
 # test-options-completion-result" command.  TEST is used as test name.
diff --git a/gdb/testsuite/gdb.python/tui-window-disabled.exp b/gdb/testsuite/gdb.python/tui-window-disabled.exp
index 36ecb0b5ef1..57d41cdbf8b 100644
--- a/gdb/testsuite/gdb.python/tui-window-disabled.exp
+++ b/gdb/testsuite/gdb.python/tui-window-disabled.exp
@@ -22,6 +22,7 @@
 # though the tui should be disabled.
 
 load_lib gdb-python.exp
+require allow_tui_tests
 tuiterm_env
 
 standard_testfile
@@ -31,9 +32,6 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
 }
 
 clean_restart
-if {[skip_tui_tests]} {
-    return
-}
 
 # Copy the Python script to where the tests are being run.
 set remote_python_file [gdb_remote_download host \
diff --git a/gdb/testsuite/gdb.python/tui-window-names.exp b/gdb/testsuite/gdb.python/tui-window-names.exp
index 125a5f5a9b5..1a25be89299 100644
--- a/gdb/testsuite/gdb.python/tui-window-names.exp
+++ b/gdb/testsuite/gdb.python/tui-window-names.exp
@@ -18,16 +18,12 @@
 
 load_lib gdb-python.exp
 
-require allow_python_tests
+require allow_python_tests allow_tui_tests
 
 tuiterm_env
 
 clean_restart
 
-if {[skip_tui_tests]} {
-    return
-}
-
 # Define a function we can use as a window constructor.  If this ever
 # gets called we'll throw an error, but that's OK, this test doesn't
 # actually try to create any windows.
diff --git a/gdb/testsuite/gdb.python/tui-window.exp b/gdb/testsuite/gdb.python/tui-window.exp
index 529ed16b641..af2a866e78b 100644
--- a/gdb/testsuite/gdb.python/tui-window.exp
+++ b/gdb/testsuite/gdb.python/tui-window.exp
@@ -16,7 +16,7 @@
 # Test a TUI window implemented in Python.
 
 load_lib gdb-python.exp
-require allow_python_tests
+require allow_python_tests allow_tui_tests
 tuiterm_env
 
 # This test doesn't care about the inferior.
@@ -27,9 +27,6 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
 }
 
 clean_restart
-if {[skip_tui_tests]} {
-    return
-}
 
 Term::clean_restart 24 80 $testfile
 
diff --git a/gdb/testsuite/gdb.tui/completion.exp b/gdb/testsuite/gdb.tui/completion.exp
index 00956488c9f..a3b3114a472 100644
--- a/gdb/testsuite/gdb.tui/completion.exp
+++ b/gdb/testsuite/gdb.tui/completion.exp
@@ -13,10 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+require allow_tui_tests
+
 gdb_exit
 gdb_start
 
-if {[skip_tui_tests] || [target_info exists gdb,nointerrupts]} {
+if {[target_info exists gdb,nointerrupts]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp b/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
index 0ad91308ca4..7e3cff3950b 100644
--- a/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
+++ b/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
@@ -33,7 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" \
 
 clean_restart "$binfile"
 
-if {[skip_tui_tests]} {
+if {![allow_tui_tests]} {
     # TUI support is disabled.  Check for error message.
     gdb_test "layout asm" "Undefined command: \"layout\".  Try \"help\"."
     return
diff --git a/gdb/testsuite/gdb.tui/tui-layout.exp b/gdb/testsuite/gdb.tui/tui-layout.exp
index 97734cf7b68..2c502191d11 100644
--- a/gdb/testsuite/gdb.tui/tui-layout.exp
+++ b/gdb/testsuite/gdb.tui/tui-layout.exp
@@ -16,16 +16,14 @@
 # Minimal testcase that just checks that the various "layout $foo"
 # commands do not cause gdb to crash.
 
+require allow_tui_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return -1
 }
 
-if {[skip_tui_tests]} {
-    return
-}
-
 # Test one layout command.  EXECUTION indicates whether to activate
 # the layout with or without execution.
 
diff --git a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
index 5a2a4205bb5..b7ea67cf723 100644
--- a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
+++ b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
@@ -30,13 +30,11 @@
 #
 #  (gdb)
 
+require allow_tui_tests
+
 gdb_exit
 gdb_start
 
-if {[skip_tui_tests]} {
-    return
-}
-
 # Enable the TUI.
 
 set test "tui enable"
diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp
index f47f1d3ec50..bf9c5ad352c 100644
--- a/gdb/testsuite/lib/completion-support.exp
+++ b/gdb/testsuite/lib/completion-support.exp
@@ -555,7 +555,7 @@ proc test_gdb_completion_offers_commands {input_line} {
 
     # TUI adds additional commands to the possible completions, so we
     # need different patterns depending on whether or not it is enabled.
-    if { [skip_tui_tests] } {
+    if { ![allow_tui_tests] } {
 	test_gdb_complete_multiple $input_line "" "" {
 	    "!"
 	    "actions"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 31f11b22f87..5359315667e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2572,20 +2572,11 @@ gdb_caching_proc allow_dlmopen_tests {
     return $allow_dlmopen_tests
 }
 
-# Return 1 if we should skip tui related tests.
+# Return 1 if we should allow TUI-related tests.
 
-proc skip_tui_tests {} {
-    global gdb_prompt
-
-    gdb_test_multiple "help layout" "verify tui support" {
-	-re "Undefined command: \"layout\".*$gdb_prompt $" {
-	    return 1
-	}
-	-re "$gdb_prompt $" {
-	}
-    }
-
-    return 0
+gdb_caching_proc allow_tui_tests {
+    set output [remote_exec host $::GDB --configuration]
+    return [expr {[string first "--enable-tui" $output] != -1}]
 }
 
 # Test files shall make sure all the test result lines in gdb.sum are
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index 591c4ca9c4c..c38ccbbdbd7 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -778,7 +778,7 @@ namespace eval Term {
     # Setup ready for starting the tui, but don't actually start it.
     # Returns 1 on success, 0 if TUI tests should be skipped.
     proc prepare_for_tui {} {
-	if {[skip_tui_tests]} {
+	if {![allow_tui_tests]} {
 	    return 0
 	}
 
diff --git a/gdb/top.c b/gdb/top.c
index c32ab896a0e..205eb360ba3 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1649,6 +1649,16 @@ This GDB was configured as follows:\n\
 "));
 #endif
 
+#ifdef TUI
+  gdb_printf (stream, _("\
+	     --enable-tui\n\
+"));
+#else
+  gdb_printf (stream, _("\
+	     --disable-tui\n\
+"));
+#endif
+
 #ifdef RELOC_SRCDIR
   gdb_printf (stream, _("\
 	     --with-relocated-sources=%s\n\
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* [PATCH v2 79/79] Consolidate calls to require
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (77 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 78/79] Rename to allow_tui_tests Tom Tromey
@ 2023-01-12  3:00 ` Tom Tromey
  2023-01-13 12:48   ` Pedro Alves
  2023-01-12  4:45 ` [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Kevin Buettner
  2023-01-13 20:18 ` Tom Tromey
  80 siblings, 1 reply; 91+ messages in thread
From: Tom Tromey @ 2023-01-12  3:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

The previous transforms left some files with multiple calls to
"require" near the top.  This patch consolidates these to the extent
possible.  (There are a couple of files that call "require" later,
after running some tests.  These have been left alone.)
---
 gdb/testsuite/gdb.ada/catch_ex_std.exp                 |  4 +---
 gdb/testsuite/gdb.ada/dynamic-iface.exp                |  4 +---
 gdb/testsuite/gdb.ada/exec_changed.exp                 |  4 +---
 gdb/testsuite/gdb.ada/interface.exp                    |  4 +---
 gdb/testsuite/gdb.ada/iwide.exp                        |  4 +---
 gdb/testsuite/gdb.ada/mi_interface.exp                 |  4 +---
 gdb/testsuite/gdb.ada/start.exp                        |  4 +---
 gdb/testsuite/gdb.ada/tagged.exp                       |  4 +---
 gdb/testsuite/gdb.ada/tagged_access.exp                |  4 +---
 gdb/testsuite/gdb.ada/task_watch.exp                   |  4 +---
 gdb/testsuite/gdb.base/async-shell.exp                 |  4 +---
 gdb/testsuite/gdb.base/fork-print-inferior-events.exp  |  4 +---
 gdb/testsuite/gdb.base/solib-display.exp               |  4 +---
 gdb/testsuite/gdb.base/solib-nodir.exp                 | 10 ++++------
 gdb/testsuite/gdb.base/sym-file.exp                    |  4 +---
 gdb/testsuite/gdb.base/watchpoint-hw-attach.exp        |  4 +---
 gdb/testsuite/gdb.base/watchpoint-hw.exp               |  4 +---
 gdb/testsuite/gdb.btrace/multi-inferior.exp            |  4 +---
 gdb/testsuite/gdb.btrace/reconnect.exp                 |  3 +--
 gdb/testsuite/gdb.cp/annota2.exp                       | 10 ++++------
 gdb/testsuite/gdb.cp/annota3.exp                       | 10 ++++------
 gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp             |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-common-block.exp          |  5 ++---
 gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp |  7 +++----
 gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp  |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp       |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp       |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp       |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp    |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp     |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp       |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp             |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp               |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp      |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp    |  7 +++----
 gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp   |  4 +---
 .../gdb.dwarf2/dw2-out-of-range-end-of-seq.exp         |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp           |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp           |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp        |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp           |  4 +---
 gdb/testsuite/gdb.dwarf2/dw2-ranges.exp                |  4 +---
 .../gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp    |  4 +---
 .../gdb.dwarf2/dw2-vendor-extended-opcode.exp          |  4 +---
 .../gdb.dwarf2/frame-inlined-in-outer-frame.exp        |  6 ++----
 gdb/testsuite/gdb.dwarf2/implptrconst.exp              |  4 +---
 gdb/testsuite/gdb.dwarf2/implptrpiece.exp              |  4 +---
 gdb/testsuite/gdb.dwarf2/implref-array.exp             |  4 +---
 gdb/testsuite/gdb.dwarf2/implref-const.exp             |  4 +---
 gdb/testsuite/gdb.dwarf2/implref-global.exp            |  4 +---
 gdb/testsuite/gdb.dwarf2/implref-struct.exp            |  4 +---
 gdb/testsuite/gdb.dwarf2/imported-unit.exp             |  4 +---
 .../gdb.dwarf2/locexpr-data-member-location.exp        |  6 ++----
 gdb/testsuite/gdb.dwarf2/main-subprogram.exp           |  4 +---
 gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp     |  4 +---
 gdb/testsuite/gdb.dwarf2/method-ptr.exp                |  4 +---
 gdb/testsuite/gdb.dwarf2/missing-sig-type.exp          |  4 +---
 gdb/testsuite/gdb.dwarf2/nostaticblock.exp             |  4 +---
 gdb/testsuite/gdb.dwarf2/staticvirtual.exp             |  4 +---
 gdb/testsuite/gdb.dwarf2/subrange.exp                  |  4 +---
 gdb/testsuite/gdb.fortran/debug-expr.exp               |  4 +---
 gdb/testsuite/gdb.mi/list-thread-groups-available.exp  |  4 +---
 gdb/testsuite/gdb.mi/mi-async.exp                      |  5 +----
 gdb/testsuite/gdb.mi/user-selected-context-sync.exp    |  7 +++----
 gdb/testsuite/gdb.multi/attach-no-multi-process.exp    |  4 +---
 gdb/testsuite/gdb.multi/watchpoint-multi.exp           |  4 +---
 gdb/testsuite/gdb.server/attach-flag.exp               |  4 +---
 gdb/testsuite/gdb.server/ext-attach.exp                |  4 +---
 gdb/testsuite/gdb.trace/change-loc.exp                 |  4 +---
 gdb/testsuite/gdb.trace/ftrace-lock.exp                |  5 ++---
 gdb/testsuite/gdb.trace/ftrace.exp                     |  4 +---
 gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp      |  3 +--
 gdb/testsuite/gdb.trace/pending.exp                    |  4 +---
 gdb/testsuite/gdb.trace/trace-condition.exp            |  4 +---
 gdb/testsuite/gdb.trace/trace-enable-disable.exp       |  5 ++---
 75 files changed, 95 insertions(+), 238 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index 73cbdaf90ca..c7b65098208 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -13,12 +13,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-require allow_shlib_tests
+require allow_shlib_tests allow_ada_tests
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
 standard_ada_testfile foo
 
 set srcfile2 [file join [file dirname $srcfile] some_package.adb]
diff --git a/gdb/testsuite/gdb.ada/dynamic-iface.exp b/gdb/testsuite/gdb.ada/dynamic-iface.exp
index 431fa29d64f..b523968194a 100644
--- a/gdb/testsuite/gdb.ada/dynamic-iface.exp
+++ b/gdb/testsuite/gdb.ada/dynamic-iface.exp
@@ -15,9 +15,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
-require gnat_runtime_has_debug_info
+require allow_ada_tests gnat_runtime_has_debug_info
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp
index 9e69d136e31..087d1ac9b3d 100644
--- a/gdb/testsuite/gdb.ada/exec_changed.exp
+++ b/gdb/testsuite/gdb.ada/exec_changed.exp
@@ -15,11 +15,9 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
-require !use_gdb_stub
+require allow_ada_tests !use_gdb_stub
 
 standard_ada_testfile first
 
diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp
index aa1abc78d38..151fbbee44f 100644
--- a/gdb/testsuite/gdb.ada/interface.exp
+++ b/gdb/testsuite/gdb.ada/interface.exp
@@ -15,9 +15,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
-require gnat_runtime_has_debug_info
+require allow_ada_tests gnat_runtime_has_debug_info
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp
index 8915852e4e3..33a46d18327 100644
--- a/gdb/testsuite/gdb.ada/iwide.exp
+++ b/gdb/testsuite/gdb.ada/iwide.exp
@@ -15,9 +15,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
-require gnat_runtime_has_debug_info
+require allow_ada_tests gnat_runtime_has_debug_info
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp
index ed1215a3922..80594a8762f 100644
--- a/gdb/testsuite/gdb.ada/mi_interface.exp
+++ b/gdb/testsuite/gdb.ada/mi_interface.exp
@@ -15,9 +15,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
-require gnat_runtime_has_debug_info
+require allow_ada_tests gnat_runtime_has_debug_info
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp
index 20870652266..026a57933af 100644
--- a/gdb/testsuite/gdb.ada/start.exp
+++ b/gdb/testsuite/gdb.ada/start.exp
@@ -15,11 +15,9 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
-require !use_gdb_stub
+require allow_ada_tests !use_gdb_stub
 
 standard_ada_testfile dummy
 
diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp
index f45a6509da5..a842ed2b6ba 100644
--- a/gdb/testsuite/gdb.ada/tagged.exp
+++ b/gdb/testsuite/gdb.ada/tagged.exp
@@ -15,9 +15,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
-require gnat_runtime_has_debug_info
+require allow_ada_tests gnat_runtime_has_debug_info
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp
index 438858ffb96..dcd969c4722 100644
--- a/gdb/testsuite/gdb.ada/tagged_access.exp
+++ b/gdb/testsuite/gdb.ada/tagged_access.exp
@@ -15,9 +15,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
-require gnat_runtime_has_debug_info
+require allow_ada_tests gnat_runtime_has_debug_info
 
 standard_ada_testfile p
 
diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp
index 0641008fb51..02b4f1cb0bb 100644
--- a/gdb/testsuite/gdb.ada/task_watch.exp
+++ b/gdb/testsuite/gdb.ada/task_watch.exp
@@ -17,9 +17,7 @@
 
 load_lib "ada.exp"
 
-require allow_ada_tests
-
-require allow_hw_watchpoint_tests
+require allow_ada_tests allow_hw_watchpoint_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.base/async-shell.exp b/gdb/testsuite/gdb.base/async-shell.exp
index fb56d2602b1..970f44da21c 100644
--- a/gdb/testsuite/gdb.base/async-shell.exp
+++ b/gdb/testsuite/gdb.base/async-shell.exp
@@ -15,10 +15,8 @@
 
 standard_testfile
 
-require support_displaced_stepping
-
 # The testfile uses "run".  The real bug happened only for ![is_remote target].
-require !use_gdb_stub
+require support_displaced_stepping !use_gdb_stub
 
 save_vars { GDBFLAGS } {
     set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
diff --git a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
index 33ac172c53b..436471dd7f1 100644
--- a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
+++ b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
@@ -20,11 +20,9 @@
 # 'set detach-on-fork [on,off]' are the correct ones.
 
 # This test relies on "run", so it cannot run on target remote stubs.
-require !use_gdb_stub
-
 # Test relies on checking follow-fork output. Do not run if gdb debug is
 # enabled as it will be redirected to the log.
-require !gdb_debug_enabled
+require !use_gdb_stub !gdb_debug_enabled
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
index aaaa134007b..913203ecfb9 100644
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -28,8 +28,6 @@
 # (and thus aren't affected by shared library unloading) are not
 # disabled prematurely.
 
-require allow_shlib_tests
-
 # This test is currently not supported for stub targets, because it uses the
 # start command (through gdb_start_cmd).  In theory, it could be changed to
 # use something else (kill + gdb_run_cmd with a manual breakpoint at main).
@@ -43,7 +41,7 @@ require allow_shlib_tests
 # This is because the initial stop is done before the shared libraries are
 # loaded.
 
-require !use_gdb_stub
+require allow_shlib_tests !use_gdb_stub
 
 # Library file.
 set libname "solib-display-lib"
diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp
index dd0724909ad..f5d94798f9d 100644
--- a/gdb/testsuite/gdb.base/solib-nodir.exp
+++ b/gdb/testsuite/gdb.base/solib-nodir.exp
@@ -13,18 +13,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-require allow_shlib_tests
+# We need to be able to influence the target's environment and working
+# directory.  Can't do that if when we connect the inferior is already
+# running.
+require allow_shlib_tests !use_gdb_stub
 
 # The testcase assumes the target can access the OBJDIR.
 if [is_remote target] {
     return
 }
 
-# We need to be able to influence the target's environment and working
-# directory.  Can't do that if when we connect the inferior is already
-# running.
-require !use_gdb_stub
-
 set testfile "solib-nodir"
 # Arbitrary file, possibly not containing main, even an empty one.
 set srclibfile foo.c
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index cb5204ecff0..1c95f05a286 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -29,9 +29,7 @@
 # 13) Check that the execution can continue without error.
 # 14) Regression test for a stale breakpoints bug.
 
-require is_elf_target
-
-require allow_shlib_tests
+require is_elf_target allow_shlib_tests
 
 set target_size TARGET_UNKNOWN
 if {[is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
index 785fc35f7bc..4ddb7a76602 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
@@ -16,9 +16,7 @@
 # watchpoint-hw-attach.exp -- Test if hardware watchpoints are used
 # when attaching to a target.
 
-require allow_hw_watchpoint_tests
-
-require can_spawn_for_attach
+require allow_hw_watchpoint_tests can_spawn_for_attach
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp
index 13871912d09..e24544f8e42 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw.exp
@@ -13,9 +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/>.
 
-require !use_gdb_stub
-
-require allow_hw_watchpoint_tests
+require !use_gdb_stub allow_hw_watchpoint_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.btrace/multi-inferior.exp b/gdb/testsuite/gdb.btrace/multi-inferior.exp
index 79e5a1c39bf..49bdfe18a63 100644
--- a/gdb/testsuite/gdb.btrace/multi-inferior.exp
+++ b/gdb/testsuite/gdb.btrace/multi-inferior.exp
@@ -22,9 +22,7 @@
 #
 # Each inferior can be recorded separately.
 
-require allow_btrace_tests
-
-require !use_gdb_stub
+require allow_btrace_tests !use_gdb_stub
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp
index 2c8358327a4..09de4ca2710 100644
--- a/gdb/testsuite/gdb.btrace/reconnect.exp
+++ b/gdb/testsuite/gdb.btrace/reconnect.exp
@@ -19,8 +19,7 @@
 
 load_lib gdbserver-support.exp
 
-require allow_btrace_tests
-require allow_gdbserver_tests
+require allow_btrace_tests allow_gdbserver_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 64adbbdb220..d5a74d003ce 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -20,7 +20,10 @@
 # test running programs
 #
 
-require allow_cplus_tests
+# This testcase cannot use runto_main because of the different prompt
+# we get when using annotation level 2.
+#
+require allow_cplus_tests target_can_use_run_cmd
 
 standard_testfile .cc
 
@@ -29,11 +32,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
     return -1
 }
 
-# This testcase cannot use runto_main because of the different prompt
-# we get when using annotation level 2.
-#
-require target_can_use_run_cmd
-
 set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n"
 set frames_invalid "\r\n\032\032frames-invalid\r\n"
 
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index 788bda77f3d..965dcac0d80 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -20,7 +20,10 @@
 # test running programs
 #
 
-require allow_cplus_tests
+# This testcase cannot use runto_main because of the different prompt
+# we get when using annotation level 2.
+#
+require allow_cplus_tests target_can_use_run_cmd
 
 standard_testfile .cc
 
@@ -29,11 +32,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
     return -1
 }
 
-# This testcase cannot use runto_main because of the different prompt
-# we get when using annotation level 2.
-#
-require target_can_use_run_cmd
-
 #
 # line number where we need to stop in main
 #
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index b24500b8301..c24e8dbf5b6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index 7ac4ecb8600..0fa58f11d22 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -16,15 +16,14 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+# It requires fortran.
+require dwarf2_support allow_fortran_tests
 
 # This test can only be run on x86-64 targets.
 if {![istarget x86_64-*] || ![is_lp64_target]} {
     return 0
 }
 
-# It requires fortran.
-require allow_fortran_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
index 032aec86731..5213f461476 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -16,12 +16,11 @@
 # Check that GDB can call C++ functions whose parameters or return values have
 # type containing a static member of the same type.
 
-# Still no C++ compiler is used.
-require allow_cplus_tests
-
 load_lib dwarf.exp
+
+# Still no C++ compiler is used.
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_cplus_tests dwarf2_support
 
 standard_testfile .S -main.c
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index 2fae105cbc8..80e19fa0c10 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -25,10 +25,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 # Reuse many of the test source files from dw2-inline-header-1.exp.
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index 2494489549f..43fd46dcbcc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -53,10 +53,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 # Prepare and run the test.
 proc do_test { start_label func_name tag } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index bbc14d4a2f6..e0990c5d144 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -48,10 +48,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
     dw2-inline-header.c dw2-inline-header.h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index 682778479cb..bd445c511e5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -37,10 +37,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
     dw2-inline-header.c dw2-inline-header.h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 29598cb02e7..d338b96210a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -26,10 +26,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index fcde45f80a2..47167b664bc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -27,10 +27,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile -lbls.c .S \
     .c .h
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index d3dc4484073..f1c021605a6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -26,10 +26,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index d149efdca1c..1b3d083e8fc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -26,10 +26,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index 79e6de789aa..f1a18ef1dfd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -26,10 +26,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index 68696f0b634..3a88cfe9187 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -15,10 +15,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index 6cad9c32d61..e16490fa484 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -16,12 +16,11 @@
 # Check that GDB can call C++ functions whose parameters or return values have
 # type containing a static member of the same type.
 
-# Still no C++ compiler is used.
-require allow_cplus_tests
-
 load_lib dwarf.exp
+
+# Still no C++ compiler is used.
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_cplus_tests dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
index 888a20c23c5..978750f439f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
@@ -19,10 +19,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index c0a33b95b65..cd4d0406762 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -19,10 +19,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index 147e943361e..bd0a02c786f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -18,10 +18,8 @@ load_lib dwarf.exp
 # DW_AT_high_pc but with DW_AT_ranges instead.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index c3a1261d133..2e5369c48a8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
 # Test DW_AT_ranges in the context of a subprogram scope.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 proc do_test {suffix} {
     global gdb_test_file_name
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
index b9466eecd3b..bfbd1cd90c4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
@@ -22,10 +22,8 @@ load_lib dwarf.exp
 # instead.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index 75c6b874fc9..0795bd5accc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 # Test that psymbols are made when DW_AT_ranges is used.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile main.c .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
index 7845ea6a22a..8af77d1039b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
@@ -18,10 +18,8 @@ load_lib dwarf.exp
 # DW_AT_high_pc but with DW_AT_ranges instead.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c -2.c -3.c
 set asmfile [standard_output_file ${testfile}.s]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index a02e670c5b5..00dc9d52043 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -28,10 +28,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index be925887c05..37deefced8e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -15,10 +15,8 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # The .c files use __attribute__.
-require is_c_compiler_gcc
+require dwarf2_support is_c_compiler_gcc
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
index 95093c8529c..b819202ff5a 100644
--- a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
@@ -25,12 +25,10 @@
 # Because of (1), the test has to be written in assembly with explicit CFI
 # directives.
 
-# Check if starti command is supported.
-require !use_gdb_stub
-
 load_lib dwarf.exp
 
-require dwarf2_support
+# Check if starti command is supported.
+require !use_gdb_stub dwarf2_support
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 109fa4bdade..57fb6c19d3d 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index e6cd728d088..22dc3b596a5 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -16,9 +16,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp
index 8ab51b627ef..0857c756ac8 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-array.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp
@@ -16,12 +16,10 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global array whose location is a DW_OP_addr.
 
-require allow_cplus_tests
-
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_cplus_tests dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-array.S.
 standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp
index 19c6a8d8775..49c4ec93a43 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp
@@ -16,12 +16,10 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a DW_AT_const_value.
 
-require allow_cplus_tests
-
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_cplus_tests dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-const.S.
 standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp
index f0f1cd70048..9347181966b 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-global.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp
@@ -16,12 +16,10 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global variable whose location is a DW_OP_addr.
 
-require allow_cplus_tests
-
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_cplus_tests dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-global.S.
 standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
index 83427688d3e..a46a52227d6 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
@@ -16,12 +16,10 @@
 # Test a C++ reference marked with DW_OP_GNU_implicit_pointer.
 # The referenced value is a global struct whose location is a DW_OP_addr.
 
-require allow_cplus_tests
-
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_cplus_tests dwarf2_support
 
 # We'll place the output of Dwarf::assemble in implref-struct.S.
 standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
index 7e28931be22..f515283d629 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
@@ -22,12 +22,10 @@
 # on specific compiler versions or use of optimization switches, in
 # this case -flto.
 
-require allow_cplus_tests
-
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_cplus_tests dwarf2_support
 
 standard_testfile .c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index a5b301e26fb..beb72aaf5ca 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -48,13 +48,11 @@
 # Therefore, due to #2 above, this test case creates debug info
 # which is then used by a shared object.
 
-# This test can't be run on targets lacking shared library support.
-require allow_shlib_tests
-
 load_lib dwarf.exp
 
+# This test can't be run on targets lacking shared library support.
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
+require allow_shlib_tests dwarf2_support
 
 # gdb_test_file_name is the name of this file without the .exp
 # extension.  Use it to form basenames for the main program
diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
index 23f02df8513..544f2a5200d 100644
--- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
+++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-4 and use gas.
-require dwarf2_support
-
-require !use_gdb_stub
+require dwarf2_support !use_gdb_stub
 
 standard_testfile .c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index 9afad943d1c..ab546019f83 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index 1bcbbb44e94..a34814c78fd 100644
--- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile .cc -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index 22370de3d71..cc9f27fe810 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile main.c -dw4.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
index 945bc335fd4..2676cf351b4 100644
--- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
+++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile main.c .S
 
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index 96466e7afe5..8ca7510dab0 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index 72d7babc88e..8f3d24943ec 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange.exp
@@ -15,9 +15,7 @@
 load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-require allow_cplus_tests
+require dwarf2_support allow_cplus_tests
 
 standard_testfile method-ptr.cc -dw.S
 
diff --git a/gdb/testsuite/gdb.fortran/debug-expr.exp b/gdb/testsuite/gdb.fortran/debug-expr.exp
index cb141f5758e..9d8a915ffe7 100644
--- a/gdb/testsuite/gdb.fortran/debug-expr.exp
+++ b/gdb/testsuite/gdb.fortran/debug-expr.exp
@@ -15,11 +15,9 @@
 
 # Test "set debug expr 1" on Fortran expressions.
 
-require allow_fortran_tests
-
 # Test relies on checking gdb debug output. Do not run if gdb debug is
 # enabled as any debug will be redirected to the log.
-require !gdb_debug_enabled
+require allow_fortran_tests !gdb_debug_enabled
 
 standard_testfile .f90
 load_lib fortran.exp
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index 27224b5f96f..7b1fb0015a3 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -21,7 +21,7 @@ set MIFLAGS "-i=mi"
 standard_testfile
 
 # Support for XML is needed to run this test.
-require allow_xml_test
+require allow_xml_test can_spawn_for_attach
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
@@ -32,8 +32,6 @@ if [mi_gdb_start] {
     return
 }
 
-require can_spawn_for_attach
-
 set string_re {(?:[^\\"]|\\.)*}
 
 set id_re "id=\"$decimal\""
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp
index 5ca7c5dccc3..7104ca0dcf6 100644
--- a/gdb/testsuite/gdb.mi/mi-async.exp
+++ b/gdb/testsuite/gdb.mi/mi-async.exp
@@ -21,14 +21,11 @@
 # mi_run_cmd, it ignores whatever target the rest of GDB testsuite is
 # using, and always tries to run natively.  So, don't do anything unless
 # we're actually testing native.
-require isnative
+require isnative !use_gdb_stub
 if {![istarget *-linux*]} {
   return
 }
 
-# Check if start command is supported.
-require !use_gdb_stub
-
 # The plan is for async mode to become the default but toggle for now.
 set saved_gdbflags $GDBFLAGS
 set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""]
diff --git a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
index 91ca9b16bf8..fb43b69aa74 100644
--- a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
+++ b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp
@@ -30,15 +30,14 @@
 #   are using all-stop, or running, if we are using non-stop.
 
 # Do not run if gdb debug is enabled as it doesn't work for separate-mi-tty.
-require !gdb_debug_enabled
+# Multiple inferiors are needed, therefore only native gdb and extended
+# gdbserver modes are supported.
+require !use_gdb_stub !gdb_debug_enabled
 
 load_lib mi-support.exp
 
 standard_testfile
 
-# Multiple inferiors are needed, therefore only native gdb and extended
-# gdbserver modes are supported.
-require !use_gdb_stub
 
 set compile_options "debug pthreads"
 if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
index 1ef7984078a..e364f87db03 100644
--- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
+++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require allow_gdbserver_tests
-
-require can_spawn_for_attach
+require allow_gdbserver_tests can_spawn_for_attach
 
 if {[build_executable "build" $testfile $srcfile {debug}] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
index 109defa864a..a0c413702a5 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
@@ -18,11 +18,9 @@ set executable ${testfile}
 
 # Multiple inferiors are needed, therefore both native and extended gdbserver
 # modes are supported.  Only non-extended gdbserver is not supported.
-require !use_gdb_stub
-
 # Do not use simple hardware watchpoints ("watch") as its false hit may be
 # unnoticed by GDB if it reads it still has the same value.
-require allow_hw_watchpoint_access_tests
+require !use_gdb_stub allow_hw_watchpoint_access_tests
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp
index ad67303a7dd..67d55ed0d97 100644
--- a/gdb/testsuite/gdb.server/attach-flag.exp
+++ b/gdb/testsuite/gdb.server/attach-flag.exp
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-require allow_gdbserver_tests
-
-require can_spawn_for_attach
+require allow_gdbserver_tests can_spawn_for_attach
 
 # Start the test program, attach to it using gdbserver's --attach flag, connect
 # to it with GDB, check that what we see makes sense.
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp
index f7092b0340c..4d3e39ad66c 100644
--- a/gdb/testsuite/gdb.server/ext-attach.exp
+++ b/gdb/testsuite/gdb.server/ext-attach.exp
@@ -22,9 +22,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-require allow_gdbserver_tests
-
-require can_spawn_for_attach
+require allow_gdbserver_tests can_spawn_for_attach
 
 if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
     return -1
diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp
index 4c4f54d89be..cbc72955716 100644
--- a/gdb/testsuite/gdb.trace/change-loc.exp
+++ b/gdb/testsuite/gdb.trace/change-loc.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require allow_shlib_tests
-
-require gdb_trace_common_supports_arch
+require allow_shlib_tests gdb_trace_common_supports_arch
 
 standard_testfile
 set libfile1 "change-loc-1"
diff --git a/gdb/testsuite/gdb.trace/ftrace-lock.exp b/gdb/testsuite/gdb.trace/ftrace-lock.exp
index b795d6d4011..90fcd15f7a8 100644
--- a/gdb/testsuite/gdb.trace/ftrace-lock.exp
+++ b/gdb/testsuite/gdb.trace/ftrace-lock.exp
@@ -14,7 +14,8 @@
 
 load_lib "trace-support.exp"
 
-require allow_shlib_tests
+# Check that the target supports trace.
+require allow_shlib_tests gdb_trace_common_supports_arch
 
 standard_testfile
 set executable $testfile
@@ -30,8 +31,6 @@ set additional_flags [gdb_target_symbol_prefix_flags]
 set options [list debug [gdb_target_symbol_prefix_flags] \
 	     additional_flags=-DNUM_THREADS=$NUM_THREADS]
 
-# Check that the target supports trace.
-require gdb_trace_common_supports_arch
 if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
     untested "failed to compile"
     return -1
diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
index 1e38bd7bc1b..f57da4aef9b 100644
--- a/gdb/testsuite/gdb.trace/ftrace.exp
+++ b/gdb/testsuite/gdb.trace/ftrace.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require allow_shlib_tests
+require allow_shlib_tests gdb_trace_common_supports_arch
 
 standard_testfile
 set executable $testfile
@@ -23,8 +23,6 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-require gdb_trace_common_supports_arch
-
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug $additional_flags]] {
     return -1
diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
index cdd28cb6f96..30c4ff4876f 100644
--- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
+++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
@@ -15,8 +15,7 @@
 
 load_lib trace-support.exp
 
-require allow_shlib_tests
-require gdb_trace_common_supports_arch
+require allow_shlib_tests gdb_trace_common_supports_arch
 
 standard_testfile pending.c
 set libfile1 "pendshr1"
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index 76d28652820..bc93b8bb097 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -14,9 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require allow_shlib_tests
-
-require gdb_trace_common_supports_arch
+require allow_shlib_tests gdb_trace_common_supports_arch
 
 standard_testfile
 set libfile1 "pendshr1"
diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
index 32ebf5a376a..6c42bcb4cc5 100644
--- a/gdb/testsuite/gdb.trace/trace-condition.exp
+++ b/gdb/testsuite/gdb.trace/trace-condition.exp
@@ -14,7 +14,7 @@
 
 load_lib "trace-support.exp"
 
-require allow_shlib_tests
+require allow_shlib_tests gdb_trace_common_supports_arch
 
 standard_testfile
 set executable $testfile
@@ -23,8 +23,6 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set additional_flags [gdb_target_symbol_prefix_flags]
 
-require gdb_trace_common_supports_arch
-
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
 	[list debug $additional_flags]] {
     return -1
diff --git a/gdb/testsuite/gdb.trace/trace-enable-disable.exp b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
index 184d2758b5e..4358eb08c5a 100644
--- a/gdb/testsuite/gdb.trace/trace-enable-disable.exp
+++ b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
@@ -14,7 +14,8 @@
 
 load_lib "trace-support.exp"
 
-require allow_shlib_tests
+# Check that the target supports trace.
+require allow_shlib_tests gdb_trace_common_supports_arch
 
 standard_testfile
 set executable $testfile
@@ -23,8 +24,6 @@ set expfile $testfile.exp
 # Some targets have leading underscores on assembly symbols.
 set options [list debug [gdb_target_symbol_prefix_flags]]
 
-# Check that the target supports trace.
-require gdb_trace_common_supports_arch
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
     untested "failed to compile"
     return -1
-- 
2.39.0


^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 08/79] Use require skip_cplus_tests
  2023-01-12  2:59 ` [PATCH v2 08/79] Use require skip_cplus_tests Tom Tromey
@ 2023-01-12  3:56   ` Kevin Buettner
  0 siblings, 0 replies; 91+ messages in thread
From: Kevin Buettner @ 2023-01-12  3:56 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Wed, 11 Jan 2023 19:59:41 -0700
Tom Tromey <tom@tromey.com> wrote:

> This changes some tests to use "require skip_cplus_tests".

Well, technically, it's "require !skip_cplus_tests".

E.g...

> diff --git a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
> index 181ab334be5..ef60fc67951 100644
> --- a/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
> +++ b/gdb/testsuite/gdb.base/advance-until-multiple-locations.exp
> @@ -18,7 +18,7 @@
>  
>  standard_testfile .cc
>  
> -if { [skip_cplus_tests] } { continue }
> +require !skip_cplus_tests
>  
>  if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
>  	  {debug c++}] } {

It appears that the rest of the "Use require_skip..." patches have
similar commit messages.

I apologize for missing this while reviewing the earlier series.  I
don't think it's necessary to post a new series with adjusted
messages.

Kevin


^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 00/79] Rewrite "require" test procedure and use it more often
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (78 preceding siblings ...)
  2023-01-12  3:00 ` [PATCH v2 79/79] Consolidate calls to require Tom Tromey
@ 2023-01-12  4:45 ` Kevin Buettner
  2023-01-13  3:51   ` Tom Tromey
  2023-01-13 20:18 ` Tom Tromey
  80 siblings, 1 reply; 91+ messages in thread
From: Kevin Buettner @ 2023-01-12  4:45 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

I've looked at each patch in this series, but only skimmed the ones
with obviously mechanical changes.  I did look more closely at the
parts  (in later patches) which changed testsuite/lib/gdb.exp.

In addition to the nits that I found regarding the "Use require skip_..."
commits, the same nits apply to the "Use require use_gdb_stub" and
"Use require gdb_debug_enable" commits.  E.g. for the "Use require
use_gdb_stub" commit, the message says:

    This changes some tests to use "require use_gdb_stub".

...but the actual require statements are all of the form:

    require !use_gdb_stub

I like the use of "gdb --configuration" for determining whether GDB
has certain features (e.g. tui, guile, python).

Aside from the nits mentioned above, LGTM.

Kevin


^ permalink raw reply	[flat|nested] 91+ messages in thread

* RE: [PATCH v2 57/79] Rename to allow_btrace_tests
  2023-01-12  3:00 ` [PATCH v2 57/79] Rename to allow_btrace_tests Tom Tromey
@ 2023-01-12  6:39   ` Metzger, Markus T
  0 siblings, 0 replies; 91+ messages in thread
From: Metzger, Markus T @ 2023-01-12  6:39 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

>This changes skip_btrace_tests to invert the sense, and renames it to
>allow_btrace_tests.
>---
> gdb/testsuite/gdb.btrace/buffer-size.exp      |  2 +-
> gdb/testsuite/gdb.btrace/data.exp             |  2 +-
> gdb/testsuite/gdb.btrace/delta.exp            |  2 +-
> gdb/testsuite/gdb.btrace/dlopen.exp           |  2 +-
> .../gdb.btrace/enable-new-thread.exp          |  2 +-
> gdb/testsuite/gdb.btrace/enable-running.exp   |  2 +-
> gdb/testsuite/gdb.btrace/enable.exp           |  2 +-
> gdb/testsuite/gdb.btrace/exception.exp        |  2 +-
> .../gdb.btrace/function_call_history.exp      |  2 +-
> gdb/testsuite/gdb.btrace/gcore.exp            |  2 +-
> .../gdb.btrace/instruction_history.exp        |  2 +-
> gdb/testsuite/gdb.btrace/multi-inferior.exp   |  2 +-
> .../gdb.btrace/multi-thread-step.exp          |  2 +-
> gdb/testsuite/gdb.btrace/nohist.exp           |  2 +-
> gdb/testsuite/gdb.btrace/non-stop.exp         |  2 +-
> gdb/testsuite/gdb.btrace/reconnect.exp        |  2 +-
> gdb/testsuite/gdb.btrace/record_goto-step.exp |  2 +-
> gdb/testsuite/gdb.btrace/record_goto.exp      |  2 +-
> gdb/testsuite/gdb.btrace/rn-dl-bind.exp       |  2 +-
> gdb/testsuite/gdb.btrace/segv.exp             |  2 +-
> gdb/testsuite/gdb.btrace/step.exp             |  2 +-
> gdb/testsuite/gdb.btrace/stepi.exp            |  2 +-
> gdb/testsuite/gdb.btrace/tailcall-only.exp    |  2 +-
> gdb/testsuite/gdb.btrace/tailcall.exp         |  2 +-
> .../gdb.btrace/unknown_functions.exp          |  2 +-
> gdb/testsuite/gdb.btrace/vdso.exp             |  2 +-
> .../gdb.python/py-record-btrace-threads.exp   |  2 +-
> gdb/testsuite/gdb.python/py-record-btrace.exp |  2 +-
> gdb/testsuite/lib/gdb.exp                     | 30 +++++++++----------
> 29 files changed, 43 insertions(+), 43 deletions(-)

Looks good to me.

Thanks,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 00/79] Rewrite "require" test procedure and use it more often
  2023-01-12  4:45 ` [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Kevin Buettner
@ 2023-01-13  3:51   ` Tom Tromey
  0 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-13  3:51 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: Tom Tromey, gdb-patches

>>>>> "Kevin" == Kevin Buettner <kevinb@redhat.com> writes:

Kevin> In addition to the nits that I found regarding the "Use require skip_..."
Kevin> commits, the same nits apply to the "Use require use_gdb_stub" and
Kevin> "Use require gdb_debug_enable" commits.

I fixed up all these commit messages.
I'll push it sometime soon.

Tom

^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 79/79] Consolidate calls to require
  2023-01-12  3:00 ` [PATCH v2 79/79] Consolidate calls to require Tom Tromey
@ 2023-01-13 12:48   ` Pedro Alves
  2023-01-13 14:07     ` Tom Tromey
  0 siblings, 1 reply; 91+ messages in thread
From: Pedro Alves @ 2023-01-13 12:48 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

Hi Tom,

Thanks much for this series.  It's a nice improvement.

I have a comment below.

On 2023-01-12 3:00 a.m., Tom Tromey wrote:
> The previous transforms left some files with multiple calls to
> "require" near the top.  This patch consolidates these to the extent
> possible.  (There are a couple of files that call "require" later,
> after running some tests.  These have been left alone.)


> 
> diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
> index 73cbdaf90ca..c7b65098208 100644
> --- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
> +++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
> @@ -13,12 +13,10 @@
>  # You should have received a copy of the GNU General Public License
>  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
>  
> -require allow_shlib_tests
> +require allow_shlib_tests allow_ada_tests
>  
>  load_lib "ada.exp"
>  
> -require allow_ada_tests
> -
>  standard_ada_testfile foo
>  
>  set srcfile2 [file join [file dirname $srcfile] some_package.adb]
> diff --git a/gdb/testsuite/gdb.ada/dynamic-iface.exp b/gdb/testsuite/gdb.ada/dynamic-iface.exp
> index 431fa29d64f..b523968194a 100644
> --- a/gdb/testsuite/gdb.ada/dynamic-iface.exp
> +++ b/gdb/testsuite/gdb.ada/dynamic-iface.exp
> @@ -15,9 +15,7 @@
>  
>  load_lib "ada.exp"
>  
> -require allow_ada_tests
> -
> -require gnat_runtime_has_debug_info
> +require allow_ada_tests gnat_runtime_has_debug_info
>  
>  standard_ada_testfile main
>  
> diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp
> index 9e69d136e31..087d1ac9b3d 100644
> --- a/gdb/testsuite/gdb.ada/exec_changed.exp
> +++ b/gdb/testsuite/gdb.ada/exec_changed.exp
> @@ -15,11 +15,9 @@
>  
>  load_lib "ada.exp"
>  
> -require allow_ada_tests
> -
>  # This testcase verifies the behavior of the `start' command, which
>  # does not work when we use the gdb stub...
> -require !use_gdb_stub
> +require allow_ada_tests !use_gdb_stub
>  
>  standard_ada_testfile first


> --- a/gdb/testsuite/gdb.ada/start.exp
> +++ b/gdb/testsuite/gdb.ada/start.exp
> @@ -15,11 +15,9 @@
>  
>  load_lib "ada.exp"
>  
> -require allow_ada_tests
> -
>  # This testcase verifies the behavior of the `start' command, which
>  # does not work when we use the gdb stub...
> -require !use_gdb_stub
> +require allow_ada_tests !use_gdb_stub
>  

...

>  standard_ada_testfile dummy
>  
> diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp
> index f45a6509da5..a842ed2b6ba 100644



> index fb56d2602b1..970f44da21c 100644
> --- a/gdb/testsuite/gdb.base/async-shell.exp
> +++ b/gdb/testsuite/gdb.base/async-shell.exp
> @@ -15,10 +15,8 @@
>  
>  standard_testfile
>  
> -require support_displaced_stepping
> -
>  # The testfile uses "run".  The real bug happened only for ![is_remote target].
> -require !use_gdb_stub
> +require support_displaced_stepping !use_gdb_stub

I'm not really sure consolidation when we have a comment describing each "require" line
before is an improvement.  For example, above, it was clear before that the use_gdb_stub
requirement was related to "run".  Afterwards, it is not clear whether the 
support_displaced_stepping check is related to the comment.


>  

> --- a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
> +++ b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
> @@ -20,11 +20,9 @@
>  # 'set detach-on-fork [on,off]' are the correct ones.
>  
>  # This test relies on "run", so it cannot run on target remote stubs.
> -require !use_gdb_stub
> -
>  # Test relies on checking follow-fork output. Do not run if gdb debug is
>  # enabled as it will be redirected to the log.
> -require !gdb_debug_enabled
> +require !use_gdb_stub !gdb_debug_enabled
>  

Here similarly.  Having a require line connected to the comment as before
seemed better to me, as it's more localized, it's obvious to which require
expression the comment is refering to.  If we always merge, then I fear that
connection will be lost in some less obvious cases.

> diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
> index aaaa134007b..913203ecfb9 100644
> --- a/gdb/testsuite/gdb.base/solib-display.exp
> +++ b/gdb/testsuite/gdb.base/solib-display.exp
> @@ -28,8 +28,6 @@
>  # (and thus aren't affected by shared library unloading) are not
>  # disabled prematurely.
>  
> -require allow_shlib_tests
> -
>  # This test is currently not supported for stub targets, because it uses the
>  # start command (through gdb_start_cmd).  In theory, it could be changed to
>  # use something else (kill + gdb_run_cmd with a manual breakpoint at main).
> @@ -43,7 +41,7 @@ require allow_shlib_tests
>  # This is because the initial stop is done before the shared libraries are
>  # loaded.
>  
> -require !use_gdb_stub
> +require allow_shlib_tests !use_gdb_stub
>  

Here too.  Etc.

>  # Library file.
>  set libname "solib-display-lib"
> diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp
> index dd0724909ad..f5d94798f9d 100644
> --- a/gdb/testsuite/gdb.base/solib-nodir.exp
> +++ b/gdb/testsuite/gdb.base/solib-nodir.exp
> @@ -13,18 +13,16 @@
>  # You should have received a copy of the GNU General Public License
>  # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
> -require allow_shlib_tests
> +# We need to be able to influence the target's environment and working
> +# directory.  Can't do that if when we connect the inferior is already
> +# running.
> +require allow_shlib_tests !use_gdb_stub
>  
>  # The testcase assumes the target can access the OBJDIR.
>  if [is_remote target] {
>      return
>  }
>  
> -# We need to be able to influence the target's environment and working
> -# directory.  Can't do that if when we connect the inferior is already
> -# running.
> -require !use_gdb_stub

Ditto.  The connection between "already running" and use_gdb_stub ends up
diluted.

Same for the rest of patch where we have comments for each require.

^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 79/79] Consolidate calls to require
  2023-01-13 12:48   ` Pedro Alves
@ 2023-01-13 14:07     ` Tom Tromey
  2023-01-13 14:45       ` Pedro Alves
  0 siblings, 1 reply; 91+ messages in thread
From: Tom Tromey @ 2023-01-13 14:07 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tom Tromey, gdb-patches

>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:

>> -require support_displaced_stepping
>> -
>> # The testfile uses "run".  The real bug happened only for ![is_remote target].
>> -require !use_gdb_stub
>> +require support_displaced_stepping !use_gdb_stub

Pedro> I'm not really sure consolidation when we have a comment describing each "require" line
Pedro> before is an improvement.  For example, above, it was clear before that the use_gdb_stub
Pedro> requirement was related to "run".  Afterwards, it is not clear whether the 
Pedro> support_displaced_stepping check is related to the comment.

TBH I think the comments should generally just be removed, because the
"require" line seems like sufficient explanation to me.  WDYT?

Tom

^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 79/79] Consolidate calls to require
  2023-01-13 14:07     ` Tom Tromey
@ 2023-01-13 14:45       ` Pedro Alves
  2023-01-13 19:13         ` Tom Tromey
  0 siblings, 1 reply; 91+ messages in thread
From: Pedro Alves @ 2023-01-13 14:45 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On 2023-01-13 2:07 p.m., Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:
> 
>>> -require support_displaced_stepping
>>> -
>>> # The testfile uses "run".  The real bug happened only for ![is_remote target].
>>> -require !use_gdb_stub
>>> +require support_displaced_stepping !use_gdb_stub
> 
> Pedro> I'm not really sure consolidation when we have a comment describing each "require" line
> Pedro> before is an improvement.  For example, above, it was clear before that the use_gdb_stub
> Pedro> requirement was related to "run".  Afterwards, it is not clear whether the 
> Pedro> support_displaced_stepping check is related to the comment.
> 
> TBH I think the comments should generally just be removed, because the
> "require" line seems like sufficient explanation to me.  WDYT?

I maybe agree in some cases, but not in general.  The reason for using use_gdb_stub is
not always obvious.  For example, see the comments on gdb.base/solib-display.exp.

Here's another example, this one from gdb.base/fork-print-inferior-events.exp.
Before your patch, we have:

  # This test relies on "run", so it cannot run on target remote stubs.
 require !use_gdb_stub

  # Test relies on checking follow-fork output. Do not run if gdb debug is
  # enabled as it will be redirected to the log.
 require !gdb_debug_enabled

which look better to me than this, after your patch:

 # This test relies on "run", so it cannot run on target remote stubs.
 # Test relies on checking follow-fork output. Do not run if gdb debug is
 # enabled as it will be redirected to the log.
 require !use_gdb_stub !gdb_debug_enabled

as with the latter you have to think about which expression matches each
part of the comment, and vice versa.  Is the sentence in the middle connected
to use_gdb_stub, or to gdb_debug_enabled?  We lose the comment-expression locality.

(Also, the comment about gdb_debug_enabled is far from obvious, IMO.)

I just would not like to enforce an unwritten rule that we should always
consolidate require calls.

Is there an advantage of consolidation in these cases?

^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 79/79] Consolidate calls to require
  2023-01-13 14:45       ` Pedro Alves
@ 2023-01-13 19:13         ` Tom Tromey
  0 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-13 19:13 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tom Tromey, gdb-patches

Pedro> I just would not like to enforce an unwritten rule that we should always
Pedro> consolidate require calls.

Pedro> Is there an advantage of consolidation in these cases?

Not really.
I think that rather than deal with this patch, I'll just drop it.  It's
not needed for anything.

thanks,
Tom

^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 00/79] Rewrite "require" test procedure and use it more often
  2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
                   ` (79 preceding siblings ...)
  2023-01-12  4:45 ` [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Kevin Buettner
@ 2023-01-13 20:18 ` Tom Tromey
  80 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-13 20:18 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> Regression tested on x86-64 Fedora 36.  This is the sort of patch that
Tom> has to be regression tested after each rebase, because other patches
Tom> may introduce new uses of the removed procs.  Also it perhaps should
Tom> be tested on other platforms.

I dropped the final patch, rebased this, and re-regression tested it.
I'm checking it in now.

thanks,
Tom

^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 77/79] Rename to allow_guile_tests
  2023-01-12  3:00 ` [PATCH v2 77/79] Rename to allow_guile_tests Tom Tromey
@ 2023-01-14 16:22   ` Tom de Vries
  2023-01-14 19:50     ` Tom Tromey
  0 siblings, 1 reply; 91+ messages in thread
From: Tom de Vries @ 2023-01-14 16:22 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 1/12/23 04:00, Tom Tromey wrote:
> +gdb_caching_proc allow_guile_tests {
> +    set output [exec $::GDB --configuration]
> +    return [expr {[string first "--with-guile" $output] != -1}]
>   }

I'm running into ERRORs here:
...
(gdb) PASS: gdb.base/gdb-caching-proc.exp: gnat_runtime_has_debug_info: 
consistency
ERROR: tcl error sourcing 
/home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/gdb-caching-proc.exp.
ERROR: This GDB was configured as follows:
   ...
Python Exception <class 'ModuleNotFoundError'>: No module named 'gdb'
/home/vries/gdb_versions/devel/build/gdb/testsuite/../../gdb/gdb: warning:
Could not load the Python gdb module from 
`/home/vries/gdb_versions/devel/install/share/gdb/p\
ython'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
Exception caught while booting Guile.

/home/vries/gdb_versions/devel/build/gdb/testsuite/../../gdb/gdb: 
warning: Could not complete\
  Guile gdb module initialization from:
/home/vries/gdb_versions/devel/install/share/gdb/guile/gdb/boot.scm.
Limited Guile support is available.
Suggest passing --data-directory=/path/to/gdb/data-directory.
...

Looks like GDB_INTERNALFLAGS are missing, at least the bit which would 
point to the data-directory.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 91+ messages in thread

* Re: [PATCH v2 77/79] Rename to allow_guile_tests
  2023-01-14 16:22   ` Tom de Vries
@ 2023-01-14 19:50     ` Tom Tromey
  0 siblings, 0 replies; 91+ messages in thread
From: Tom Tromey @ 2023-01-14 19:50 UTC (permalink / raw)
  To: Tom de Vries; +Cc: Tom Tromey, gdb-patches

Tom> I'm running into ERRORs here:

Tom> Looks like GDB_INTERNALFLAGS are missing, at least the bit which would
Tom> point to the data-directory.

I pushed a fix for this.

I didn't see the failure because I had used "make install" and so, I
think, gdb was picking up the install tree.  Removing my install tree
let me reproduce the failure.

Tom

^ permalink raw reply	[flat|nested] 91+ messages in thread

end of thread, other threads:[~2023-01-14 19:50 UTC | newest]

Thread overview: 91+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
2023-01-12  2:59 ` [PATCH v2 01/79] Don't use ensure_gdb_index with require Tom Tromey
2023-01-12  2:59 ` [PATCH v2 02/79] Change 'require' to accept a list of predicates Tom Tromey
2023-01-12  2:59 ` [PATCH v2 03/79] Use unsupported in 'require' Tom Tromey
2023-01-12  2:59 ` [PATCH v2 04/79] Use require supports_reverse Tom Tromey
2023-01-12  2:59 ` [PATCH v2 05/79] Use require supports_process_record Tom Tromey
2023-01-12  2:59 ` [PATCH v2 06/79] Use require dwarf2_support Tom Tromey
2023-01-12  2:59 ` [PATCH v2 07/79] Use require is_x86_like_target Tom Tromey
2023-01-12  2:59 ` [PATCH v2 08/79] Use require skip_cplus_tests Tom Tromey
2023-01-12  3:56   ` Kevin Buettner
2023-01-12  2:59 ` [PATCH v2 09/79] Use require skip_shlib_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 10/79] Use require skip_dlmopen_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 11/79] Use require skip_stl_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 12/79] Use require skip_rust_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 13/79] Use require skip_fortran_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 14/79] Use require skip_ada_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 15/79] Use require skip_go_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 16/79] Use require skip_d_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 17/79] Use require skip_ctf_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 18/79] Use require skip_hw_watchpoint_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 19/79] Use require skip_ifunc_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 20/79] Use require skip_aarch64_sve_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 21/79] Use require skip_btrace_pt_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 22/79] Use require skip_btrace_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 23/79] Use require skip_avx_* Tom Tromey
2023-01-12  2:59 ` [PATCH v2 24/79] Use require support_displaced_stepping Tom Tromey
2023-01-12  2:59 ` [PATCH v2 25/79] Use require is_aarch64_target Tom Tromey
2023-01-12  2:59 ` [PATCH v2 26/79] Use require is_aarch32_target Tom Tromey
2023-01-12  3:00 ` [PATCH v2 27/79] Use require is_amd64_regs_target Tom Tromey
2023-01-12  3:00 ` [PATCH v2 28/79] Use require is_elf_target Tom Tromey
2023-01-12  3:00 ` [PATCH v2 29/79] Use require can_single_step_to_signal_handler Tom Tromey
2023-01-12  3:00 ` [PATCH v2 30/79] Use require supports_get_siginfo_type Tom Tromey
2023-01-12  3:00 ` [PATCH v2 31/79] Use require support_go_compile Tom Tromey
2023-01-12  3:00 ` [PATCH v2 32/79] Use require use_gdb_stub Tom Tromey
2023-01-12  3:00 ` [PATCH v2 33/79] Use require can_spawn_for_attach Tom Tromey
2023-01-12  3:00 ` [PATCH v2 34/79] Use require isnative Tom Tromey
2023-01-12  3:00 ` [PATCH v2 35/79] Use require skip_gdbserver_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 36/79] Use require skip_shlib_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 37/79] Use require is_c_compiler_gcc Tom Tromey
2023-01-12  3:00 ` [PATCH v2 38/79] Use require gdb_debug_enabled Tom Tromey
2023-01-12  3:00 ` [PATCH v2 39/79] Use require gdb_skip_xml_test Tom Tromey
2023-01-12  3:00 ` [PATCH v2 40/79] Use require gdb_trace_common_supports_arch Tom Tromey
2023-01-12  3:00 ` [PATCH v2 41/79] Use require skip_perf_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 42/79] Use require skip_opencl_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 43/79] Use require target_can_use_run_cmd Tom Tromey
2023-01-12  3:00 ` [PATCH v2 44/79] Use require using_fission Tom Tromey
2023-01-12  3:00 ` [PATCH v2 45/79] Use require skip_debuginfod_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 46/79] Use require gnat_runtime_has_debug_info Tom Tromey
2023-01-12  3:00 ` [PATCH v2 47/79] Rewrite skip_python_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 48/79] Remove mi_skip_python_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 49/79] Fix latent bug in default_prompt_gdb_start Tom Tromey
2023-01-12  3:00 ` [PATCH v2 50/79] Use "require" for Python tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 51/79] Rename to allow_xml_test Tom Tromey
2023-01-12  3:00 ` [PATCH v2 52/79] Rename to allow_aarch64_sve_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 53/79] Rename to allow_ada_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 54/79] Rename to allow_avx512bf16_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 55/79] Rename to allow_avx512fp16_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 56/79] Rename to allow_btrace_pt_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 57/79] Rename to allow_btrace_tests Tom Tromey
2023-01-12  6:39   ` Metzger, Markus T
2023-01-12  3:00 ` [PATCH v2 58/79] Rename to allow_cplus_tests and allow_stl_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 59/79] Rename to allow_ctf_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 60/79] Rename to allow_debuginfod_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 61/79] Rename to allow_dlmopen_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 62/79] Rename to allow_d_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 63/79] Rename to allow_fortran_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 64/79] Rename to allow_gdbserver_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 65/79] Rename to allow_go_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 66/79] Rename to allow_hw_watchpoint_access_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 67/79] Rename to allow_hw_watchpoint_multi_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 68/79] Rename to allow_hw_watchpoint_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 69/79] Rename to allow_ifunc_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 70/79] Rename to allow_opencl_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 71/79] Rename to allow_perf_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 72/79] Rename to allow_python_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 73/79] Rename to allow_rust_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 74/79] Rename to allow_shlib_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 75/79] Rename to allow_tsx_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 76/79] Rename to allow_hw_breakpoint_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 77/79] Rename to allow_guile_tests Tom Tromey
2023-01-14 16:22   ` Tom de Vries
2023-01-14 19:50     ` Tom Tromey
2023-01-12  3:00 ` [PATCH v2 78/79] Rename to allow_tui_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 79/79] Consolidate calls to require Tom Tromey
2023-01-13 12:48   ` Pedro Alves
2023-01-13 14:07     ` Tom Tromey
2023-01-13 14:45       ` Pedro Alves
2023-01-13 19:13         ` Tom Tromey
2023-01-12  4:45 ` [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Kevin Buettner
2023-01-13  3:51   ` Tom Tromey
2023-01-13 20:18 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).