From patchwork Thu Jan 12 02:59:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63006 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 4BD5438432C0 for ; Thu, 12 Jan 2023 03:02:26 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from gproxy4-pub.mail.unifiedlayer.com (gproxy4-pub.mail.unifiedlayer.com [69.89.23.142]) by sourceware.org (Postfix) with ESMTPS id 7A641385843D for ; Thu, 12 Jan 2023 03:01:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A641385843D 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 progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id D6B20100471F1 for ; Thu, 12 Jan 2023 03:01:08 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id Fnq0plLUaLXXpFnq0p4k3N; Thu, 12 Jan 2023 03:01:08 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=KvyIZUaN c=1 sm=1 tr=0 ts=63bf77f4 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=CCpqsmhAAAAA:8 a=mDV3o1hIAAAA:8 a=y0-gRYiNkZ8YbEZF0xIA:9 a=fAxkfZ_sYmoA:10:demote_hacked_domain_1 a=ul9cdbp4aOFLsgKbc677:22 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=e42Und+J6g4fHi3uBZOl+7hh6JPkFTULHAsfOFg3QDw=; b=aMzytuZdth/5vQ2FQi2J/H7aZP qI4tY+UtwRTxf3aDB51DyGEId1yhdad7StobjNDN9z2RtGhbwxXTTWqLJmOD7IIaXHW9MvyMUdqNj Y7UvspI0HH7tyf0pVKaQcKyzF; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:53100 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 1pFnq0-000lEr-Fx; Wed, 11 Jan 2023 20:01:08 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 07/79] Use require is_x86_like_target Date: Wed, 11 Jan 2023 19:59:40 -0700 Message-Id: <20230112030052.3306113-8-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: 1pFnq0-000lEr-Fx X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:53100 X-Source-Auth: tom+tromey.com X-Email-Count: 8 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.1 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 is_x86_like_target". --- gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp | 4 +--- gdb/testsuite/gdb.arch/i386-disp-step.exp | 5 +---- gdb/testsuite/gdb.arch/i386-gnu-cfi.exp | 5 +---- gdb/testsuite/gdb.arch/i386-prologue.exp | 5 +---- gdb/testsuite/gdb.arch/i386-size-overlap.exp | 5 +---- gdb/testsuite/gdb.arch/i386-size.exp | 5 +---- gdb/testsuite/gdb.arch/i386-sse-stack-align.exp | 5 +---- gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp | 5 +---- gdb/testsuite/gdb.arch/i386-unwind.exp | 5 +---- gdb/testsuite/gdb.dwarf2/callframecfa.exp | 5 +---- gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp | 5 +---- gdb/testsuite/gdb.dwarf2/pieces.exp | 5 +---- gdb/testsuite/gdb.dwarf2/valop.exp | 5 +---- gdb/testsuite/gdb.dwarf2/watch-notconst.exp | 6 +----- gdb/testsuite/gdb.reverse/i386-precsave.exp | 8 +------- gdb/testsuite/gdb.reverse/i386-reverse.exp | 7 +------ gdb/testsuite/gdb.reverse/i387-env-reverse.exp | 5 +---- gdb/testsuite/gdb.reverse/i387-stack-reverse.exp | 5 +---- 18 files changed, 18 insertions(+), 77 deletions(-) diff --git a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp index cc19250e17f..9412b0a6418 100644 --- a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp +++ b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp @@ -16,9 +16,7 @@ # [RFA] DWARF frame unwinder executes one too many rows # http://sourceware.org/ml/gdb-patches/2012-07/msg00650.html -if { ![is_x86_like_target] } { - return 0 -} +require is_x86_like_target set testfile "i386-cfi-notcurrent" set srcfile ${testfile}.S diff --git a/gdb/testsuite/gdb.arch/i386-disp-step.exp b/gdb/testsuite/gdb.arch/i386-disp-step.exp index 264544db0e2..02f74136507 100644 --- a/gdb/testsuite/gdb.arch/i386-disp-step.exp +++ b/gdb/testsuite/gdb.arch/i386-disp-step.exp @@ -18,10 +18,7 @@ # Test i386 displaced stepping. -if {![is_x86_like_target]} { - verbose "Skipping x86 displaced stepping tests." - return -} +require is_x86_like_target standard_testfile .S diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp index 884b3b6cad2..56a4eee32a6 100644 --- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp +++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp @@ -23,10 +23,7 @@ # Test i386 unwinder. -if {![is_x86_like_target]} { - verbose "Skipping i386 unwinder tests." - return -} +require is_x86_like_target set testfile "i386-gnu-cfi" set srcfilec ${testfile}.c diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp index f522f864e9c..8e24b879fd1 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.exp +++ b/gdb/testsuite/gdb.arch/i386-prologue.exp @@ -21,10 +21,7 @@ # Test i386 prologue analyzer. -if {![is_x86_like_target]} { - verbose "Skipping i386 prologue tests." - return -} +require is_x86_like_target set testfile "i386-prologue" set srcfile ${testfile}.c diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp index a3c62d63106..a5517b836f3 100644 --- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp +++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp @@ -17,10 +17,7 @@ # Test that GDB can handle overlapping sizes of symbols. -if {![is_x86_like_target]} { - verbose "Skipping i386 unwinder tests." - return -} +require is_x86_like_target standard_testfile diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp index 9fcd7ba734c..0b616f68893 100644 --- a/gdb/testsuite/gdb.arch/i386-size.exp +++ b/gdb/testsuite/gdb.arch/i386-size.exp @@ -20,10 +20,7 @@ # Test that GDB can see the sizes of symbols. -if {![is_x86_like_target]} { - verbose "Skipping i386 unwinder tests." - return -} +require is_x86_like_target set testfile "i386-size" set srcfile ${testfile}.c diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp index 009140f7067..7b931a6d2dd 100644 --- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp +++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if ![is_x86_like_target] { - verbose "Skipping x86 SSE stack alignment tests." - return -} +require is_x86_like_target set testfile "i386-sse-stack-align" set srcfile ${testfile}.S diff --git a/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp b/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp index d62a2408294..2b7bfbff76c 100644 --- a/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp +++ b/gdb/testsuite/gdb.arch/i386-stap-eval-lang-ada.exp @@ -16,10 +16,7 @@ standard_testfile ".S" # We can only test this if the target is i686 or x86_64 with -m32 -if { ![is_x86_like_target] } { - verbose "Skipping $testfile.exp" - return -} +require is_x86_like_target if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { return -1 diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp index 2c6ba331561..04ef77132eb 100644 --- a/gdb/testsuite/gdb.arch/i386-unwind.exp +++ b/gdb/testsuite/gdb.arch/i386-unwind.exp @@ -21,10 +21,7 @@ # Test i386 unwinder. -if {![is_x86_like_target]} { - verbose "Skipping i386 unwinder tests." - return -} +require is_x86_like_target standard_testfile diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp index 4242e08a296..9554a0f89a0 100644 --- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp +++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp @@ -17,11 +17,8 @@ load_lib dwarf.exp # Test DW_OP_call_frame_cfa. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support # This test can only be run on x86 targets. -if {![is_x86_like_target]} { - return 0 -} +require dwarf2_support is_x86_like_target standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp index 90acd39cb08..b0e01afd06e 100644 --- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp +++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp @@ -16,11 +16,8 @@ load_lib dwarf.exp # Test some DWARF piece operators. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support # This test can only be run on x86 targets. -if {![is_x86_like_target]} { - return 0 -} +require dwarf2_support is_x86_like_target standard_testfile .S set csrcfile ${testfile}.c diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp index e6666b853aa..9464f3f835f 100644 --- a/gdb/testsuite/gdb.dwarf2/pieces.exp +++ b/gdb/testsuite/gdb.dwarf2/pieces.exp @@ -16,11 +16,8 @@ load_lib dwarf.exp # Test some DWARF piece operators. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support # This test can only be run on x86 targets. -if {![is_x86_like_target]} { - return 0 -} +require dwarf2_support is_x86_like_target standard_testfile .S set csrcfile ${testfile}.c diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp index 848a19de60a..1a58d26281e 100644 --- a/gdb/testsuite/gdb.dwarf2/valop.exp +++ b/gdb/testsuite/gdb.dwarf2/valop.exp @@ -17,11 +17,8 @@ load_lib dwarf.exp # Test DW_OP_stack_value and DW_OP_implicit_value. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support # This test can only be run on x86 targets. -if {![is_x86_like_target]} { - return 0 -} +require dwarf2_support is_x86_like_target standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp index d7786bbf1b6..0cf086b2ab8 100644 --- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp +++ b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp @@ -17,12 +17,8 @@ load_lib dwarf.exp set test "watch-notconst" # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # This test can only be run on x86 targets. -if { ![is_x86_like_target] } { - return 0 -} +require dwarf2_support is_x86_like_target if { [prepare_for_testing "failed to prepare" "${test}" \ {watch-notconst.c watch-notconst2.S} {nodebug}] } { diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp index 301e3b60208..3e9a402e5b6 100644 --- a/gdb/testsuite/gdb.reverse/i386-precsave.exp +++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp @@ -20,13 +20,7 @@ # # This test suitable only for process record-replay -require supports_process_record - - -if {![is_x86_like_target]} { - verbose "Skipping i386 reverse tests." - return -} +require supports_process_record is_x86_like_target standard_testfile i386-reverse.c set precsave [standard_output_file i386.precsave] diff --git a/gdb/testsuite/gdb.reverse/i386-reverse.exp b/gdb/testsuite/gdb.reverse/i386-reverse.exp index 5fa7237af53..42ad28d44ea 100644 --- a/gdb/testsuite/gdb.reverse/i386-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i386-reverse.exp @@ -19,12 +19,7 @@ # This test tests some i386 general instructions for reverse execution. # -require supports_reverse - -if {![is_x86_like_target]} { - verbose "Skipping i386 reverse tests." - return -} +require supports_reverse is_x86_like_target standard_testfile diff --git a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp index 0decbfc2481..7bb17f70640 100644 --- a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp @@ -16,10 +16,7 @@ # This file is part of the gdb testsuite. -if {![is_x86_like_target]} { - verbose "Skipping i387 reverse float tests." - return -} +require is_x86_like_target standard_testfile diff --git a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp index cdb481519ec..ee6507af74e 100644 --- a/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i387-stack-reverse.exp @@ -16,10 +16,7 @@ # This file is part of the gdb testsuite. -if {![is_x86_like_target]} { - verbose "Skipping i387 reverse float tests." - return -} +require is_x86_like_target standard_testfile