[28/46] Use require is_elf_target

Message ID 20221217000818.3729389-29-tom@tromey.com
State Committed
Headers
Series Rewrite "require" test procedure and use it more often |

Commit Message

Tom Tromey Dec. 17, 2022, 12:08 a.m. UTC
  This changes some tests to use "require is_elf_target".
---
 gdb/testsuite/gdb.base/rtld-step.exp | 4 +---
 gdb/testsuite/gdb.base/sym-file.exp  | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
  

Patch

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