From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 9AC833858C39; Fri, 13 Jan 2023 20:36:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9AC833858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673642203; bh=/S+9gNhXZdnFOz2rQ/yoT/AD1JcuHkvWkQ3VgV6uJhA=; h=From:To:Subject:Date:From; b=Zor6LmADBijF70vnfIDo1NjPMpyx89UFnz2d27S6ycfmJTEihvRd72MClsenQjosE vlFbXONe2X+Co/MnOqyk8SpCO6/c2FL4zxsyaRzLJHqgM6+CjTMwyuwVsb3iX5d/eQ FpQkCyAd1HFZaPw4XdzxMkjLwES66XAbD6KgdU5M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use require isnative X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 06e93b057c2967e64ba988102dc66461a64e6c7d X-Git-Newrev: 604f757b6dae76205253d5434083a7416d6c3630 Message-Id: <20230113203643.9AC833858C39@sourceware.org> Date: Fri, 13 Jan 2023 20:36:43 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D604f757b6dae= 76205253d5434083a7416d6c3630 commit 604f757b6dae76205253d5434083a7416d6c3630 Author: Tom Tromey Date: Wed Dec 14 10:08:00 2022 -0700 Use require isnative =20 This changes some tests to use "require isnative". Diff: --- 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 f08c5770744..b82cf159011 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. =20 -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.b= ase/argv0-symlink.exp index 82e77cbe080..b321a244221 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. =20 -if { ![isnative] } { - unsupported "argv0-symlink.exp not supported on non-native target" - return -1 -} +require isnative =20 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 cd96a6ea76a..4e0d549351c 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 . =20 # 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 } =20 diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bi= gcore.exp index f3e7467e942..743dc1dfbec 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. =20 -if {![isnative]} { - untested "remote system" - return -} +require isnative =20 # 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.ba= se/break-interp.exp index 02a5685802e..2cee092b184 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 . =20 # 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 } =20 diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/c= orefile.exp index 2888e2d5e41..4da4b0de684 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -17,9 +17,7 @@ =20 =20 # are we on a target board -if {![isnative]} { - return -} +require isnative =20 standard_testfile coremaker.c =20 diff --git a/gdb/testsuite/gdb.base/corefile2.exp b/gdb/testsuite/gdb.base/= corefile2.exp index 75981ac42ab..51732d61bf5 100644 --- a/gdb/testsuite/gdb.base/corefile2.exp +++ b/gdb/testsuite/gdb.base/corefile2.exp @@ -18,9 +18,7 @@ # coremaker2.c for details. =20 # are we on a target board -if {![isnative]} { - return -} +require isnative =20 # 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 1d02233406e..1ff3f2a0c21 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; } =20 -require !skip_shlib_tests - -if { ![isnative] } { - return -1 -} +require !skip_shlib_tests isnative =20 # Increase this to see more detail. set test_verbose 0 diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/pr= elink.exp index a89aaa1b370..9c5b777b4a2 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 =20 =20 -if { ![isnative] || [is_remote host] || [skip_shlib_tests]} { +require isnative +if { [is_remote host] || [skip_shlib_tests]} { return } =20 diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base= /skip-solib.exp index 60d5dffe527..22a1e8746e7 100644 --- a/gdb/testsuite/gdb.base/skip-solib.exp +++ b/gdb/testsuite/gdb.base/skip-solib.exp @@ -20,8 +20,8 @@ # =20 # 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 } =20 diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-as= ync.exp index 880db6de68b..5ca7c5dccc3 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 } =20 diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi= -corefile.exp index 9f9cac56779..0c791888117 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=3Dmi" =20 -if {![isnative]} { - return -} +require isnative =20 standard_testfile =20 diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsui= te/gdb.threads/attach-into-signal.exp index c778d31719c..4a5caaa2e85 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 . =20 # 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 } =20 diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsu= ite/gdb.threads/attach-slow-waitpid.exp index 823614e5ba3..7512a672890 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. =20 # 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 } =20 diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/g= db.threads/attach-stopped.exp index 3904d4c087b..35b31afafaf 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 . =20 # 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 } =20 diff --git a/gdb/testsuite/gdb.threads/corethreads.exp b/gdb/testsuite/gdb.= threads/corethreads.exp index d1f70959e18..026499e30d3 100644 --- a/gdb/testsuite/gdb.threads/corethreads.exp +++ b/gdb/testsuite/gdb.threads/corethreads.exp @@ -15,7 +15,8 @@ =20 # Are we on a target board? And non-Linux targets seem to identify the th= read # differently. -if {![isnative] || ![istarget "*-*-linux*"]} { +require isnative +if {![istarget "*-*-linux*"]} { return }