[v2,5/9] Use require with istarget

Message ID 20230124230243.2471957-6-tom@tromey.com
State Committed
Headers
Series Use 'require' even more |

Commit Message

Tom Tromey Jan. 24, 2023, 11:02 p.m. UTC
  This changes many tests to use require when checking 'istarget'.  A
few of these conversions were already done in earlier patches.

No change was needed to 'require' to make this work, due to the way it
is written.  I think the result looks pretty clear, and it has the
bonus of helping to ensure that the reason that a test is skipped is
always logged.
---
 gdb/testsuite/gdb.arch/aix-sighandle.exp         |  4 +---
 gdb/testsuite/gdb.arch/alpha-step.exp            |  5 +----
 gdb/testsuite/gdb.arch/altivec-abi.exp           |  5 +----
 gdb/testsuite/gdb.arch/altivec-regs.exp          |  5 +----
 .../gdb.arch/amd64-break-on-asm-line.exp         |  4 +---
 gdb/testsuite/gdb.arch/amd64-byte.exp            |  6 +-----
 gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp   | 10 +---------
 gdb/testsuite/gdb.arch/amd64-disp-step.exp       |  5 +----
 gdb/testsuite/gdb.arch/amd64-dword.exp           |  6 +-----
 .../gdb.arch/amd64-entry-value-inline.exp        |  5 ++---
 .../gdb.arch/amd64-entry-value-param-dwarf5.exp  |  5 ++---
 .../gdb.arch/amd64-entry-value-paramref.exp      |  5 +----
 gdb/testsuite/gdb.arch/amd64-entry-value.exp     |  5 ++---
 gdb/testsuite/gdb.arch/amd64-eval.exp            |  5 +----
 .../gdb.arch/amd64-invalid-stack-middle.exp      |  5 +----
 .../gdb.arch/amd64-invalid-stack-top.exp         |  6 ++----
 gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp |  5 ++---
 gdb/testsuite/gdb.arch/amd64-osabi.exp           |  6 +-----
 gdb/testsuite/gdb.arch/amd64-prologue-skip.exp   |  5 +----
 gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp    |  5 ++---
 .../gdb.arch/amd64-stap-expressions.exp          |  5 +----
 .../gdb.arch/amd64-stap-special-operands.exp     |  5 +----
 .../gdb.arch/amd64-stap-wrong-subexp.exp         |  5 +----
 gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp    |  5 ++---
 gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp  |  5 ++---
 gdb/testsuite/gdb.arch/amd64-tailcall-self.exp   |  5 +----
 gdb/testsuite/gdb.arch/amd64-word.exp            |  6 +-----
 gdb/testsuite/gdb.arch/arc-analyze-prologue.exp  |  5 +----
 gdb/testsuite/gdb.arch/arc-decode-insn.exp       |  5 +----
 .../gdb.arch/arc-disassembler-options.exp        |  5 +----
 gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp      |  4 +---
 .../gdb.arch/arm-disassembler-options.exp        |  5 +----
 gdb/testsuite/gdb.arch/avr-flash-qualifier.exp   |  5 +----
 gdb/testsuite/gdb.arch/e500-abi.exp              |  6 +-----
 gdb/testsuite/gdb.arch/e500-prologue.exp         |  6 +-----
 gdb/testsuite/gdb.arch/e500-regs.exp             |  6 +-----
 gdb/testsuite/gdb.arch/gdb1291.exp               |  6 +-----
 gdb/testsuite/gdb.arch/gdb1431.exp               |  6 +-----
 gdb/testsuite/gdb.arch/gdb1558.exp               |  6 +-----
 gdb/testsuite/gdb.arch/i386-avx.exp              |  5 +----
 gdb/testsuite/gdb.arch/i386-mpx-call.exp         |  9 +--------
 gdb/testsuite/gdb.arch/i386-mpx-map.exp          |  9 +--------
 gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp      |  9 +--------
 gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp  |  9 +--------
 gdb/testsuite/gdb.arch/i386-mpx.exp              |  9 +--------
 .../i386-prologue-skip-cf-protection.exp         |  5 +----
 .../gdb.arch/ia64-breakpoint-shadow.exp          |  5 +----
 gdb/testsuite/gdb.arch/iwmmxt-regs.exp           |  5 +----
 .../gdb.arch/mips-disassembler-options.exp       |  5 +----
 gdb/testsuite/gdb.arch/mips-fcr.exp              |  5 +----
 gdb/testsuite/gdb.arch/mips-fpregset-core.exp    |  5 +----
 gdb/testsuite/gdb.arch/mips-octeon-bbit.exp      |  4 +---
 gdb/testsuite/gdb.arch/mips16-thunks.exp         |  5 +----
 gdb/testsuite/gdb.arch/powerpc-addpcis.exp       |  5 +----
 gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp  |  5 +----
 gdb/testsuite/gdb.arch/powerpc-altivec.exp       |  5 +----
 gdb/testsuite/gdb.arch/powerpc-altivec2.exp      |  5 +----
 gdb/testsuite/gdb.arch/powerpc-altivec3.exp      |  5 +----
 gdb/testsuite/gdb.arch/powerpc-d128-regs.exp     |  5 +----
 .../gdb.arch/powerpc-disassembler-options.exp    |  5 +----
 gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp   |  5 +----
 gdb/testsuite/gdb.arch/powerpc-htm-regs.exp      |  5 +----
 gdb/testsuite/gdb.arch/powerpc-lnia.exp          |  5 +----
 gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp   |  6 +-----
 gdb/testsuite/gdb.arch/powerpc-power10.exp       |  5 +----
 gdb/testsuite/gdb.arch/powerpc-power7.exp        |  5 +----
 gdb/testsuite/gdb.arch/powerpc-power8.exp        |  5 +----
 gdb/testsuite/gdb.arch/powerpc-power9.exp        |  5 +----
 gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp      |  5 +----
 .../gdb.arch/powerpc-prologue-frame.exp          |  5 +----
 gdb/testsuite/gdb.arch/powerpc-prologue.exp      |  5 +----
 gdb/testsuite/gdb.arch/powerpc-stackless.exp     |  5 +----
 gdb/testsuite/gdb.arch/powerpc-tar.exp           |  5 +----
 gdb/testsuite/gdb.arch/powerpc-vector-regs.exp   |  6 +-----
 gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp     |  6 +-----
 gdb/testsuite/gdb.arch/powerpc-vsx.exp           |  5 +----
 gdb/testsuite/gdb.arch/powerpc-vsx2.exp          |  5 +----
 gdb/testsuite/gdb.arch/powerpc-vsx3.exp          |  5 +----
 gdb/testsuite/gdb.arch/powerpc64-prologue.exp    |  5 +----
 gdb/testsuite/gdb.arch/ppc-dfp.exp               |  5 +----
 gdb/testsuite/gdb.arch/ppc-fp.exp                |  5 +----
 gdb/testsuite/gdb.arch/ppc-longdouble.exp        |  5 +----
 gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp     |  6 +-----
 gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp  |  5 +----
 .../gdb.arch/ppc64-isa207-atomic-inst.exp        |  5 +----
 gdb/testsuite/gdb.arch/riscv-bp-infcall.exp      |  5 +----
 gdb/testsuite/gdb.arch/riscv-default-tdesc.exp   |  5 +----
 gdb/testsuite/gdb.arch/riscv-info-fcsr.exp       |  7 +------
 gdb/testsuite/gdb.arch/riscv-reg-aliases.exp     |  5 +----
 gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp   |  5 +----
 gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp      |  5 +----
 .../gdb.arch/riscv-unwind-long-insn.exp          |  5 +----
 .../riscv64-unwind-prologue-with-ld-lw.exp       |  5 +----
 .../gdb.arch/riscv64-unwind-prologue-with-mv.exp |  5 +----
 gdb/testsuite/gdb.arch/s390-multiarch.exp        |  6 +-----
 gdb/testsuite/gdb.arch/s390-stackless.exp        |  5 +----
 gdb/testsuite/gdb.arch/sparc-sysstep.exp         |  4 +---
 gdb/testsuite/gdb.arch/sparc64-adi.exp           |  5 +----
 gdb/testsuite/gdb.arch/sparc64-regs.exp          |  5 +----
 gdb/testsuite/gdb.arch/thumb2-it.exp             |  5 +----
 gdb/testsuite/gdb.arch/vsx-regs.exp              |  6 +-----
 gdb/testsuite/gdb.arch/vsx-vsr-float28.exp       |  6 +-----
 gdb/testsuite/gdb.base/overlays.exp              | 12 +-----------
 gdb/testsuite/gdb.disasm/am33.exp                |  5 +----
 gdb/testsuite/gdb.disasm/h8300s.exp              |  5 +----
 gdb/testsuite/gdb.disasm/hppa.exp                |  7 +------
 gdb/testsuite/gdb.disasm/mn10300.exp             |  5 +----
 gdb/testsuite/gdb.disasm/sh3.exp                 |  5 +----
 gdb/testsuite/gdb.disasm/t01_mov.exp             |  5 +----
 gdb/testsuite/gdb.disasm/t02_mova.exp            |  5 +----
 gdb/testsuite/gdb.disasm/t03_add.exp             |  5 +----
 gdb/testsuite/gdb.disasm/t04_sub.exp             |  5 +----
 gdb/testsuite/gdb.disasm/t05_cmp.exp             |  5 +----
 gdb/testsuite/gdb.disasm/t06_ari2.exp            |  5 +----
 gdb/testsuite/gdb.disasm/t07_ari3.exp            |  5 +----
 gdb/testsuite/gdb.disasm/t08_or.exp              |  5 +----
 gdb/testsuite/gdb.disasm/t09_xor.exp             |  5 +----
 gdb/testsuite/gdb.disasm/t10_and.exp             |  5 +----
 gdb/testsuite/gdb.disasm/t11_logs.exp            |  5 +----
 gdb/testsuite/gdb.disasm/t12_bit.exp             |  5 +----
 gdb/testsuite/gdb.disasm/t13_otr.exp             |  5 +----
 gdb/testsuite/gdb.mi/mi-regs.exp                 | 16 +++++++---------
 .../gdb.reverse/ppc_record_test_isa_2_06.exp     |  5 +----
 .../gdb.reverse/ppc_record_test_isa_3_1.exp      |  6 +-----
 gdb/testsuite/gdb.reverse/s390-mvcle.exp         |  7 +------
 125 files changed, 139 insertions(+), 549 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.arch/aix-sighandle.exp b/gdb/testsuite/gdb.arch/aix-sighandle.exp
index cb38a766562..c724c11abd8 100644
--- a/gdb/testsuite/gdb.arch/aix-sighandle.exp
+++ b/gdb/testsuite/gdb.arch/aix-sighandle.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 {![istarget "powerpc*-*-aix*"]} {
-    return
-}
+require {istarget "powerpc*-*-aix*"}
 
 if { [prepare_for_testing "failed to prepare" aix-sighandle aix-sighandle.c] } {
     return -1
diff --git a/gdb/testsuite/gdb.arch/alpha-step.exp b/gdb/testsuite/gdb.arch/alpha-step.exp
index 6eafb8c508f..07b4c3912d9 100644
--- a/gdb/testsuite/gdb.arch/alpha-step.exp
+++ b/gdb/testsuite/gdb.arch/alpha-step.exp
@@ -14,10 +14,7 @@ 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-if {![istarget "alpha*-*-*"]} {
-    verbose "Skipping alpha step tests."
-    return
-}
+require {istarget "alpha*-*-*"}
 
 set testfile "alpha-step"
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp
index 1c3cda451e4..2cc75d4d617 100644
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -22,10 +22,7 @@ 
 #
 
 require allow_altivec_tests
-if {![istarget "powerpc*"]} {
-    verbose "Skipping altivec abi tests."
-    return
-}
+require {istarget "powerpc*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 8a7fd2e502c..315ce1acfb2 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -22,10 +22,7 @@ 
 #
 
 require allow_altivec_tests
-if {![istarget "powerpc*"]} {
-    verbose "Skipping altivec register tests."
-    return
-}
+require {istarget "powerpc*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp b/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp
index 5a6ea3544d5..faa6ce14878 100644
--- a/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp
+++ b/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.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 { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/amd64-byte.exp b/gdb/testsuite/gdb.arch/amd64-byte.exp
index 1ade593821a..78763e4e2ae 100644
--- a/gdb/testsuite/gdb.arch/amd64-byte.exp
+++ b/gdb/testsuite/gdb.arch/amd64-byte.exp
@@ -18,11 +18,7 @@ 
 
 # This file is part of the gdb testsuite.
 
-
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64 byte register tests."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 standard_testfile amd64-pseudo.c
 
diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
index a36b706828f..fea71457081 100644
--- a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
+++ b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
@@ -18,15 +18,7 @@ 
 # Test displaced stepping over VEX-encoded RIP-relative AVX
 # instructions.
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping x86_64 displaced stepping tests."
-    return
-}
-
-if { ![have_avx] } {
-    verbose "Skipping x86_64 displaced stepping tests."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target have_avx
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step.exp b/gdb/testsuite/gdb.arch/amd64-disp-step.exp
index dbd2b37fe7f..6ca95f44406 100644
--- a/gdb/testsuite/gdb.arch/amd64-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/amd64-disp-step.exp
@@ -18,10 +18,7 @@ 
 # Test amd64 displaced stepping.
 
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping x86_64 displaced stepping tests."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 set newline "\[\r\n\]*"
 
diff --git a/gdb/testsuite/gdb.arch/amd64-dword.exp b/gdb/testsuite/gdb.arch/amd64-dword.exp
index 947c8c11777..9f227601ca4 100644
--- a/gdb/testsuite/gdb.arch/amd64-dword.exp
+++ b/gdb/testsuite/gdb.arch/amd64-dword.exp
@@ -18,11 +18,7 @@ 
 
 # This file is part of the gdb testsuite.
 
-
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64 dword register tests."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 standard_testfile amd64-pseudo.c
 
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
index fc79f02f5ac..30b4395433d 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
@@ -20,9 +20,8 @@  if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-inline.exp COMPILE=1"
     standard_testfile
     lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping ${testfile}."
-    return
+} else {
+    require {istarget x86_64-*-*} is_lp64_target
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
index 57baa073071..25615ceaafc 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
@@ -20,9 +20,8 @@  if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param-dwarf5.exp COMPILE=1"
     set srcfile ${srcfile2}
     lappend opts optimize=-O2 additional_flags=-gdwarf-5
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64-entry-value-param-dwarf5."
-    return
+} else {
+    require {istarget x86_64-*-*} is_lp64_target
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
index 3f89b8656ab..be22937481a 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
@@ -15,10 +15,7 @@ 
 
 standard_testfile .S .cc
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64-entry-value-paramref."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 if { [prepare_for_testing_full "failed to prepare" \
 	  [list $testfile "c++" $srcfile {}]] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value.exp b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
index 15dfaea4091..f5aa42a53b5 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
@@ -20,9 +20,8 @@  if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value.exp COMPILE=1"
     set srcfile ${testfile}.cc
     lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64-entry-value."
-    return
+} else {
+    require {istarget x86_64-*-*} is_lp64_target
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-eval.exp b/gdb/testsuite/gdb.arch/amd64-eval.exp
index 43061e4e0fb..c9ae30fc4d0 100644
--- a/gdb/testsuite/gdb.arch/amd64-eval.exp
+++ b/gdb/testsuite/gdb.arch/amd64-eval.exp
@@ -17,10 +17,7 @@ 
 
 # This testcase exercises evaluation with amd64 calling conventions.
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping x86_64 eval test."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
index 3d3994e23f5..a5aaeedd359 100644
--- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
+++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
@@ -29,10 +29,7 @@ 
 
 standard_testfile .S
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping ${testfile}."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {nopie}] } {
     return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
index 74ca3e163c5..19b2972c34c 100644
--- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
+++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
@@ -30,10 +30,8 @@ 
 set opts {}
 standard_testfile .c
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping ${testfile}."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
+
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return -1
 }
diff --git a/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp b/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
index 9d4c219cb71..7f45b956b39 100644
--- a/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
+++ b/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
@@ -20,9 +20,8 @@  if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.arch/amd64-optimout-repeat.exp COMPILE=1"
     set srcfile ${srcfile2}
     lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64-optimout-repeat."
-    return
+} else {
+    require {istarget x86_64-*-*} is_lp64_target
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-osabi.exp b/gdb/testsuite/gdb.arch/amd64-osabi.exp
index 1d8dbffcd9e..cb3718f76fc 100644
--- a/gdb/testsuite/gdb.arch/amd64-osabi.exp
+++ b/gdb/testsuite/gdb.arch/amd64-osabi.exp
@@ -15,11 +15,7 @@ 
 
 # Verify that gdbarches for i386 variants and osabi none are properly created.
 
-if { ![istarget x86_64-*-* ] } {
-    untested "skipping x86-64 specific test"
-    return
-}
-
+require {istarget x86_64-*-*}
 
 proc test_osabi_none { arch void_ptr_size long_double_size } {
     clean_restart
diff --git a/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp b/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
index dc2d455c11d..44464bd3193 100644
--- a/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
@@ -16,10 +16,7 @@ 
 standard_testfile .S
 set binfile ${binfile}.o
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping ${testfile}."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
     untested "failed to compile"
diff --git a/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
index 354628a7540..d02c1418a30 100644
--- a/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
@@ -24,9 +24,8 @@  if [info exists COMPILE] {
     # make check RUNTESTFLAGS='gdb.arch/amd64-prologue-xmm.exp COMPILE=1'
     set srcfile ${csrcfile}
     lappend opts debug optimize=-O0
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64-prologue-xmm test."
-    return 0
+} else {
+    require {istarget x86_64-*-*} is_lp64_target
 }
 
 if {[prepare_for_testing "failed to prepare" ${binfile} $srcfile $opts]} {
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp b/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp
index d71cc5fe45f..43627042e9e 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp
@@ -15,10 +15,7 @@ 
 
 standard_testfile ".S"
 
-if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
-    verbose "Skipping $testfile.exp"
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp b/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
index 205f871b90b..9a453e53ace 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-special-operands.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 { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
-    verbose "Skipping amd64-stap-special-operands.exp"
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 proc test_probe { probe_name } {
     with_test_prefix "probe: ${probe_name}" {
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp b/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp
index f83336207ec..f2172a0ce35 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.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 { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
-    verbose "Skipping amd64-stap-wrong-subexp.exp"
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 standard_testfile amd64-stap-wrong-subexp.S
 
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
index ae416f3dffa..756f210d783 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
@@ -20,9 +20,8 @@  if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-cxx.exp COMPILE=1"
     standard_testfile amd64-tailcall-cxx1.cc amd64-tailcall-cxx2.cc
     lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping ${testfile}."
-    return
+} else {
+    require {istarget x86_64-*-*} is_lp64_target
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} "${srcfile} ${srcfile2}" $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
index 5676929ea4d..30be37fe4ff 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
@@ -20,9 +20,8 @@  if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-noret.exp COMPILE=1"
     standard_testfile
     lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping ${testfile}."
-    return
+} else {
+    require {istarget x86_64-*-*} is_lp64_target
 }
 
 lappend opts nopie
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
index 840ba5bd878..e2fa9328e71 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
@@ -15,10 +15,7 @@ 
 
 standard_testfile .S
 
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping ${testfile}."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
     return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-word.exp b/gdb/testsuite/gdb.arch/amd64-word.exp
index 2308f09ec3e..5c3164aa941 100644
--- a/gdb/testsuite/gdb.arch/amd64-word.exp
+++ b/gdb/testsuite/gdb.arch/amd64-word.exp
@@ -18,11 +18,7 @@ 
 
 # This file is part of the gdb testsuite.
 
-
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
-    verbose "Skipping amd64 word register tests."
-    return
-}
+require {istarget x86_64-*-*} is_lp64_target
 
 standard_testfile amd64-pseudo.c
 
diff --git a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
index 197d9135438..f414d9ccde0 100644
--- a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
+++ b/gdb/testsuite/gdb.arch/arc-analyze-prologue.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 {![istarget "arc*-*-*"]} {
-    verbose "Skipping ARC prologue test."
-    return
-}
+require {istarget "arc*-*-*"}
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/arc-decode-insn.exp b/gdb/testsuite/gdb.arch/arc-decode-insn.exp
index 792238d19f1..eeda8b42a6e 100644
--- a/gdb/testsuite/gdb.arch/arc-decode-insn.exp
+++ b/gdb/testsuite/gdb.arch/arc-decode-insn.exp
@@ -31,10 +31,7 @@ 
 # about requirements to actual test cases can be found in corresponding
 # assembly file of this test case (arc-decode-insn.S).
 
-if {![istarget "arc*-*-*"]} {
-    verbose "Skipping ARC decoder test."
-    return
-}
+require {istarget "arc*-*-*"}
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/arc-disassembler-options.exp b/gdb/testsuite/gdb.arch/arc-disassembler-options.exp
index 56825fa5a3e..655edcc774b 100644
--- a/gdb/testsuite/gdb.arch/arc-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/arc-disassembler-options.exp
@@ -15,10 +15,7 @@ 
 
 # Test ARC disassembler options.
 
-if {![istarget "arc-*-*"]} {
-    verbose "Skipping ARC disassembler option test."
-    return
-}
+require {istarget "arc-*-*"}
 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
diff --git a/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp b/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp
index 41e62ab9922..3b7d1b6b2d4 100644
--- a/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp
+++ b/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp
@@ -15,9 +15,7 @@ 
 
 # This file is part of the gdb testsuite.
 
-if { ![istarget "arm*-*-*"]} {
-     return 1
-}
+require {istarget "arm*-*-*"}
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile ]} {
diff --git a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
index 1d07d80770f..c7a35f4e947 100644
--- a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
@@ -18,10 +18,7 @@ 
 # This test exercises set/show disassembler-options results are preserved
 # across multiple set architecture calls.
 
-if {![istarget "arm*-*-*"]} {
-    verbose "Skipping ARM disassembler options."
-    return
-}
+require {istarget "arm*-*-*"}
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp b/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp
index 1ced212c700..dfd9419f1ef 100644
--- a/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp
+++ b/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp
@@ -18,10 +18,7 @@ 
 # Contributed by Pierre Langlois  <pierre.langlois@embecosm.com>
 # Tests for the AVR __flash named address space qualifier.
 
-if {![istarget "avr*"]} {
-  verbose "Skipping ${gdb_test_file_name}."
-  return
-}
+require {istarget "avr*"}
 
 # The __flash qualifier was added in GCC 4.7.
 if {[test_compiler_info {gcc-[0-4]-[0-6]}]} {
diff --git a/gdb/testsuite/gdb.arch/e500-abi.exp b/gdb/testsuite/gdb.arch/e500-abi.exp
index a8016bf800e..b466536249a 100644
--- a/gdb/testsuite/gdb.arch/e500-abi.exp
+++ b/gdb/testsuite/gdb.arch/e500-abi.exp
@@ -21,11 +21,7 @@ 
 # This file uses e500-abi.c for input.
 #
 
-
-if {![istarget "powerpc-*eabispe"]} {
-    verbose "Skipping e500 abi tests."
-    return
-}
+require {istarget "powerpc-*eabispe"}
 
 set testfile "e500-abi"
 set binfile ${objdir}/${subdir}/${testfile}
diff --git a/gdb/testsuite/gdb.arch/e500-prologue.exp b/gdb/testsuite/gdb.arch/e500-prologue.exp
index 6dbe7c911bf..7c32d9dd5b0 100644
--- a/gdb/testsuite/gdb.arch/e500-prologue.exp
+++ b/gdb/testsuite/gdb.arch/e500-prologue.exp
@@ -17,11 +17,7 @@ 
 
 # Test PowerPC E500 prologue analyzer.
 
-
-if {![istarget "powerpc-*"]} {
-    verbose "Skipping powerpc E500 prologue tests."
-    return
-}
+require {istarget "powerpc-*"}
 
 set testfile "e500-prologue"
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/e500-regs.exp b/gdb/testsuite/gdb.arch/e500-regs.exp
index 05beb635303..615b745d251 100644
--- a/gdb/testsuite/gdb.arch/e500-regs.exp
+++ b/gdb/testsuite/gdb.arch/e500-regs.exp
@@ -21,11 +21,7 @@ 
 # This file uses e500-regs.c for input.
 #
 
-
-if {![istarget "powerpc-*eabispe"]} {
-    verbose "Skipping e500 register tests."
-    return
-}
+require {istarget "powerpc-*eabispe"}
 
 set testfile "e500-regs"
 set binfile ${objdir}/${subdir}/${testfile}
diff --git a/gdb/testsuite/gdb.arch/gdb1291.exp b/gdb/testsuite/gdb.arch/gdb1291.exp
index eb523670ab1..a81a13ff151 100644
--- a/gdb/testsuite/gdb.arch/gdb1291.exp
+++ b/gdb/testsuite/gdb.arch/gdb1291.exp
@@ -23,11 +23,7 @@ 
 
 # Test SH backtraces with >256 byte frame stack. (PR:1291)
 
-
-if {![istarget "sh-*-*"]} {
-    verbose "Skipping SH backtrace tests."
-    return
-}
+require {istarget "sh-*-*"}
 
 set testfile "gdb1291"
 set srcfile ${testfile}.s
diff --git a/gdb/testsuite/gdb.arch/gdb1431.exp b/gdb/testsuite/gdb.arch/gdb1431.exp
index b15206d9745..eee14fb3025 100644
--- a/gdb/testsuite/gdb.arch/gdb1431.exp
+++ b/gdb/testsuite/gdb.arch/gdb1431.exp
@@ -25,11 +25,7 @@ 
 
 # Observe that the until command doesn't go all the way to sub2.
 
-
-if {![istarget "sh-*-*"]} {
-    verbose "Skipping SH backtrace tests."
-    return
-}
+require {istarget "sh-*-*"}
 
 set testfile "gdb1431"
 set srcfile ${testfile}.s
diff --git a/gdb/testsuite/gdb.arch/gdb1558.exp b/gdb/testsuite/gdb.arch/gdb1558.exp
index 4c6852e59b5..9090f03d6d9 100644
--- a/gdb/testsuite/gdb.arch/gdb1558.exp
+++ b/gdb/testsuite/gdb.arch/gdb1558.exp
@@ -21,11 +21,7 @@ 
 # Tests for PR:1558.  Hits breakpoint at main after function called
 # from main.
 
-
-if {![istarget "sh-*-*"]} {
-    verbose "Skipping SH breakpoint test."
-    return
-}
+require {istarget "sh-*-*"}
 
 set testfile "gdb1558"
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp
index 35557a1b84c..72523c5d47b 100644
--- a/gdb/testsuite/gdb.arch/i386-avx.exp
+++ b/gdb/testsuite/gdb.arch/i386-avx.exp
@@ -24,10 +24,7 @@  if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
     return
 }
 
-if { ![have_avx] } {
-    verbose "Skipping x86 AVX tests."
-    return
-}
+require have_avx
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-call.exp b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
index 4311abc41a8..8371546a8f9 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-call.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
@@ -21,14 +21,7 @@  if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
 
 standard_testfile
 
-if { ![supports_mpx_check_pointer_bounds] } {
-    return -1
-}
-
-if { ![have_mpx] } {
-    unsupported "processor does not support MPX"
-    return -1
-}
+require supports_mpx_check_pointer_bounds have_mpx
 
 set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat"
 
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-map.exp b/gdb/testsuite/gdb.arch/i386-mpx-map.exp
index c4768acd0ea..d95adef7d8b 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-map.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-map.exp
@@ -23,14 +23,7 @@  if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
 
 standard_testfile
 
-if { ![supports_mpx_check_pointer_bounds] } {
-    return -1
-}
-
-if { ![have_mpx] } {
-    unsupported "processor does not support MPX"
-    return -1
-}
+require supports_mpx_check_pointer_bounds have_mpx
 
 set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
 
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
index 4021b50bab8..eaac31edbd3 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
@@ -23,14 +23,7 @@  if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
 
 standard_testfile
 
-if { ![supports_mpx_check_pointer_bounds] } {
-    return -1
-}
-
-if { ![have_mpx] } {
-    unsupported "processor does not support MPX"
-    return -1
-}
+require supports_mpx_check_pointer_bounds have_mpx
 
 set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
 
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp b/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
index 425834614c8..a33c4f526f7 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
@@ -29,14 +29,7 @@  if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
 
 standard_testfile
 
-if { ![supports_mpx_check_pointer_bounds] } {
-    return -1
-}
-
-if { ![have_mpx] } {
-    unsupported "processor does not support MPX"
-    return -1
-}
+require supports_mpx_check_pointer_bounds have_mpx
 
 set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
 
diff --git a/gdb/testsuite/gdb.arch/i386-mpx.exp b/gdb/testsuite/gdb.arch/i386-mpx.exp
index 96cd8fe9092..5534ec9aa81 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx.exp
@@ -27,14 +27,7 @@  if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
     return
 }
 
-if { ![supports_mpx_check_pointer_bounds] } {
-    return -1
-}
-
-if { ![have_mpx] } {
-    unsupported "processor does not support MPX"
-    return -1
-}
+require supports_mpx_check_pointer_bounds have_mpx
 
 set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
 
diff --git a/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp b/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp
index 3d12c2086f5..06cb2b1b818 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp
@@ -27,10 +27,7 @@  if { ![istarget x86_64-*-*] && ![istarget i?86-*-*] } {
     return
 }
 
-if { ![supports_fcf_protection] } {
-    untested "-fcf-protection not supported"
-    return
-}
+require supports_fcf_protection
 
 set opts {debug additional_flags=-fcf-protection=full}
 
diff --git a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp
index bddfcb57510..e9f98d0eb9e 100644
--- a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp
+++ b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.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 ![istarget "ia64-*-*"] {
-    verbose "Skipping ia64-breakpoint-shadow test."
-    return
-}
+require {istarget "ia64-*-*"}
 
 set testfile ia64-breakpoint-shadow
 set srcfile ${testfile}.S
diff --git a/gdb/testsuite/gdb.arch/iwmmxt-regs.exp b/gdb/testsuite/gdb.arch/iwmmxt-regs.exp
index d2a97e297a2..90038e485b8 100644
--- a/gdb/testsuite/gdb.arch/iwmmxt-regs.exp
+++ b/gdb/testsuite/gdb.arch/iwmmxt-regs.exp
@@ -16,10 +16,7 @@ 
 
 # Tests for ARM iWMMXt register setting and fetching.
 
-if {![istarget "arm*-*-*"]} {
-    verbose "Skipping iWMMXt register tests."
-    return
-}
+require {istarget "arm*-*-*"}
 
 set testfile "iwmmxt-regs"
 set binfile ${objdir}/${subdir}/${testfile}
diff --git a/gdb/testsuite/gdb.arch/mips-disassembler-options.exp b/gdb/testsuite/gdb.arch/mips-disassembler-options.exp
index a9cac756115..e603cb000a6 100644
--- a/gdb/testsuite/gdb.arch/mips-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/mips-disassembler-options.exp
@@ -15,10 +15,7 @@ 
 
 # Test MIPS disassembler options.
 
-if {![istarget "mips*-*-*"]} {
-    verbose "Skipping MIPS disassembler option tests."
-    return
-}
+require {istarget "mips*-*-*"}
 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
diff --git a/gdb/testsuite/gdb.arch/mips-fcr.exp b/gdb/testsuite/gdb.arch/mips-fcr.exp
index f301fb35469..14904bf6810 100644
--- a/gdb/testsuite/gdb.arch/mips-fcr.exp
+++ b/gdb/testsuite/gdb.arch/mips-fcr.exp
@@ -17,10 +17,7 @@ 
 
 # Test MIPS Floating Point Control Register handling.
 
-if {![istarget "mips*-*-*"]} {
-    verbose "Skipping MIPS Floating Point Control Register tests."
-    return
-}
+require {istarget "mips*-*-*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/mips-fpregset-core.exp b/gdb/testsuite/gdb.arch/mips-fpregset-core.exp
index 9144e011d03..c257999b5b8 100644
--- a/gdb/testsuite/gdb.arch/mips-fpregset-core.exp
+++ b/gdb/testsuite/gdb.arch/mips-fpregset-core.exp
@@ -15,10 +15,7 @@ 
 
 # Test MIPS Floating Point General Register handling in core files.
 
-if {![istarget "mips*-*-*"]} {
-    verbose "Skipping MIPS Floating Point General Register tests."
-    return
-}
+require {istarget "mips*-*-*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp b/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
index e804780d4f6..2b00fe14ce0 100644
--- a/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
+++ b/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
@@ -15,9 +15,7 @@ 
 
 # Test single-step on bbit.  
 
-if ![istarget "*octeon*"] {
-  return -1
-}
+require {istarget "*octeon*"}
 
 proc current_insn {} {
     global gdb_prompt
diff --git a/gdb/testsuite/gdb.arch/mips16-thunks.exp b/gdb/testsuite/gdb.arch/mips16-thunks.exp
index 5882f167035..07c832847e4 100644
--- a/gdb/testsuite/gdb.arch/mips16-thunks.exp
+++ b/gdb/testsuite/gdb.arch/mips16-thunks.exp
@@ -25,10 +25,7 @@ 
 # toolchain for a subset of ABIs, so we need to check that a MIPS16
 # executable can be built and run at all before we attempt the actual test.
 
-if {![istarget "mips*-*-*"]} {
-    verbose "Skipping MIPS16 thunk support tests."
-    return
-}
+require {istarget "mips*-*-*"}
 
 # A helper to set caller's SRCFILE and OBJFILE based on FILENAME and SUFFIX.
 proc set_src_and_obj { filename { suffix "" } } {
diff --git a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
index a6a39eb26e5..37397df99ef 100644
--- a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
@@ -24,10 +24,7 @@ 
 # lnia Rx == addpcis Rx,0
 # subcis Rx,value == addpcis Rx,-value
 
-if { ![istarget powerpc*-*] } {
-    verbose "Skipping powerpc addpcis test."
-    return
-}
+require {istarget powerpc*-*}
 
 set retval 0
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
index d787035c376..8179c03f2f1 100644
--- a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
@@ -18,10 +18,7 @@ 
 # Test rs6000 prologue analyzer.
 
 
-if {![istarget "powerpc-*-aix*"]} {
-    verbose "Skipping powerpc-aix prologue tests."
-    return
-}
+require {istarget "powerpc-*-aix*"}
 
 set testfile "powerpc-aix-prologue"
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec.exp b/gdb/testsuite/gdb.arch/powerpc-altivec.exp
index fcc93870f7e..b1396493750 100644
--- a/gdb/testsuite/gdb.arch/powerpc-altivec.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec2.exp b/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
index bba6700510d..405c7ab50ac 100644
--- a/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec3.exp b/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
index 2b9efb135f0..d3daa5efbca 100644
--- a/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
index 28c8268cb46..72ce2316b16 100644
--- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
@@ -20,10 +20,7 @@ 
 
 # Testcase for ppc decimal128 pseudo-registers.
 
-if {![istarget "powerpc64*-*"]} {
-    verbose "Skipping powerpc Decimal128 pseudo-registers testcase."
-    return
-}
+require {istarget "powerpc64*-*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
index 823b5f7b52a..2b0995e9b6f 100644
--- a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
@@ -18,10 +18,7 @@ 
 # This test exercises set/show disassembler-options results are preserved
 # across multiple set architecture calls.
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC disassembler options."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp b/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp
index e10ec442d59..5759692c1e4 100644
--- a/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp
@@ -18,10 +18,7 @@ 
 # This tests checks that generating and loading a core file preserves
 # the correct FPSCR size.
 
-if {![istarget "powerpc*-*-linux*"]} {
-    verbose "Skipping PowerPC test for corefiles with FPSCR."
-    return
-}
+require {istarget "powerpc*-*-linux*"}
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp b/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
index 345cb34ead9..7d21e52260d 100644
--- a/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
@@ -25,10 +25,7 @@ 
 # registers are then checked against the saved values, because the
 # abort should have reverted the registers to these values.
 
-if {![istarget "powerpc*-*-linux*"]} {
-    verbose "Skipping PowerPC test for HTM registers."
-    return
-}
+require {istarget "powerpc*-*-linux*"}
 
 standard_testfile .c .gen.c
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-lnia.exp b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
index 92e2502700a..88f3e8784a8 100644
--- a/gdb/testsuite/gdb.arch/powerpc-lnia.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
@@ -23,10 +23,7 @@ 
 #		lnia Rx == addpcis Rx,0 == lnia Rx
 #		subcis Rx,value == addpcis Rx,-value
 
-if { ![istarget powerpc*-*] } {
-    verbose "Skipping powerpc lnia test."
-    return
-}
+require {istarget powerpc*-*}
 
 set retval 0
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp b/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp
index 1ad3ea8bde4..acad3c5a57b 100644
--- a/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp
@@ -16,11 +16,7 @@ 
 # Test to see if gdb is properly single stepping over the
 # displaced plxv instruction.
 
-if { ![istarget powerpc*-*] } {
-    verbose "Skipping powerpc ISA 3.1 plxv test."
-    return
-}
-require allow_power_isa_3_1_tests
+require {istarget powerpc*-*} allow_power_isa_3_1_tests
 
 set retval 0
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-power10.exp b/gdb/testsuite/gdb.arch/powerpc-power10.exp
index 5e1d12b75f4..9224c6eb59b 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power10.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power10.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7.exp b/gdb/testsuite/gdb.arch/powerpc-power7.exp
index 4773086b899..9fa16ce761d 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power7.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power7.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-power8.exp b/gdb/testsuite/gdb.arch/powerpc-power8.exp
index baf7b614552..bf087988817 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power8.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power8.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-power9.exp b/gdb/testsuite/gdb.arch/powerpc-power9.exp
index fe588568b3a..a66059e521e 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power9.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power9.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp b/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
index 9fcbf94b105..5bcfbb160d0 100644
--- a/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
@@ -20,10 +20,7 @@ 
 # values, then write to the registers trough GDB, step once, and check
 # again if we read back the same values.
 
-if {![istarget "powerpc*-*-linux*"]} {
-    verbose "Skipping PowerPC test for PPR and DSCR registers."
-    return
-}
+require {istarget "powerpc*-*-linux*"}
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
index 454b1499420..dd99250736b 100644
--- a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.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 {![istarget "powerpc-*-*"] } {
-    verbose "Skipping powerpc back trace test."
-    return
-}
+require {istarget "powerpc-*-*"}
 
 standard_testfile .c .S
 set binfile [standard_output_file ${testfile}]
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
index 2f00c90cc11..edc7116754a 100644
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
@@ -17,10 +17,7 @@ 
 
 # Do not run on AIX (where we won't be able to build the tests without
 # some surgery) or on PowerPC64 (ditto, dot symbols).
-if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} {
-    verbose "Skipping PowerPC prologue tests."
-    return
-}
+require {!istarget *-*-aix*} {istarget "powerpc-*-*"}
 
 set testfile "powerpc-prologue"
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/powerpc-stackless.exp b/gdb/testsuite/gdb.arch/powerpc-stackless.exp
index cd6b5765651..9005577b139 100644
--- a/gdb/testsuite/gdb.arch/powerpc-stackless.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-stackless.exp
@@ -15,10 +15,7 @@ 
 
 # Testcase for PR tdep/17379.
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping powerpc-stackless.exp"
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-tar.exp b/gdb/testsuite/gdb.arch/powerpc-tar.exp
index 5fe800ba802..726ca04ba07 100644
--- a/gdb/testsuite/gdb.arch/powerpc-tar.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-tar.exp
@@ -22,10 +22,7 @@ 
 # branch to TAR and check that we stop at the address that we wrote to
 # register.
 
-if {![istarget "powerpc*-*-linux*"]} {
-    verbose "Skipping PowerPC test for the TAR register."
-    return
-}
+require {istarget "powerpc*-*-linux*"}
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp b/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp
index bbcf45a555d..2447d740624 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp
@@ -20,11 +20,7 @@ 
 # 0 to 31 in each of the 16 bytes of each corresponding register, and
 # we then check if gdb sees these same values.
 
-require allow_altivec_tests
-if {![istarget "powerpc*"]} {
-    verbose "Skipping PowerPC vector register tests."
-    return
-}
+require allow_altivec_tests {[istarget "powerpc*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp b/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp
index b80afa5b7f2..8ea773ccaee 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp
@@ -18,11 +18,7 @@ 
 # This test checks that generating and loading a core file preserves
 # the correct VSX register state.
 
-if {![istarget "powerpc*-*-linux*"]} {
-    verbose "Skipping PowerPC test for corefiles with VSX registers."
-    return
-}
-require allow_vsx_tests
+require {istarget "powerpc*-*-linux*"} allow_vsx_tests
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx.exp b/gdb/testsuite/gdb.arch/powerpc-vsx.exp
index ec58eb87704..7980a3c9ecb 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx2.exp b/gdb/testsuite/gdb.arch/powerpc-vsx2.exp
index 2b842d2eb02..ec566d821b4 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx2.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx2.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx3.exp b/gdb/testsuite/gdb.arch/powerpc-vsx3.exp
index 5ee2ea861f5..cdb5bf6f420 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx3.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx3.exp
@@ -20,10 +20,7 @@ 
 standard_testfile .s
 set objfile [standard_output_file ${testfile}.o]
 
-if {![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC instructions disassembly."
-    return
-}
+require {istarget "powerpc*-*-*"}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
     untested "PowerPC instructions disassembly"
diff --git a/gdb/testsuite/gdb.arch/powerpc64-prologue.exp b/gdb/testsuite/gdb.arch/powerpc64-prologue.exp
index 901d4e4fd1d..3034ac168bb 100644
--- a/gdb/testsuite/gdb.arch/powerpc64-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc64-prologue.exp
@@ -17,10 +17,7 @@ 
 
 # Do not run on AIX (where we won't be able to build the tests without
 # some surgery) or on PowerPC64 (ditto, dot symbols).
-if {[istarget *-*-aix*] || ![istarget "powerpc*-*-*"]} {
-    verbose "Skipping PowerPC prologue tests."
-    return
-}
+require {!istarget *-*-aix*} {istarget "powerpc*-*-*"}
 
 standard_testfile .c
 
diff --git a/gdb/testsuite/gdb.arch/ppc-dfp.exp b/gdb/testsuite/gdb.arch/ppc-dfp.exp
index 366968136bb..eca44a683e4 100644
--- a/gdb/testsuite/gdb.arch/ppc-dfp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-dfp.exp
@@ -16,10 +16,7 @@ 
 
 # Tests for Powerpc Decimal Floating Point registers setting and fetching
 
-if {![istarget "powerpc*"]} {
-    verbose "Skipping powerpc decimal floating point register tests."
-    return
-}
+require {istarget "powerpc*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/ppc-fp.exp b/gdb/testsuite/gdb.arch/ppc-fp.exp
index 30d6f8aa660..db7ea1202d5 100644
--- a/gdb/testsuite/gdb.arch/ppc-fp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-fp.exp
@@ -16,10 +16,7 @@ 
 
 # Tests for Powerpc floating point register setting and fetching
 
-if {![istarget "powerpc*"]} {
-    verbose "Skipping powerpc floating point register tests."
-    return
-}
+require {istarget "powerpc*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/ppc-longdouble.exp b/gdb/testsuite/gdb.arch/ppc-longdouble.exp
index d8193696502..c7d7817377b 100644
--- a/gdb/testsuite/gdb.arch/ppc-longdouble.exp
+++ b/gdb/testsuite/gdb.arch/ppc-longdouble.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 {![istarget "powerpc*"]} {
-    verbose "Skipping powerpc long-double floating point tests."
-    return
-}
+require {istarget "powerpc*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
index 1ff1e58367f..e6777312508 100644
--- a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
@@ -19,11 +19,7 @@ 
 # a lwarx/ldarx instruction and ending with a stwcx/stdcx
 # instruction.
 
-
-if {![istarget "powerpc*"] || ![is_lp64_target]} {
-    verbose "Skipping testing of powerpc64 single stepping over atomic sequences."
-    return
-}
+require {istarget "powerpc*"} is_lp64_target
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp b/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
index 1cdf303a0c6..c03215ef9f2 100644
--- a/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
@@ -23,10 +23,7 @@ 
 # read, then that functionality might not be used because f.i.
 # line-info is used instead.  So, we use nodebug.
 
-if {![istarget "powerpc*"] || ![is_lp64_target]} {
-    unsupported "Not powerpc64"
-    return
-}
+require {istarget "powerpc*"} is_lp64_target
 
 set flags { nodebug }
 if [info exists COMPILE] {
diff --git a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp
index caaed41e611..7c89c7e5af2 100644
--- a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp
@@ -21,10 +21,7 @@ 
 # were introduced in ISA 2.06, they were implemented only in POWER8 (ISA 2.07).
 
 
-if {![istarget "powerpc*"] || ![is_lp64_target]} {
-    untested "skipping powerpc isa 207 atomic sequences test"
-    return
-}
+require {istarget "powerpc*"} is_lp64_target
 
 standard_testfile  .c .S
 
diff --git a/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp b/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp
index 2dc5f53fab3..f0c1527439d 100644
--- a/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp
+++ b/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp
@@ -16,10 +16,7 @@ 
 # Test GDB for RISC-V always uses an uncompressed breakpoint when
 # setting up for an inferior call.
 
-if {![istarget "riscv*-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv*-*-*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/riscv-default-tdesc.exp b/gdb/testsuite/gdb.arch/riscv-default-tdesc.exp
index c00b4a741d8..1a201723d8b 100644
--- a/gdb/testsuite/gdb.arch/riscv-default-tdesc.exp
+++ b/gdb/testsuite/gdb.arch/riscv-default-tdesc.exp
@@ -23,10 +23,7 @@ 
 #
 # In all other cases the default will be RV64.
 
-if {![istarget "riscv*-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv*-*-*"}
 
 # Start GDB with no executable.
 gdb_start
diff --git a/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp b/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
index d8e88994266..d72b740b9bd 100644
--- a/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
+++ b/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
@@ -16,12 +16,7 @@ 
 # Check the formatting of the fcsr, fflags, and frm registers in the
 # output of the 'info registers' command.
 
-if {![istarget "riscv*-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
-
-require allow_float_test
+require {istarget "riscv*-*-*"} allow_float_test
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/riscv-reg-aliases.exp b/gdb/testsuite/gdb.arch/riscv-reg-aliases.exp
index 8f35a502827..ef2e695ffc0 100644
--- a/gdb/testsuite/gdb.arch/riscv-reg-aliases.exp
+++ b/gdb/testsuite/gdb.arch/riscv-reg-aliases.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 {![istarget "riscv*-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv*-*-*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp b/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp
index 6019dfdc98f..e0bdc212a1e 100644
--- a/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp
+++ b/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp
@@ -15,10 +15,7 @@ 
 
 # Check that we can load different RISC-V target descriptions.
 
-if {![istarget "riscv*-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv*-*-*"}
 
 clean_restart
 
diff --git a/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp b/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp
index 8ba9bc5647a..1a92f424cbe 100644
--- a/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp
+++ b/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp
@@ -17,10 +17,7 @@ 
 # loading a new target description file, and which registers show up
 # in the output of the 'info registers' command.
 
-if {![istarget "riscv*-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv*-*-*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/riscv-unwind-long-insn.exp b/gdb/testsuite/gdb.arch/riscv-unwind-long-insn.exp
index 18ec4f1e7a4..ac7c3e9f77f 100644
--- a/gdb/testsuite/gdb.arch/riscv-unwind-long-insn.exp
+++ b/gdb/testsuite/gdb.arch/riscv-unwind-long-insn.exp
@@ -22,10 +22,7 @@ 
 # prologue.  We trick GDB into parsing the fake instruction by tail
 # calling from a different function, 'bar' to the middle of 'func'.
 
-if {![istarget "riscv*-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv*-*-*"}
 
 standard_testfile riscv-unwind-long-insn.c \
     riscv-unwind-long-insn.S
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
index 50c33596f6a..373bbab2229 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
@@ -16,10 +16,7 @@ 
 # This tests GDB's ability to use the RISC-V prologue scanner in order to
 # unwind through a function that uses the 'ld' instruction in its prologue.
 
-if {![istarget "riscv64-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv64-*-*"}
 
 standard_testfile riscv64-unwind-prologue-with-ld-lw.c \
 		  riscv64-unwind-prologue-with-ld-lw-foo.s
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
index cdd0f8d3e0f..4bbf9e96577 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
@@ -16,10 +16,7 @@ 
 # This tests GDB's ability to use the RISC-V prologue scanner in order to
 # unwind through a function that uses the 'c.mv' instruction in its prologue.
 
-if {![istarget "riscv64-*-*"]} {
-    verbose "Skipping ${gdb_test_file_name}."
-    return
-}
+require {istarget "riscv64-*-*"}
 
 standard_testfile .c .s
 if {[prepare_for_testing "failed to prepare" $testfile \
diff --git a/gdb/testsuite/gdb.arch/s390-multiarch.exp b/gdb/testsuite/gdb.arch/s390-multiarch.exp
index b82cf159011..4256d30b0b9 100644
--- a/gdb/testsuite/gdb.arch/s390-multiarch.exp
+++ b/gdb/testsuite/gdb.arch/s390-multiarch.exp
@@ -23,11 +23,7 @@ 
 # running native.  It should be executed on a sufficiently new Linux
 # kernel that provides the 'system_call' regset.
 
-require isnative
-if { ![istarget s390x-*-* ] } {
-    verbose "Skipping s390 multi-arch tests."
-    return
-}
+require isnative {istarget s390x-*-*}
 
 standard_testfile
 set binprefix $binfile
diff --git a/gdb/testsuite/gdb.arch/s390-stackless.exp b/gdb/testsuite/gdb.arch/s390-stackless.exp
index 2b2ac991bc5..f942ce8669e 100644
--- a/gdb/testsuite/gdb.arch/s390-stackless.exp
+++ b/gdb/testsuite/gdb.arch/s390-stackless.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 {![istarget "s390*-*-*"]} {
-    verbose "Skipping s390 stackless test."
-    return
-}
+require {istarget "s390*-*-*"}
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/sparc-sysstep.exp b/gdb/testsuite/gdb.arch/sparc-sysstep.exp
index 99e2770cf1f..e86c50eea0e 100644
--- a/gdb/testsuite/gdb.arch/sparc-sysstep.exp
+++ b/gdb/testsuite/gdb.arch/sparc-sysstep.exp
@@ -21,9 +21,7 @@ 
 # PC must be extracted from the sigreturn register save area in the
 # stack.
 
-if {![istarget "sparc*-*-linux*"]} {
-    return 0
-}
+require {istarget "sparc*-*-linux*"}
 
 set testfile sparc-sysstep
 set srcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.arch/sparc64-adi.exp b/gdb/testsuite/gdb.arch/sparc64-adi.exp
index b44ec1739d3..9f8545b3c94 100644
--- a/gdb/testsuite/gdb.arch/sparc64-adi.exp
+++ b/gdb/testsuite/gdb.arch/sparc64-adi.exp
@@ -18,10 +18,7 @@ 
 # Basic tests of examining/assigning ADI version tags, and reporting 
 # precise mismatch.
 
-if {![istarget "sparc64*-*-linux*"]} {
-    verbose "Skipping sparc64 ADI test."
-    return 0
-}
+require {istarget "sparc64*-*-linux*"}
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/sparc64-regs.exp b/gdb/testsuite/gdb.arch/sparc64-regs.exp
index 46e710c83fc..1c60c3d4275 100644
--- a/gdb/testsuite/gdb.arch/sparc64-regs.exp
+++ b/gdb/testsuite/gdb.arch/sparc64-regs.exp
@@ -18,10 +18,7 @@ 
 # Tests decoding of various sparc64 registers.
 # At the moment, only few registers are tested, but more can be added in future.
 
-if {![istarget "sparc64*-*-linux*"]} {
-    verbose "Skipping sparc64 register tests."
-    return 0
-}
+require {istarget "sparc64*-*-linux*"}
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/thumb2-it.exp b/gdb/testsuite/gdb.arch/thumb2-it.exp
index cbd7ffa2621..024718677de 100644
--- a/gdb/testsuite/gdb.arch/thumb2-it.exp
+++ b/gdb/testsuite/gdb.arch/thumb2-it.exp
@@ -15,10 +15,7 @@ 
 
 # Test single stepping over Thumb-2 IT blocks.
 
-if {![istarget arm*-*eabi*]} {
-    verbose "Skipping Thumb-2 tests."
-    return
-}
+require {istarget arm*-*eabi*}
 
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp
index e7476f1015b..2b72a012ef9 100644
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp
@@ -19,11 +19,7 @@ 
 #
 
 
-if {![istarget "powerpc*"]} {
-    verbose "Skipping vsx register tests."
-    return
-}
-require allow_vsx_tests
+require {istarget "powerpc*"} allow_vsx_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp
index 04915719615..4f831d5c9fd 100644
--- a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp
+++ b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp
@@ -18,11 +18,7 @@ 
 # Test the vsr registers print values in float128 bit format.
 #
 
-if {![istarget "powerpc*"]} {
-    verbose "Skipping vsr float128 field tests."
-    return
-}
-require allow_vsx_tests
+require {istarget "powerpc*"} allow_vsx_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp
index 57ead7dde74..3278c530913 100644
--- a/gdb/testsuite/gdb.base/overlays.exp
+++ b/gdb/testsuite/gdb.base/overlays.exp
@@ -22,17 +22,7 @@ 
 
 set data_overlays 1
 
-if {[istarget "m32r-*-*"]} {
-    set linker_script "${srcdir}/${subdir}/m32r.ld"
-} else {
-    verbose "Skipping overlay test -- not implemented for this target."
-    return 
-}
-
-if {[istarget "*-*-linux*"]} {
-    verbose "Skipping overlay test -- Linux doesn't support overlayed programs."
-    return 
-}
+require {istarget "m32r-*-*"} {!istarget "*-*-linux*"}
 
 standard_testfile overlays.c ovlymgr.c foo.c bar.c baz.c grbx.c
 
diff --git a/gdb/testsuite/gdb.disasm/am33.exp b/gdb/testsuite/gdb.disasm/am33.exp
index e9898ce73ee..a278f395dd6 100644
--- a/gdb/testsuite/gdb.disasm/am33.exp
+++ b/gdb/testsuite/gdb.disasm/am33.exp
@@ -16,10 +16,7 @@ 
 
 # This file was written by Jeff Law. (law@cygnus.com)
 
-if ![istarget "mn10300*-*-*"] {
-    verbose "Tests ignored for all but mn10300 based targets."
-    return
-}
+require {istarget "mn10300*-*-*"}
 
 global exec_output
 
diff --git a/gdb/testsuite/gdb.disasm/h8300s.exp b/gdb/testsuite/gdb.disasm/h8300s.exp
index c37ecbf861c..cd68a630959 100644
--- a/gdb/testsuite/gdb.disasm/h8300s.exp
+++ b/gdb/testsuite/gdb.disasm/h8300s.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Kazu Hirata. (kazu@hxi.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "h8300s"
diff --git a/gdb/testsuite/gdb.disasm/hppa.exp b/gdb/testsuite/gdb.disasm/hppa.exp
index b2a7bfbdc99..19fc08b6115 100644
--- a/gdb/testsuite/gdb.disasm/hppa.exp
+++ b/gdb/testsuite/gdb.disasm/hppa.exp
@@ -16,12 +16,7 @@ 
 
 # This file was written by Jeff Law. (law@cs.utah.edu)
 
-if ![istarget "hppa*-*-*"] {
-    verbose "Tests ignored for all but hppa based targets."
-    return
-}
-
-
+require {istarget "hppa*-*-*"}
 
 set testfile "hppa"
 set srcfile ${srcdir}/${subdir}/${testfile}.s
diff --git a/gdb/testsuite/gdb.disasm/mn10300.exp b/gdb/testsuite/gdb.disasm/mn10300.exp
index 4f76f4f5b94..425dc0615c8 100644
--- a/gdb/testsuite/gdb.disasm/mn10300.exp
+++ b/gdb/testsuite/gdb.disasm/mn10300.exp
@@ -16,10 +16,7 @@ 
 
 # This file was written by Jeff Law. (law@cygnus.com)
 
-if ![istarget "mn10300*-*-*"] {
-    verbose "Tests ignored for all but mn10300 based targets."
-    return
-}
+require {istarget "mn10300*-*-*"}
 
 global exec_output
 
diff --git a/gdb/testsuite/gdb.disasm/sh3.exp b/gdb/testsuite/gdb.disasm/sh3.exp
index 10e0ce4e9cf..84479ce83e7 100644
--- a/gdb/testsuite/gdb.disasm/sh3.exp
+++ b/gdb/testsuite/gdb.disasm/sh3.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Jeff Law. (law@cs.utah.edu)
 
-if ![istarget "sh3*-*-*"] {
-    verbose "Tests ignored for all but sh3 based targets."
-    return
-}
+require {istarget "sh3*-*-*"}
 
 
 set testfile "sh3"
diff --git a/gdb/testsuite/gdb.disasm/t01_mov.exp b/gdb/testsuite/gdb.disasm/t01_mov.exp
index f7faea298eb..8c9b6146266 100644
--- a/gdb/testsuite/gdb.disasm/t01_mov.exp
+++ b/gdb/testsuite/gdb.disasm/t01_mov.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t01_mov"
diff --git a/gdb/testsuite/gdb.disasm/t02_mova.exp b/gdb/testsuite/gdb.disasm/t02_mova.exp
index f94b8bc9715..654a1aaa5a1 100644
--- a/gdb/testsuite/gdb.disasm/t02_mova.exp
+++ b/gdb/testsuite/gdb.disasm/t02_mova.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t02_mova"
diff --git a/gdb/testsuite/gdb.disasm/t03_add.exp b/gdb/testsuite/gdb.disasm/t03_add.exp
index 904f9f82a95..8f7b272673f 100644
--- a/gdb/testsuite/gdb.disasm/t03_add.exp
+++ b/gdb/testsuite/gdb.disasm/t03_add.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t03_add"
diff --git a/gdb/testsuite/gdb.disasm/t04_sub.exp b/gdb/testsuite/gdb.disasm/t04_sub.exp
index ebbb21675ec..2440c8a89f4 100644
--- a/gdb/testsuite/gdb.disasm/t04_sub.exp
+++ b/gdb/testsuite/gdb.disasm/t04_sub.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t04_sub"
diff --git a/gdb/testsuite/gdb.disasm/t05_cmp.exp b/gdb/testsuite/gdb.disasm/t05_cmp.exp
index 45db9bd4aad..8f004348008 100644
--- a/gdb/testsuite/gdb.disasm/t05_cmp.exp
+++ b/gdb/testsuite/gdb.disasm/t05_cmp.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t05_cmp"
diff --git a/gdb/testsuite/gdb.disasm/t06_ari2.exp b/gdb/testsuite/gdb.disasm/t06_ari2.exp
index 68503204f7e..ae6fee677d3 100644
--- a/gdb/testsuite/gdb.disasm/t06_ari2.exp
+++ b/gdb/testsuite/gdb.disasm/t06_ari2.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t06_ari2"
diff --git a/gdb/testsuite/gdb.disasm/t07_ari3.exp b/gdb/testsuite/gdb.disasm/t07_ari3.exp
index 44e8d547a18..66190939675 100644
--- a/gdb/testsuite/gdb.disasm/t07_ari3.exp
+++ b/gdb/testsuite/gdb.disasm/t07_ari3.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t07_ari3"
diff --git a/gdb/testsuite/gdb.disasm/t08_or.exp b/gdb/testsuite/gdb.disasm/t08_or.exp
index e51293ef618..bc01c07830b 100644
--- a/gdb/testsuite/gdb.disasm/t08_or.exp
+++ b/gdb/testsuite/gdb.disasm/t08_or.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t08_or"
diff --git a/gdb/testsuite/gdb.disasm/t09_xor.exp b/gdb/testsuite/gdb.disasm/t09_xor.exp
index 3614325e7ef..547d21f173f 100644
--- a/gdb/testsuite/gdb.disasm/t09_xor.exp
+++ b/gdb/testsuite/gdb.disasm/t09_xor.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t09_xor"
diff --git a/gdb/testsuite/gdb.disasm/t10_and.exp b/gdb/testsuite/gdb.disasm/t10_and.exp
index fdc7a22efda..9f79b841454 100644
--- a/gdb/testsuite/gdb.disasm/t10_and.exp
+++ b/gdb/testsuite/gdb.disasm/t10_and.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t10_and"
diff --git a/gdb/testsuite/gdb.disasm/t11_logs.exp b/gdb/testsuite/gdb.disasm/t11_logs.exp
index 7f1e4f99e88..d946315e6f6 100644
--- a/gdb/testsuite/gdb.disasm/t11_logs.exp
+++ b/gdb/testsuite/gdb.disasm/t11_logs.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t11_logs"
diff --git a/gdb/testsuite/gdb.disasm/t12_bit.exp b/gdb/testsuite/gdb.disasm/t12_bit.exp
index 6fdb647fb8e..7692f9422c0 100644
--- a/gdb/testsuite/gdb.disasm/t12_bit.exp
+++ b/gdb/testsuite/gdb.disasm/t12_bit.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t12_bit"
diff --git a/gdb/testsuite/gdb.disasm/t13_otr.exp b/gdb/testsuite/gdb.disasm/t13_otr.exp
index 5c9333cac1f..1b53c1642e7 100644
--- a/gdb/testsuite/gdb.disasm/t13_otr.exp
+++ b/gdb/testsuite/gdb.disasm/t13_otr.exp
@@ -15,10 +15,7 @@ 
 
 # This file was written by Michael Snyder (msnyder@redhat.com)
 
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
+require {istarget "h8300*-*-*"}
 
 
 set testfile "t13_otr"
diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp
index 6dad918d387..bda27d086d9 100644
--- a/gdb/testsuite/gdb.mi/mi-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-regs.exp
@@ -104,15 +104,13 @@  proc sparc_register_tests { } {
 	    "list changed registers"
 }
 
-if {[istarget "sparc-*-*"]} {
-    mi_clean_restart
-    sparc_register_tests_no_exec
-    mi_clean_restart $binfile
-    mi_runto_main
-    sparc_register_tests
-} else {
-    verbose "mi-regs.exp tests ignored for this target"
-}
+require {istarget "sparc-*-*"}
+
+mi_clean_restart
+sparc_register_tests_no_exec
+mi_clean_restart $binfile
+mi_runto_main
+sparc_register_tests
 
 mi_gdb_exit
 return 0
diff --git a/gdb/testsuite/gdb.reverse/ppc_record_test_isa_2_06.exp b/gdb/testsuite/gdb.reverse/ppc_record_test_isa_2_06.exp
index f3009bc9ecb..9d08114121f 100644
--- a/gdb/testsuite/gdb.reverse/ppc_record_test_isa_2_06.exp
+++ b/gdb/testsuite/gdb.reverse/ppc_record_test_isa_2_06.exp
@@ -37,10 +37,7 @@  set gen_src record_test_isa_2_06.c
 set executable record_test_isa_2_06
 set options [list debug]
 
-if {![istarget "powerpc*"]} {
-    verbose "Skipping PowerPC ISA 2.06 instruction record_test_2_06."
-    return
-}
+require {istarget "powerpc*"}
 
 if {[build_executable "failed to prepare" $executable $srcfile $options] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp b/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp
index 7a291aaa49d..9899da36829 100644
--- a/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp
+++ b/gdb/testsuite/gdb.reverse/ppc_record_test_isa_3_1.exp
@@ -37,11 +37,7 @@  standard_testfile
 set gen_src record_test_isa_3_1.c
 set executable record_test_isa_3_1
 
-if {![istarget "powerpc*"]}  {
-    verbose "Skipping PowerPC ISA 3.1 instruction record_test."
-    return
-}
-require allow_power_isa_3_1_tests
+require {istarget "powerpc*"} allow_power_isa_3_1_tests
 
 set options [list additional_flags=-mcpu=power10 debug]
 if {[build_executable "failed to prepare" $executable $srcfile $options] == -1} {
diff --git a/gdb/testsuite/gdb.reverse/s390-mvcle.exp b/gdb/testsuite/gdb.reverse/s390-mvcle.exp
index b0890400bae..26997562b24 100644
--- a/gdb/testsuite/gdb.reverse/s390-mvcle.exp
+++ b/gdb/testsuite/gdb.reverse/s390-mvcle.exp
@@ -17,12 +17,7 @@ 
 # This test tests s390 MVCLE opcode for reverse execution.
 #
 
-require supports_reverse
-
-if { ! [istarget "s390*-*-*"] } {
-    verbose "Skipping s390 MVCLE instruction recording tests."
-    return
-}
+require supports_reverse {istarget "s390*-*-*"}
 
 standard_testfile