* [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 +---
| 4 +---
| 4 +---
| 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]} {
--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] {
--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] {
--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 +-
| 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 +-
| 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
--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
--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 na