From patchwork Sun Jan 22 21:55:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63569 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 E27B43858404 for ; Sun, 22 Jan 2023 21:56:59 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from outbound-ss-761.bluehost.com (outbound-ss-761.bluehost.com [74.220.211.250]) by sourceware.org (Postfix) with ESMTPS id 8F3743858C53 for ; Sun, 22 Jan 2023 21:56:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F3743858C53 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 cmgw10.mail.unifiedlayer.com (unknown [10.0.90.125]) by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id 0C55F10043B4B for ; Sun, 22 Jan 2023 21:56:12 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id JiJvpUmBdnkPJJiJwpUdmV; Sun, 22 Jan 2023 21:56:12 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=f86NuM+M c=1 sm=1 tr=0 ts=63cdb0fc 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=HEKH6KdQyLo3-WDTPt8A: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=0YYm7FFSvPgC5Qyy/OOM15jNVLJtCIt+zUTOXlgdktY=; b=frTKbaC3EWewtFDQYY6LsYC5sF zwzo65DNIXq6pMDTunJ8Hlw9A3X1XoukR31ZKa89f62PiqW/yzZAdoCRFImu+kCWppFJyyXZECTdm dYPPSMUKlQVOdcp+s2joKAcvy; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:55760 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 1pJiJv-003faM-PU; Sun, 22 Jan 2023 14:56:11 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 8/8] Use require with is_remote Date: Sun, 22 Jan 2023 14:55:58 -0700 Message-Id: <20230122215558.1931803-9-tom@tromey.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230122215558.1931803-1-tom@tromey.com> References: <20230122215558.1931803-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: 1pJiJv-003faM-PU X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:55760 X-Source-Auth: tom+tromey.com X-Email-Count: 12 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3027.8 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 with 'is_remote', rather than an explicit test. This adds uniformity helps clean up more spots where a test might exit early without any notification. --- gdb/testsuite/gdb.base/annotate-symlink.exp | 5 +---- gdb/testsuite/gdb.base/argv0-symlink.exp | 5 +---- gdb/testsuite/gdb.base/attach-pie-misread.exp | 5 ++--- gdb/testsuite/gdb.base/auto-load.exp | 4 +--- gdb/testsuite/gdb.base/break-interp.exp | 5 ++--- gdb/testsuite/gdb.base/bt-on-fatal-signal.exp | 5 +---- gdb/testsuite/gdb.base/fullname.exp | 5 +---- gdb/testsuite/gdb.base/fullpath-expand.exp | 5 +---- gdb/testsuite/gdb.base/gdbhistsize-history.exp | 5 +---- gdb/testsuite/gdb.base/gdbinit-history.exp | 5 +---- gdb/testsuite/gdb.base/info-fun.exp | 4 +--- gdb/testsuite/gdb.base/libsegfault.exp | 5 +---- gdb/testsuite/gdb.base/macro-source-path.exp | 4 +--- gdb/testsuite/gdb.base/prelink.exp | 4 +--- gdb/testsuite/gdb.base/realname-expand.exp | 5 +---- gdb/testsuite/gdb.base/skip-solib.exp | 5 ++--- gdb/testsuite/gdb.base/solib-corrupted.exp | 6 +----- gdb/testsuite/gdb.base/solib-nodir.exp | 4 +--- gdb/testsuite/gdb.base/solib-search.exp | 5 +---- gdb/testsuite/gdb.base/startup-with-shell.exp | 5 +---- gdb/testsuite/gdb.base/style-logging.exp | 5 +---- gdb/testsuite/gdb.base/valgrind-bt.exp | 5 +---- gdb/testsuite/gdb.base/valgrind-disp-step.exp | 5 +---- gdb/testsuite/gdb.base/valgrind-infcall-2.exp | 5 +---- gdb/testsuite/gdb.base/valgrind-infcall.exp | 5 +---- gdb/testsuite/gdb.base/warning.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp | 6 ++---- gdb/testsuite/gdb.dwarf2/dwzbuildid.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dwznolink.exp | 4 +--- gdb/testsuite/gdb.dwarf2/fission-base.exp | 4 +--- gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp | 4 +--- gdb/testsuite/gdb.dwarf2/fission-loclists.exp | 4 +--- gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp | 4 +--- gdb/testsuite/gdb.dwarf2/fission-reread.exp | 4 +--- gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp | 4 +--- gdb/testsuite/gdb.linespec/macro-relative.exp | 5 +---- gdb/testsuite/gdb.python/py-pp-maint.exp | 5 +---- gdb/testsuite/gdb.server/abspath.exp | 4 +--- gdb/testsuite/gdb.server/server-connect.exp | 4 +--- gdb/testsuite/gdb.server/server-pipe.exp | 4 +--- gdb/testsuite/gdb.threads/attach-into-signal.exp | 5 ++--- gdb/testsuite/gdb.threads/attach-slow-waitpid.exp | 5 ++--- gdb/testsuite/gdb.threads/attach-stopped.exp | 5 ++--- 43 files changed, 50 insertions(+), 151 deletions(-) diff --git a/gdb/testsuite/gdb.base/annotate-symlink.exp b/gdb/testsuite/gdb.base/annotate-symlink.exp index a0f8ed9eabc..9406a546ed8 100644 --- a/gdb/testsuite/gdb.base/annotate-symlink.exp +++ b/gdb/testsuite/gdb.base/annotate-symlink.exp @@ -15,10 +15,7 @@ standard_testfile realname-expand.c realname-expand-real.c -if [is_remote host] { - unsupported "compiling on a remote host does not support a filename with directory." - return 0 -} +require {!is_remote host} set srcdirabs [file join [pwd] $srcdir] set srcfilelink [standard_output_file realname-expand-link.c] diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp index b321a244221..57b348b36bb 100644 --- a/gdb/testsuite/gdb.base/argv0-symlink.exp +++ b/gdb/testsuite/gdb.base/argv0-symlink.exp @@ -22,10 +22,7 @@ require isnative -if { [is_remote host] } { - unsupported "argv0-symlink.exp not supported on remote host" - return -1 -} +require {!is_remote host} standard_testfile diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp index 96f02429abd..484bd487a3b 100644 --- a/gdb/testsuite/gdb.base/attach-pie-misread.exp +++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp @@ -15,9 +15,8 @@ # This test only works on GNU/Linux. require !use_gdb_stub isnative allow_shlib_tests -if { [is_remote host] || ![istarget *-linux*] } { - return -} +require {!is_remote host} +require {istarget *-linux*} load_lib prelink-support.exp diff --git a/gdb/testsuite/gdb.base/auto-load.exp b/gdb/testsuite/gdb.base/auto-load.exp index 23cf72a942f..02ce0467730 100644 --- a/gdb/testsuite/gdb.base/auto-load.exp +++ b/gdb/testsuite/gdb.base/auto-load.exp @@ -15,9 +15,7 @@ standard_testfile -if [is_remote host] { - return 0 -} +require {!is_remote host} set targetdir "${binfile}.dir" set sourcescript "${srcdir}/${subdir}/${testfile}-script" diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index 9652b32b632..6061c739d05 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -15,9 +15,8 @@ # This test only works on GNU/Linux. require !use_gdb_stub isnative allow_shlib_tests -if { [is_remote host] || ![istarget *-linux*] } { - return -} +require {!is_remote host} +require {istarget *-linux*} load_lib prelink-support.exp diff --git a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp index 128db758284..d0364cc6b89 100644 --- a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp +++ b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp @@ -23,10 +23,7 @@ standard_testfile # remote host (will the signal go to GDB, or the program that # established the connection to the remote host?), so just skip this # test for remote host setups. -if {[is_remote host]} { - untested $testfile - return -1 -} +require {!is_remote host} if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 diff --git a/gdb/testsuite/gdb.base/fullname.exp b/gdb/testsuite/gdb.base/fullname.exp index 19da89eae45..f1b45d714e7 100644 --- a/gdb/testsuite/gdb.base/fullname.exp +++ b/gdb/testsuite/gdb.base/fullname.exp @@ -20,10 +20,7 @@ standard_testfile # We rely on being able to copy things around. -if { [is_remote host] } { - untested "setting breakpoints by full path" - return -1 -} +require {!is_remote host} # Create a temporary file in the build directory. Use a different # filename in case ${srcdir} == ${objdir}. diff --git a/gdb/testsuite/gdb.base/fullpath-expand.exp b/gdb/testsuite/gdb.base/fullpath-expand.exp index aee23fe0fea..3b8a32642b0 100644 --- a/gdb/testsuite/gdb.base/fullpath-expand.exp +++ b/gdb/testsuite/gdb.base/fullpath-expand.exp @@ -15,10 +15,7 @@ standard_testfile .c fullpath-expand-func.c -if [is_remote host] { - unsupported "compiling on a remote host does not support a filename with directory." - return 0 -} +require {!is_remote host} if { [file pathtype $objdir] != "absolute" } { untested "objdir $objdir is not absolute" diff --git a/gdb/testsuite/gdb.base/gdbhistsize-history.exp b/gdb/testsuite/gdb.base/gdbhistsize-history.exp index d3e4a052c6b..96df765c73b 100644 --- a/gdb/testsuite/gdb.base/gdbhistsize-history.exp +++ b/gdb/testsuite/gdb.base/gdbhistsize-history.exp @@ -21,10 +21,7 @@ # We cannot expect remote hosts to see environment variables set on the # local machine. -if { [is_remote host] } { - unsupported "can't set environment variables on remote host" - return -1 -} +require {!is_remote host} # Check that the history size is properly set to SIZE when the environment # variable ENV_VAR is set to GDBHISTSIZE. diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp index 46d76b0e239..cb87b5f1bbf 100644 --- a/gdb/testsuite/gdb.base/gdbinit-history.exp +++ b/gdb/testsuite/gdb.base/gdbinit-history.exp @@ -24,10 +24,7 @@ # Do not run if gdb debug is enabled - it interferes with the command history. require !gdb_debug_enabled -if { [is_remote host] } { - unsupported "can't set environment variables on remote host" - return -1 -} +require {!is_remote host} # Check that the history size is properly set to SIZE when reading the .gdbinit # file located in HOME with the environment variable GDBHISTSIZE optionally diff --git a/gdb/testsuite/gdb.base/info-fun.exp b/gdb/testsuite/gdb.base/info-fun.exp index 683c732e671..c14d87b8cc7 100644 --- a/gdb/testsuite/gdb.base/info-fun.exp +++ b/gdb/testsuite/gdb.base/info-fun.exp @@ -13,9 +13,7 @@ # along with this program. If not, see . require allow_shlib_tests -if { [is_remote target] } { - return 0 -} +require {!is_remote target} # Library file. set libname "info-fun-solib" diff --git a/gdb/testsuite/gdb.base/libsegfault.exp b/gdb/testsuite/gdb.base/libsegfault.exp index 9a983992ea0..7862c9600fe 100644 --- a/gdb/testsuite/gdb.base/libsegfault.exp +++ b/gdb/testsuite/gdb.base/libsegfault.exp @@ -22,10 +22,7 @@ # We cannot expect remote hosts to see environment variables set on # the local machine. -if { [is_remote host] } { - unsupported "can't set environment variables on remote host" - return -1 -} +require {!is_remote host} # Spawn GDB with LIB preloaded with LD_PRELOAD. CMDLINE_OPTS are # command line options passed to GDB. diff --git a/gdb/testsuite/gdb.base/macro-source-path.exp b/gdb/testsuite/gdb.base/macro-source-path.exp index d46e93bb5c1..2d6eaeb6c65 100644 --- a/gdb/testsuite/gdb.base/macro-source-path.exp +++ b/gdb/testsuite/gdb.base/macro-source-path.exp @@ -23,9 +23,7 @@ standard_testfile # If the host is remote, source files are uploaded to the host and compiled # there, but without the directory structure we expect, making the test # pointless. Skip the test in that case. -if { [is_remote host] } { - return -} +require {!is_remote host} # Copy the source file at these locations in the output directory ($out): # diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp index 6945a923194..12837b95255 100644 --- a/gdb/testsuite/gdb.base/prelink.exp +++ b/gdb/testsuite/gdb.base/prelink.exp @@ -20,9 +20,7 @@ require isnative allow_shlib_tests is_c_compiler_gcc -if { [is_remote host] } { - return -} +require {!is_remote host} load_lib prelink-support.exp diff --git a/gdb/testsuite/gdb.base/realname-expand.exp b/gdb/testsuite/gdb.base/realname-expand.exp index ade6fe22c52..ecfff10d8c6 100644 --- a/gdb/testsuite/gdb.base/realname-expand.exp +++ b/gdb/testsuite/gdb.base/realname-expand.exp @@ -15,10 +15,7 @@ standard_testfile .c realname-expand-real.c -if [is_remote host] { - unsupported "compiling on a remote host does not support a filename with directory." - return 0 -} +require {!is_remote host} set srcdirabs [file join [pwd] $srcdir] set srcfilelink [standard_output_file realname-expand-link.c] diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp index e04bec9c504..3cdb455bb59 100644 --- a/gdb/testsuite/gdb.base/skip-solib.exp +++ b/gdb/testsuite/gdb.base/skip-solib.exp @@ -21,9 +21,8 @@ # This only works on GNU/Linux. require isnative allow_shlib_tests -if { [is_remote host] || ![istarget *-linux*] } { - return -} +require {!is_remote host} +require {istarget *-linux*} set test "skip-solib" set srcfile_main "${test}-main.c" diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp index 644c8ece11f..a2fbaa6ac40 100644 --- a/gdb/testsuite/gdb.base/solib-corrupted.exp +++ b/gdb/testsuite/gdb.base/solib-corrupted.exp @@ -15,11 +15,7 @@ require allow_shlib_tests -if {[is_remote target]} { - # gdbserver prints the warning message but expect is parsing only the GDB - # output, not the gdbserver output. - return 0 -} +require {!is_remote target} set testfile "solib-corrupted" set srcfile start.c diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp index dd0724909ad..1530d80d694 100644 --- a/gdb/testsuite/gdb.base/solib-nodir.exp +++ b/gdb/testsuite/gdb.base/solib-nodir.exp @@ -16,9 +16,7 @@ require allow_shlib_tests # The testcase assumes the target can access the OBJDIR. -if [is_remote target] { - return -} +require {!is_remote target} # We need to be able to influence the target's environment and working # directory. Can't do that if when we connect the inferior is already diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp index 5e9e3d43ee0..1d678efc2d5 100644 --- a/gdb/testsuite/gdb.base/solib-search.exp +++ b/gdb/testsuite/gdb.base/solib-search.exp @@ -17,10 +17,7 @@ # is properly reset when the path is changed. require allow_shlib_tests -if {[is_remote target]} { - untested "skipping remote target and shared library tests" - return -1 -} +require {!is_remote target} # Build "wrong" and "right" versions of the libraries in separate directories. set wrong_lib_subdir "solib-search-wrong" diff --git a/gdb/testsuite/gdb.base/startup-with-shell.exp b/gdb/testsuite/gdb.base/startup-with-shell.exp index b1f868b520a..51b1e4fa922 100644 --- a/gdb/testsuite/gdb.base/startup-with-shell.exp +++ b/gdb/testsuite/gdb.base/startup-with-shell.exp @@ -20,10 +20,7 @@ require !use_gdb_stub # There's no easy way to set environment variables on remote targets # (via dejagnu) yet. -if { [is_remote target] } { - untested "remote board" - return -} +require {!is_remote target} standard_testfile diff --git a/gdb/testsuite/gdb.base/style-logging.exp b/gdb/testsuite/gdb.base/style-logging.exp index dcf13575a17..a156c39146f 100644 --- a/gdb/testsuite/gdb.base/style-logging.exp +++ b/gdb/testsuite/gdb.base/style-logging.exp @@ -18,10 +18,7 @@ # Do not run if gdb debug is enabled as it will interfere with log redirect. require !gdb_debug_enabled -if {[is_remote host]} { - untested "does not work on remote host" - return 0 -} +require {!is_remote host} standard_testfile style.c diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.base/valgrind-bt.exp index da0261eabe6..6849a344ee3 100644 --- a/gdb/testsuite/gdb.base/valgrind-bt.exp +++ b/gdb/testsuite/gdb.base/valgrind-bt.exp @@ -18,10 +18,7 @@ require allow_xml_test load_lib valgrind.exp -if [is_remote target] { - # The test always runs locally. - return 0 -} +require {!is_remote target} standard_testfile .c if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} { diff --git a/gdb/testsuite/gdb.base/valgrind-disp-step.exp b/gdb/testsuite/gdb.base/valgrind-disp-step.exp index 3fb4341d2c7..1033ac8c6a7 100644 --- a/gdb/testsuite/gdb.base/valgrind-disp-step.exp +++ b/gdb/testsuite/gdb.base/valgrind-disp-step.exp @@ -23,10 +23,7 @@ require allow_xml_test load_lib valgrind.exp -if [is_remote target] { - # The test always runs locally. - return 0 -} +require {!is_remote target} standard_testfile .c if {[build_executable "failed to build" $testfile $srcfile {debug}] == -1} { diff --git a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp index 6ed6ecd1d42..aa8f472cdb5 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp @@ -34,10 +34,7 @@ require allow_xml_test load_lib valgrind.exp -if [is_remote target] { - # The test always runs locally. - return 0 -} +require {!is_remote target} standard_testfile .c if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} { diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index bcaca02c900..01267734409 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -18,10 +18,7 @@ require allow_xml_test load_lib valgrind.exp -if [is_remote target] { - # The test always runs locally. - return 0 -} +require {!is_remote target} standard_testfile .c if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} { diff --git a/gdb/testsuite/gdb.base/warning.exp b/gdb/testsuite/gdb.base/warning.exp index 50e680b920d..e58bde537f1 100644 --- a/gdb/testsuite/gdb.base/warning.exp +++ b/gdb/testsuite/gdb.base/warning.exp @@ -15,10 +15,7 @@ # Test that an early warning does not cause a crash. -if {[is_remote host]} { - unsupported "warning.exp can only run on local host" - return -} +require {!is_remote host} set tname [standard_temp_file warning] set fd [open $tname w] diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp index 2f37d4d7955..a6beba443c4 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp @@ -19,10 +19,8 @@ require dwarf2_support # This test has hard-wired assumptions that host and build filenames are # the same, and assumes POSIX pathname syntax. -if { [is_remote host] || [ishost *-*-mingw*] } { - unsupported "can only run on local host" - return 0 -} +require {!is_remote host} +require {!ishost *-*-mingw*} # Find length of addresses in bytes. if {[is_64_target]} { diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp index 48fc619f869..1b9ba8da092 100644 --- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp +++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp @@ -19,9 +19,7 @@ load_lib dwarf.exp require dwarf2_support # No remote host testing either. -if {[is_remote host]} { - return 0 -} +require {!is_remote host} # Lots of source files since we test a few cases and make new files diff --git a/gdb/testsuite/gdb.dwarf2/dwznolink.exp b/gdb/testsuite/gdb.dwarf2/dwznolink.exp index a03bff29068..d0bfa6b57f7 100644 --- a/gdb/testsuite/gdb.dwarf2/dwznolink.exp +++ b/gdb/testsuite/gdb.dwarf2/dwznolink.exp @@ -19,9 +19,7 @@ load_lib dwarf.exp require dwarf2_support # No remote host testing either. -if {[is_remote host]} { - return 0 -} +require {!is_remote host} standard_testfile main.c dwznolink.S diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp index c3338c2951d..b654de40fcb 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-base.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp @@ -16,9 +16,7 @@ load_lib dwarf.exp # We run objcopy locally to split out the .dwo file. -if [is_remote host] { - return 0 -} +require {!is_remote host} # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp index c13450da03d..a6fb3e875a8 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp @@ -21,9 +21,7 @@ load_lib dwarf.exp # We run objcopy locally to split out the .dwo file. -if [is_remote host] { - return 0 -} +require {!is_remote host} # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp index 31c7bcafbaf..d906eeb69cc 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp @@ -16,9 +16,7 @@ load_lib dwarf.exp # We run objcopy locally to split out the .dwo file. -if [is_remote host] { - return 0 -} +require {!is_remote host} # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp index 7bdf6271f5a..0a2a079e82b 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp @@ -19,9 +19,7 @@ load_lib dwarf.exp # We run objcopy locally to split out the .dwo file. -if [is_remote host] { - return 0 -} +require {!is_remote host} # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp index 0ef2b134ea0..01e9eada575 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp @@ -16,9 +16,7 @@ load_lib dwarf.exp # We run objcopy locally to split out the .dwo file. -if [is_remote host] { - return 0 -} +require {!is_remote host} # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support diff --git a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp index 871a1867308..538004ec95a 100644 --- a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp +++ b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp @@ -21,9 +21,7 @@ load_lib dwarf.exp require dwarf2_support # No remote host testing either. -if {[is_remote host]} { - return 0 -} +require {!is_remote host} standard_testfile main.c no-gnu-debuglink.S diff --git a/gdb/testsuite/gdb.linespec/macro-relative.exp b/gdb/testsuite/gdb.linespec/macro-relative.exp index 41159431ddc..b0f2f22306b 100644 --- a/gdb/testsuite/gdb.linespec/macro-relative.exp +++ b/gdb/testsuite/gdb.linespec/macro-relative.exp @@ -18,10 +18,7 @@ standard_testfile # Fission doesn't support macros yet. Bug 15954. require !using_fission -if [is_remote host] { - unsupported "compiling on a remote host does not support a filename with directory." - return 0 -} +require {!is_remote host} set opts {debug additional_flags=-I. macros} diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp index 5e5b8030d20..dc5a1a68955 100644 --- a/gdb/testsuite/gdb.python/py-pp-maint.exp +++ b/gdb/testsuite/gdb.python/py-pp-maint.exp @@ -16,10 +16,7 @@ # This file is part of the GDB testsuite. It tests Python-based # pretty-printing for the CLI. -if [is_remote host] { - untested "py-pp-maint.exp can only be run locally" - return -1 -} +require {!is_remote host} load_lib gdb-python.exp diff --git a/gdb/testsuite/gdb.server/abspath.exp b/gdb/testsuite/gdb.server/abspath.exp index 46657c65e8f..f58d96257c2 100644 --- a/gdb/testsuite/gdb.server/abspath.exp +++ b/gdb/testsuite/gdb.server/abspath.exp @@ -27,9 +27,7 @@ require allow_gdbserver_tests # Because we're relying on being able to change our CWD before # executing gdbserver, we just run if we're not testing with a remote # target. -if { [is_remote target] } { - return 0 -} +require {!is_remote target} save_vars { GDBFLAGS } { # If GDB and GDBserver are both running locally, set the sysroot to avoid diff --git a/gdb/testsuite/gdb.server/server-connect.exp b/gdb/testsuite/gdb.server/server-connect.exp index 6c4c969c30d..1f5b9a27cf4 100644 --- a/gdb/testsuite/gdb.server/server-connect.exp +++ b/gdb/testsuite/gdb.server/server-connect.exp @@ -25,9 +25,7 @@ standard_testfile normal.c require allow_gdbserver_tests # We want to have control over where we start gdbserver. -if { [is_remote target] } { - return 0 -} +require {!is_remote target} if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } { return -1 diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp index 48b79fe723c..e4ad0ce7854 100644 --- a/gdb/testsuite/gdb.server/server-pipe.exp +++ b/gdb/testsuite/gdb.server/server-pipe.exp @@ -24,9 +24,7 @@ # This test relies on starting gdbserver using the pipe syntax. Not # sure how well this will run if part of this test is being run # elsewhere. -if { [is_remote target] || [is_remote host] } { - return 0 -} +require {!is_remote target} {!is_remote host} load_lib gdbserver-support.exp diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp index 4a5caaa2e85..e5cc1f9b9bb 100644 --- a/gdb/testsuite/gdb.threads/attach-into-signal.exp +++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp @@ -18,9 +18,8 @@ # This test only works on Linux require !use_gdb_stub isnative -if { [is_remote host] || ![istarget *-linux*] } { - return -} +require {!is_remote host} +require {istarget *-linux*} standard_testfile set executable_nothr ${testfile}-nothr diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp index 7512a672890..85db583b0de 100644 --- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp +++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp @@ -38,9 +38,8 @@ # This test only works on Linux require !use_gdb_stub isnative -if { [is_remote host] || ![istarget *-linux*] } { - return -} +require {!is_remote host} +require {istarget *-linux*} standard_testfile diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp index 35b31afafaf..25d63b37090 100644 --- a/gdb/testsuite/gdb.threads/attach-stopped.exp +++ b/gdb/testsuite/gdb.threads/attach-stopped.exp @@ -19,9 +19,8 @@ # This test only works on Linux require !use_gdb_stub isnative -if { [is_remote host] || ![istarget *-linux*] } { - return -} +require {!is_remote host} +require {istarget *-linux*} standard_testfile set escapedbinfile [string_to_regexp $binfile]