Use require is_x86_like_target
authorTom Tromey <tom@tromey.com>
Tue, 13 Dec 2022 22:25:00 +0000 (15:25 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jan 2023 20:18:55 +0000 (13:18 -0700)
This changes some tests to use "require is_x86_like_target".

18 files changed:
gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
gdb/testsuite/gdb.arch/i386-disp-step.exp
gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
gdb/testsuite/gdb.arch/i386-prologue.exp
gdb/testsuite/gdb.arch/i386-size-overlap.exp
gdb/testsuite/gdb.arch/i386-size.exp
gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp
gdb/testsuite/gdb.arch/i386-unwind.exp
gdb/testsuite/gdb.dwarf2/callframecfa.exp
gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
gdb/testsuite/gdb.dwarf2/pieces.exp
gdb/testsuite/gdb.dwarf2/valop.exp
gdb/testsuite/gdb.dwarf2/watch-notconst.exp
gdb/testsuite/gdb.reverse/i386-precsave.exp
gdb/testsuite/gdb.reverse/i386-reverse.exp
gdb/testsuite/gdb.reverse/i387-env-reverse.exp
gdb/testsuite/gdb.reverse/i387-stack-reverse.exp

index cc19250e17f198095beccbdaecb0db551007b44e..9412b0a6418f6754d349eb90056846bfeab9582a 100644 (file)
@@ -16,9 +16,7 @@
 # [RFA] DWARF frame unwinder executes one too many rows
 # http://sourceware.org/ml/gdb-patches/2012-07/msg00650.html
 
-if { ![is_x86_like_target] } {
-    return 0
-}
+require is_x86_like_target
 
 set testfile "i386-cfi-notcurrent"
 set srcfile ${testfile}.S
index 264544db0e2e103649dfa5abeecc9fb76f4ae959..02f74136507d837b1761537a48f4bd7a8c151602 100644 (file)
 # Test i386 displaced stepping.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping x86 displaced stepping tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile .S
 
index 884b3b6cad29045be1bc6ea4179b3cfcebe33e45..56a4eee32a64d2d66f3a9ce599a39b69edb2aeb1 100644 (file)
 # Test i386 unwinder.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-gnu-cfi"
 set srcfilec ${testfile}.c
index f522f864e9c7a6c4c2c91e98910a8330d0e45313..8e24b879fd1aff0f70ad1873e75c5aa5ba6e9fd3 100644 (file)
 # Test i386 prologue analyzer.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 prologue tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-prologue"
 set srcfile ${testfile}.c
index a3c62d631068ba6608d36a35a7b958ecfce48f10..a5517b836f36eb5825de4732642f14f43e6a611e 100644 (file)
 
 # Test that GDB can handle overlapping sizes of symbols.
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile
 
index 9fcd7ba734c477ae4fa8acf70a87e81d5cace578..0b616f6889375307cc15da383d93dc7c7bc79da8 100644 (file)
 
 # Test that GDB can see the sizes of symbols.
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-size"
 set srcfile ${testfile}.c
index 009140f706794f21c0085d57f6cc937378aefff0..7b931a6d2dd461a8666a6af4fe19099aba86344a 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if ![is_x86_like_target] {
-    verbose "Skipping x86 SSE stack alignment tests."
-    return
-}
+require is_x86_like_target
 
 set testfile "i386-sse-stack-align"
 set srcfile ${testfile}.S
index d62a2408294d8c8558302e12878fc25c51de2d87..2b7bfbff76c3030dd4716c2a991c2cda6f6bfca3 100644 (file)
 standard_testfile ".S"
 
 # We can only test this if the target is i686 or x86_64 with -m32
-if { ![is_x86_like_target] } {
-    verbose "Skipping $testfile.exp"
-    return
-}
+require is_x86_like_target
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
index 2c6ba3315615d9d2c754d75a7dbe1c266d1a66c5..04ef77132eb8df4d13d4f0ba716c12fdc26b4508 100644 (file)
 # Test i386 unwinder.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 unwinder tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile
 
index 4242e08a29683421613087e4be35890045760870..9554a0f89a0123c4c0253e361a702630c02c9943 100644 (file)
@@ -17,11 +17,8 @@ load_lib dwarf.exp
 # Test DW_OP_call_frame_cfa.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 
index 90acd39cb083e719a413ed55d7306adfe616678a..b0e01afd06e31aee64174feb52579ff53086d743 100644 (file)
@@ -16,11 +16,8 @@ load_lib dwarf.exp
 # Test some DWARF piece operators.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 set csrcfile ${testfile}.c
index e6666b853aa2a54f97f2d0c8db01ca2557d12c17..9464f3f835f7997da5be490cd1a6c5b900afe725 100644 (file)
@@ -16,11 +16,8 @@ load_lib dwarf.exp
 # Test some DWARF piece operators.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 set csrcfile ${testfile}.c
index 848a19de60abdc42446cda1e29766752eb9b7729..1a58d26281ed20d53c2a601fd0450538bed7942d 100644 (file)
@@ -17,11 +17,8 @@ load_lib dwarf.exp
 # Test DW_OP_stack_value and DW_OP_implicit_value.
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
 # This test can only be run on x86 targets.
-if {![is_x86_like_target]} {
-    return 0  
-}
+require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 
index d7786bbf1b66f9bd982779a11489f32864e6ad61..0cf086b2ab8f6de6c33fe734214cb340cce2ce78 100644 (file)
@@ -17,12 +17,8 @@ load_lib dwarf.exp
 set test "watch-notconst"
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
 # This test can only be run on x86 targets.
-if { ![is_x86_like_target] } {
-    return 0
-}
+require dwarf2_support is_x86_like_target
 
 if { [prepare_for_testing "failed to prepare" "${test}" \
       {watch-notconst.c watch-notconst2.S} {nodebug}] } {
index 301e3b602083f52c409734ea7409a4a3c86486b1..3e9a402e5b6ed538a30e3cae823de1ddebab216c 100644 (file)
 #
 
 # This test suitable only for process record-replay
-require supports_process_record
-
-
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 reverse tests."
-    return
-}
+require supports_process_record is_x86_like_target
 
 standard_testfile i386-reverse.c
 set precsave [standard_output_file i386.precsave]
index 5fa7237af53e90573e71f310aa39ccdfe65addf3..42ad28d44eae6e8fbf157cc406d254b969aeb4e3 100644 (file)
 # This test tests some i386 general instructions for reverse execution.
 #
 
-require supports_reverse
-
-if {![is_x86_like_target]} {
-    verbose "Skipping i386 reverse tests."
-    return
-}
+require supports_reverse is_x86_like_target
 
 standard_testfile
 
index 0decbfc248180d186a733c5c5a88d021822b6041..7bb17f70640c14a81293dd4226bacb2c2e0494d8 100644 (file)
 # This file is part of the gdb testsuite.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i387 reverse float tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile
 
index cdb481519ec2a1210d46401766d417de5bae2bfa..ee6507af74e35b0de95436b1777986301f95a275 100644 (file)
 # This file is part of the gdb testsuite.
 
 
-if {![is_x86_like_target]} {
-    verbose "Skipping i387 reverse float tests."
-    return
-}
+require is_x86_like_target
 
 standard_testfile