From patchwork Thu Jan 12 03:00:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63046 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 E9A1839960D0 for ; Thu, 12 Jan 2023 03:06:34 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from gproxy1-pub.mail.unifiedlayer.com (gproxy1-pub.mail.unifiedlayer.com [69.89.25.95]) by sourceware.org (Postfix) with ESMTPS id 24E2C3881D2C for ; Thu, 12 Jan 2023 03:01:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24E2C3881D2C 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 progateway3.mail.pro1.eigbox.com (Postfix) with ESMTP id 995FC1004858D for ; Thu, 12 Jan 2023 03:01:37 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id FnqTpqVBzB18UFnqTpA3yV; Thu, 12 Jan 2023 03:01:37 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Ns4Uz+RJ c=1 sm=1 tr=0 ts=63bf7811 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=9TH1_F7X9L2JXYxBli4A: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=IYZ2VG09z9w5Y6cjc9nGb9BZyDgh4hy4VEFA4Y3LfpQ=; b=nkPvLWibjueGVhc/gsm0k3hx6D IYqWydWOrtokjuVQPbvot5E3ibG4WdLj+Wb4bN757t4chvQqhWLq0DE5hjJGVtPhch7PzdJngOimR A6WVD+qnJc/QPIv0oAXzRzevM; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:60784 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 1pFnqT-000lzh-Ac; Wed, 11 Jan 2023 20:01:37 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 51/79] Rename to allow_xml_test Date: Wed, 11 Jan 2023 20:00:24 -0700 Message-Id: <20230112030052.3306113-52-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: 1pFnqT-000lzh-Ac X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:60784 X-Source-Auth: tom+tromey.com X-Email-Count: 52 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 gdb_skip_xml_test to invert the sense, and renames it to allow_xml_test. --- gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp | 2 +- gdb/testsuite/gdb.base/catch-syscall.exp | 2 +- gdb/testsuite/gdb.base/info-os.exp | 2 +- gdb/testsuite/gdb.base/valgrind-bt.exp | 2 +- gdb/testsuite/gdb.base/valgrind-disp-step.exp | 2 +- gdb/testsuite/gdb.base/valgrind-infcall-2.exp | 2 +- gdb/testsuite/gdb.base/valgrind-infcall.exp | 2 +- gdb/testsuite/gdb.gdb/unittest.exp | 2 +- gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 2 +- gdb/testsuite/gdb.mi/mi-info-os.exp | 2 +- gdb/testsuite/gdb.server/ext-run.exp | 4 ++-- gdb/testsuite/gdb.xml/maint-xml-dump.exp | 2 +- gdb/testsuite/gdb.xml/maint_print_struct.exp | 2 +- gdb/testsuite/gdb.xml/tdesc-arch.exp | 2 +- gdb/testsuite/gdb.xml/tdesc-errors.exp | 2 +- gdb/testsuite/gdb.xml/tdesc-regs.exp | 2 +- gdb/testsuite/gdb.xml/tdesc-reload.exp | 2 +- gdb/testsuite/gdb.xml/tdesc-xinclude.exp | 2 +- gdb/testsuite/lib/gdb.exp | 9 ++++----- gdb/testsuite/lib/gdbserver-support.exp | 2 +- 20 files changed, 24 insertions(+), 25 deletions(-) diff --git a/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp b/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp index 6819c302187..0373bfaf13c 100644 --- a/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp +++ b/gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !gdb_skip_xml_test +require allow_xml_test gdb_start diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp index 9144945e789..22181bc884e 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -781,7 +781,7 @@ fill_all_syscalls_numbers # Execute the tests, using XML support gdb_exit -if { ![gdb_skip_xml_test] } { +if { [allow_xml_test] } { clean_restart $binfile do_syscall_tests diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp index 58f7126678e..e191217681a 100644 --- a/gdb/testsuite/gdb.base/info-os.exp +++ b/gdb/testsuite/gdb.base/info-os.exp @@ -22,7 +22,7 @@ if {![istarget *-*-linux*]} { } # Support for XML-output is needed to run this test. -require !gdb_skip_xml_test +require allow_xml_test # Compile test program. if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] } { diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.base/valgrind-bt.exp index 049b42f9b1e..da0261eabe6 100644 --- a/gdb/testsuite/gdb.base/valgrind-bt.exp +++ b/gdb/testsuite/gdb.base/valgrind-bt.exp @@ -14,7 +14,7 @@ # along with this program. If not, see . # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test load_lib valgrind.exp diff --git a/gdb/testsuite/gdb.base/valgrind-disp-step.exp b/gdb/testsuite/gdb.base/valgrind-disp-step.exp index 05d0d8d6951..3fb4341d2c7 100644 --- a/gdb/testsuite/gdb.base/valgrind-disp-step.exp +++ b/gdb/testsuite/gdb.base/valgrind-disp-step.exp @@ -19,7 +19,7 @@ # automatically instead of getting stuck or crashing. # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test load_lib valgrind.exp diff --git a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp index 13d290079cc..6ed6ecd1d42 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp @@ -30,7 +30,7 @@ # Aborted (core dumped) # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test load_lib valgrind.exp diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index 48b3bb2c6c1..bcaca02c900 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -14,7 +14,7 @@ # along with this program. If not, see . # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test load_lib valgrind.exp diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/unittest.exp index ff532856e40..a0e918c36f6 100644 --- a/gdb/testsuite/gdb.gdb/unittest.exp +++ b/gdb/testsuite/gdb.gdb/unittest.exp @@ -19,7 +19,7 @@ require !gdb_debug_enabled load_lib completion-support.exp -set do_xml_test [expr ![gdb_skip_xml_test]] +set do_xml_test [allow_xml_test] standard_testfile diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp index 1a77b96f2f8..27224b5f96f 100644 --- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp +++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp @@ -21,7 +21,7 @@ set MIFLAGS "-i=mi" standard_testfile # Support for XML is needed to run this test. -require !gdb_skip_xml_test +require allow_xml_test if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.mi/mi-info-os.exp b/gdb/testsuite/gdb.mi/mi-info-os.exp index 7e7db550af7..2f243a7aac0 100644 --- a/gdb/testsuite/gdb.mi/mi-info-os.exp +++ b/gdb/testsuite/gdb.mi/mi-info-os.exp @@ -23,7 +23,7 @@ if {![istarget *-*-linux*]} { } # Support for XML-output is needed to run this test. -require !gdb_skip_xml_test +require allow_xml_test gdb_exit if [mi_gdb_start] { diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index 7cfd2bf717f..2add84e8b1b 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -27,8 +27,8 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { return -1 } -# gdb_skip_xml_test must be called while gdb is not running. -set do_xml_test [expr ![gdb_skip_xml_test]] +# allow_xml_test must be called while gdb is not running. +set do_xml_test [allow_xml_test] save_vars { GDBFLAGS } { # If GDB and GDBserver are both running locally, set the sysroot to avoid diff --git a/gdb/testsuite/gdb.xml/maint-xml-dump.exp b/gdb/testsuite/gdb.xml/maint-xml-dump.exp index 0bf785537b1..cc0b889ab09 100644 --- a/gdb/testsuite/gdb.xml/maint-xml-dump.exp +++ b/gdb/testsuite/gdb.xml/maint-xml-dump.exp @@ -37,7 +37,7 @@ # # 4. Indentation of lines will be preserved so your input file needs # to follow the expected indentation. -require !gdb_skip_xml_test +require allow_xml_test gdb_start diff --git a/gdb/testsuite/gdb.xml/maint_print_struct.exp b/gdb/testsuite/gdb.xml/maint_print_struct.exp index f4d32d6623e..6f411895501 100644 --- a/gdb/testsuite/gdb.xml/maint_print_struct.exp +++ b/gdb/testsuite/gdb.xml/maint_print_struct.exp @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !gdb_skip_xml_test +require allow_xml_test gdb_start diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/tdesc-arch.exp index 9825320b024..e66335f2290 100644 --- a/gdb/testsuite/gdb.xml/tdesc-arch.exp +++ b/gdb/testsuite/gdb.xml/tdesc-arch.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !gdb_skip_xml_test +require allow_xml_test gdb_start diff --git a/gdb/testsuite/gdb.xml/tdesc-errors.exp b/gdb/testsuite/gdb.xml/tdesc-errors.exp index b3243064e9c..7e85cf67649 100644 --- a/gdb/testsuite/gdb.xml/tdesc-errors.exp +++ b/gdb/testsuite/gdb.xml/tdesc-errors.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !gdb_skip_xml_test +require allow_xml_test gdb_start diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp index 13fafa1477e..4545cd1c9b5 100644 --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !gdb_skip_xml_test +require allow_xml_test gdb_start diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp index 997b1f4e0ad..21dede88faa 100644 --- a/gdb/testsuite/gdb.xml/tdesc-reload.exp +++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp @@ -16,7 +16,7 @@ # Testing for 'maint print xml-tdesc'. Check we can print out the # current target description and load it back in again. -require !gdb_skip_xml_test +require allow_xml_test standard_testfile diff --git a/gdb/testsuite/gdb.xml/tdesc-xinclude.exp b/gdb/testsuite/gdb.xml/tdesc-xinclude.exp index 3a757126799..902e7e77098 100644 --- a/gdb/testsuite/gdb.xml/tdesc-xinclude.exp +++ b/gdb/testsuite/gdb.xml/tdesc-xinclude.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !gdb_skip_xml_test +require allow_xml_test gdb_start diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 64eef9701c2..f293cbb19cc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6970,17 +6970,16 @@ proc gdb_skip_bogus_test { msg } { return 0 } -# Return true if a test should be skipped due to lack of XML support -# in the host GDB. +# Return true if XML support is enabled in the host GDB. # NOTE: This must be called while gdb is *not* running. -gdb_caching_proc gdb_skip_xml_test { +gdb_caching_proc allow_xml_test { global gdb_spawn_id global gdb_prompt global srcdir if { [info exists gdb_spawn_id] } { - error "GDB must not be running in gdb_skip_xml_tests." + error "GDB must not be running in allow_xml_tests." } set xml_file [gdb_remote_download host "${srcdir}/gdb.xml/trivial.xml"] @@ -6994,7 +6993,7 @@ gdb_caching_proc gdb_skip_xml_test { -re ".*$gdb_prompt $" { } } gdb_exit - return $xml_missing + return [expr {!$xml_missing}] } # Return true if argv[0] is available. diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index 91a6bd70244..49ae56190c2 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -171,7 +171,7 @@ proc skip_gdbserver_tests { } { # multiple target descriptions, GDB doesn't know which target # description GDBserver uses, and may fail to parse 'g' packet # after connection. - if { [gdb_skip_xml_test] + if { ![allow_xml_test] && ([istarget "arm*-*-linux*"] || [istarget "aarch64*-*-linux*"] || [istarget "mips*-*-linux*"]