From patchwork Thu Jan 12 03:00:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63024 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 708453947C25 for ; Thu, 12 Jan 2023 03:04:31 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from progateway7-pub.mail.pro1.eigbox.com (gproxy5-pub.mail.unifiedlayer.com [67.222.38.55]) by sourceware.org (Postfix) with ESMTPS id 2F8853842405 for ; Thu, 12 Jan 2023 03:01:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F8853842405 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw12.mail.unifiedlayer.com (unknown [10.0.90.127]) by progateway7.mail.pro1.eigbox.com (Postfix) with ESMTP id A717E10048EA5 for ; Thu, 12 Jan 2023 03:01:26 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id FnqIpqV2hB18UFnqIpA3pI; Thu, 12 Jan 2023 03:01:26 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Ns4Uz+RJ c=1 sm=1 tr=0 ts=63bf7806 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=RvmDmJFTN0MA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=mDV3o1hIAAAA:8 a=20KFwNOVAAAA:8 a=EfKeO2n_S1Yg4wZTmnsA:9 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pJzg51Nu0uNIsIMVyzR+8G3HX0JwQ/2pMxf8B5m+dHo=; b=okJz8CvdVNjoFe1xitk0+r7PJH f3toUxII7qRRqdDjk/d9WmmTFQFPs8KFyvjbA/qhJbv2MJPZ4H4lCXveUDGrz/PDukFkSnvUPt9Be ndU4YSfwEgBnmVndfFNjzyKF3; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:36770 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pFnqI-000liJ-Bq; Wed, 11 Jan 2023 20:01:26 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 34/79] Use require isnative Date: Wed, 11 Jan 2023 20:00:07 -0700 Message-Id: <20230112030052.3306113-35-tom@tromey.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112030052.3306113-1-tom@tromey.com> References: <20230112030052.3306113-1-tom@tromey.com> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.76.186 X-Source-L: No X-Exim-ID: 1pFnqI-000liJ-Bq X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:36770 X-Source-Auth: tom+tromey.com X-Email-Count: 35 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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 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. -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 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. -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 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 . # 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 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. -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 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 . # 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 2888e2d5e41..4da4b0de684 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 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. # 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 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; } -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 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 -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 60d5dffe527..22a1e8746e7 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 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 } 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=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 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 . # 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 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. # 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 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 . # 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 d1f70959e18..026499e30d3 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 }