From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 34/46] Use require isnative
Date: Fri, 16 Dec 2022 17:08:06 -0700 [thread overview]
Message-ID: <20221217000818.3729389-35-tom@tromey.com> (raw)
In-Reply-To: <20221217000818.3729389-1-tom@tromey.com>
This changes some tests to use "require isnative".
---
gdb/testsuite/gdb.arch/s390-multiarch.exp | 3 ++-
gdb/testsuite/gdb.base/argv0-symlink.exp | 5 +----
gdb/testsuite/gdb.base/attach-pie-misread.exp | 5 ++---
gdb/testsuite/gdb.base/bigcore.exp | 5 +----
gdb/testsuite/gdb.base/break-interp.exp | 5 ++---
gdb/testsuite/gdb.base/corefile.exp | 4 +---
gdb/testsuite/gdb.base/corefile2.exp | 4 +---
gdb/testsuite/gdb.base/jit-reader.exp | 6 +-----
gdb/testsuite/gdb.base/prelink.exp | 3 ++-
gdb/testsuite/gdb.base/skip-solib.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-async.exp | 3 ++-
gdb/testsuite/gdb.mi/mi-corefile.exp | 4 +---
gdb/testsuite/gdb.threads/attach-into-signal.exp | 4 ++--
gdb/testsuite/gdb.threads/attach-slow-waitpid.exp | 4 ++--
gdb/testsuite/gdb.threads/attach-stopped.exp | 4 ++--
gdb/testsuite/gdb.threads/corethreads.exp | 3 ++-
16 files changed, 26 insertions(+), 40 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/s390-multiarch.exp b/gdb/testsuite/gdb.arch/s390-multiarch.exp
index 71cb53a5db9..1d98d887c1f 100644
--- a/gdb/testsuite/gdb.arch/s390-multiarch.exp
+++ b/gdb/testsuite/gdb.arch/s390-multiarch.exp
@@ -23,7 +23,8 @@
# running native. It should be executed on a sufficiently new Linux
# kernel that provides the 'system_call' regset.
-if { ![isnative] || ![istarget s390x-*-* ] } {
+require isnative
+if { ![istarget s390x-*-* ] } {
verbose "Skipping s390 multi-arch tests."
return
}
diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
index 0838b07c246..8247505392c 100644
--- a/gdb/testsuite/gdb.base/argv0-symlink.exp
+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
@@ -20,10 +20,7 @@
# Therefore, it can't work reliably on anything other than configurations
# where build/host/target are all the same.
-if { ![isnative] } {
- unsupported "argv0-symlink.exp not supported on non-native target"
- return -1
-}
+require isnative
if { [is_remote host] } {
unsupported "argv0-symlink.exp not supported on remote host"
diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
index 2049dd4bb88..d1614b38242 100644
--- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
@@ -14,9 +14,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This test only works on GNU/Linux.
-require !use_gdb_stub
-if { ![isnative] || [is_remote host]
- || ![istarget *-linux*] || [skip_shlib_tests]} {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
return
}
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index 8acb716c9b5..8f32133deb7 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -20,10 +20,7 @@
# Are we on a target board? As of 2004-02-12, GDB didn't have a
# mechanism that would let it efficiently access a remote corefile.
-if {![isnative]} {
- untested "remote system"
- return
-}
+require isnative
# Can the system run this test (in particular support sparse
# corefiles)? On systems that lack sparse corefile support this test
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 3ec47628256..f0923239195 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -14,9 +14,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This test only works on GNU/Linux.
-require !use_gdb_stub
-if { ![isnative] || [is_remote host]
- || ![istarget *-linux*] || [skip_shlib_tests]} {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
return
}
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index f15e1e9e81d..283f5af6792 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -17,9 +17,7 @@
# are we on a target board
-if {![isnative]} {
- return
-}
+require isnative
standard_testfile coremaker.c
diff --git a/gdb/testsuite/gdb.base/corefile2.exp b/gdb/testsuite/gdb.base/corefile2.exp
index b08bd714ca9..353833a3570 100644
--- a/gdb/testsuite/gdb.base/corefile2.exp
+++ b/gdb/testsuite/gdb.base/corefile2.exp
@@ -18,9 +18,7 @@
# coremaker2.c for details.
# are we on a target board
-if {![isnative]} {
- return
-}
+require isnative
# Some of these tests will only work on GNU/Linux due to the
# fact that Linux core files includes a section describing
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index bda31fef0a6..d13c1336132 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -22,11 +22,7 @@ if { (![istarget x86_64-*-*] && ![istarget i?86-*-*]) || ![is_lp64_target] } {
return -1;
}
-require !skip_shlib_tests
-
-if { ![isnative] } {
- return -1
-}
+require !skip_shlib_tests isnative
# Increase this to see more detail.
set test_verbose 0
diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp
index 8145a5b8a68..755f687607b 100644
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -19,7 +19,8 @@
# This file was written by Alexandre Oliva <aoliva@redhat.com>
-if { ![isnative] || [is_remote host] || [skip_shlib_tests]} {
+require isnative
+if { [is_remote host] || [skip_shlib_tests]} {
return
}
diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp
index 49539bb6695..e1245e7b4b8 100644
--- a/gdb/testsuite/gdb.base/skip-solib.exp
+++ b/gdb/testsuite/gdb.base/skip-solib.exp
@@ -20,8 +20,8 @@
#
# This only works on GNU/Linux.
-if { ![isnative] || [is_remote host] || ![istarget *-linux*]
- || [skip_shlib_tests]} {
+require isnative
+if { [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp
index 5687c9ac335..da95225b209 100644
--- a/gdb/testsuite/gdb.mi/mi-async.exp
+++ b/gdb/testsuite/gdb.mi/mi-async.exp
@@ -21,7 +21,8 @@
# mi_run_cmd, it ignores whatever target the rest of GDB testsuite is
# using, and always tries to run natively. So, don't do anything unless
# we're actually testing native.
-if {!([isnative] && [istarget *-linux*])} {
+require isnative
+if {![istarget *-linux*]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi-corefile.exp
index 61aec326bcb..b3439234240 100644
--- a/gdb/testsuite/gdb.mi/mi-corefile.exp
+++ b/gdb/testsuite/gdb.mi/mi-corefile.exp
@@ -18,9 +18,7 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if {![isnative]} {
- return
-}
+require isnative
standard_testfile
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp
index c2b8ffebf65..75ddc680806 100644
--- a/gdb/testsuite/gdb.threads/attach-into-signal.exp
+++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp
@@ -17,8 +17,8 @@
# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
# This test only works on Linux
-require !use_gdb_stub
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] } {
return
}
diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
index aa9488af8a6..b11692ad601 100644
--- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
+++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
@@ -37,8 +37,8 @@
# during the attach phase.
# This test only works on Linux
-require !use_gdb_stub
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] } {
return
}
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
index 320c304bb7a..ecdb234584e 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
@@ -18,8 +18,8 @@
# This file was updated by Jan Kratochvil <jan.kratochvil@redhat.com>.
# This test only works on Linux
-require !use_gdb_stub
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
+require !use_gdb_stub isnative
+if { [is_remote host] || ![istarget *-linux*] } {
return
}
diff --git a/gdb/testsuite/gdb.threads/corethreads.exp b/gdb/testsuite/gdb.threads/corethreads.exp
index 7e10f557776..0108c7469c7 100644
--- a/gdb/testsuite/gdb.threads/corethreads.exp
+++ b/gdb/testsuite/gdb.threads/corethreads.exp
@@ -15,7 +15,8 @@
# Are we on a target board? And non-Linux targets seem to identify the thread
# differently.
-if {![isnative] || ![istarget "*-*-linux*"]} {
+require isnative
+if {![istarget "*-*-linux*"]} {
return
}
--
2.38.1
next prev parent reply other threads:[~2022-12-17 0:08 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 0:07 [PATCH 00/46] Rewrite "require" test procedure and use it more often Tom Tromey
2022-12-17 0:07 ` [PATCH 01/46] Don't use ensure_gdb_index with require Tom Tromey
2022-12-17 0:07 ` [PATCH 02/46] Change 'require' to accept a list of predicates Tom Tromey
2022-12-17 0:07 ` [PATCH 03/46] Use unsupported in 'require' Tom Tromey
2022-12-23 12:39 ` Aktemur, Tankut Baris
2023-01-06 1:14 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 04/46] Use require supports_reverse Tom Tromey
2022-12-17 0:07 ` [PATCH 05/46] Use require supports_process_record Tom Tromey
2022-12-17 0:07 ` [PATCH 06/46] Use require dwarf2_support Tom Tromey
2022-12-17 0:07 ` [PATCH 07/46] Use require is_x86_like_target Tom Tromey
2022-12-17 0:07 ` [PATCH 08/46] Use require skip_cplus_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 09/46] Use require skip_shlib_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 10/46] Use require skip_dlmopen_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 11/46] Use require skip_stl_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 12/46] Use require skip_rust_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 13/46] Use require skip_fortran_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 14/46] Use require skip_ada_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 15/46] Use require skip_go_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 16/46] Use require skip_d_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 17/46] Use require skip_ctf_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 18/46] Use require skip_hw_watchpoint_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 19/46] Use require skip_ifunc_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 20/46] Use require skip_aarch64_sve_tests Tom Tromey
2022-12-19 10:50 ` Luis Machado
2022-12-17 0:07 ` [PATCH 21/46] Use require skip_btrace_tests Tom Tromey
2022-12-17 1:15 ` Enze Li
2022-12-18 0:48 ` Tom Tromey
2022-12-19 5:13 ` Enze Li
2022-12-19 14:44 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 22/46] " Tom Tromey
2022-12-17 9:22 ` Metzger, Markus T
2022-12-18 17:46 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 23/46] Use require skip_avx_* Tom Tromey
2022-12-17 0:07 ` [PATCH 24/46] Use require support_displaced_stepping Tom Tromey
2022-12-17 0:07 ` [PATCH 25/46] Use require is_aarch64_target Tom Tromey
2022-12-19 10:46 ` Luis Machado
2022-12-17 0:07 ` [PATCH 26/46] Use require is_aarch32_target Tom Tromey
2022-12-19 10:46 ` Luis Machado
2022-12-17 0:07 ` [PATCH 27/46] Use require is_amd64_regs_target Tom Tromey
2022-12-17 0:08 ` [PATCH 28/46] Use require is_elf_target Tom Tromey
2022-12-17 0:08 ` [PATCH 29/46] Use require can_single_step_to_signal_handler Tom Tromey
2022-12-17 0:08 ` [PATCH 30/46] Use require supports_get_siginfo_type Tom Tromey
2022-12-17 0:08 ` [PATCH 31/46] Use require support_go_compile Tom Tromey
2022-12-17 0:08 ` [PATCH 32/46] Use require use_gdb_stub Tom Tromey
2022-12-17 0:08 ` [PATCH 33/46] Use require can_spawn_for_attach Tom Tromey
2022-12-17 0:08 ` Tom Tromey [this message]
2022-12-17 0:08 ` [PATCH 35/46] Use require skip_gdbserver_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 36/46] Use require skip_shlib_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 37/46] Use require is_c_compiler_gcc Tom Tromey
2022-12-17 0:08 ` [PATCH 38/46] Use require gdb_debug_enabled Tom Tromey
2022-12-17 0:08 ` [PATCH 39/46] Use require gdb_skip_xml_test Tom Tromey
2022-12-17 0:08 ` [PATCH 40/46] Use require gdb_trace_common_supports_arch Tom Tromey
2022-12-17 0:08 ` [PATCH 41/46] Use require skip_perf_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 42/46] Use require skip_opencl_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 43/46] Use require target_can_use_run_cmd Tom Tromey
2022-12-17 0:08 ` [PATCH 44/46] Use require using_fission Tom Tromey
2022-12-17 0:08 ` [PATCH 45/46] Use require skip_debuginfod_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 46/46] Use require gnat_runtime_has_debug_info Tom Tromey
2022-12-19 10:49 ` [PATCH 00/46] Rewrite "require" test procedure and use it more often Luis Machado
2023-01-06 2:45 ` Tom Tromey
2023-01-05 1:29 ` Kevin Buettner
2023-01-06 2:47 ` Tom Tromey
2023-01-07 0:07 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221217000818.3729389-35-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).