From 5954db83d17f69ffecbf6a75eee4e08f53b237ca Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 13 Dec 2022 15:04:18 -0700 Subject: [PATCH] Use require supports_reverse 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 . -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 . -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 . */ -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 . -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 . -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.30.2