From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id D430438543B3; Fri, 13 Jan 2023 20:38:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D430438543B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673642289; bh=OYWJc3OlRginGsAtZ39+eVwtTqNjkt5iCWj22k9TG50=; h=From:To:Subject:Date:From; b=PvWHee4QAZQOju+1W6P6e8Owy3K0HfWlY/RUYH1JWIAKVPkMo/Ays6MYd43B07mtN rv23msUTafeAMshLgU35JDPRYq6myJyKSf0gNEFzsX1IzGeDsMowE9mVyamx1ByWVY fH8kVicU1BzJgY2IyryleSiLjAJo1oPnxOM8sG5A= 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] Rename to allow_xml_test X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 79749205e72ace5dbec6f797b334c842dab1a45c X-Git-Newrev: b963a97fb1cd04beb40a5d69599c74f5da933e78 Message-Id: <20230113203809.D430438543B3@sourceware.org> Date: Fri, 13 Jan 2023 20:38:09 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db963a97fb1cd= 04beb40a5d69599c74f5da933e78 commit b963a97fb1cd04beb40a5d69599c74f5da933e78 Author: Tom Tromey Date: Sat Jan 7 11:48:45 2023 -0700 Rename to allow_xml_test =20 This changes gdb_skip_xml_test to invert the sense, and renames it to allow_xml_test. Diff: --- 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.a= rch/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 . =20 -require !gdb_skip_xml_test +require allow_xml_test =20 gdb_start =20 diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.b= ase/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 =20 # Execute the tests, using XML support gdb_exit -if { ![gdb_skip_xml_test] } { +if { [allow_xml_test] } { clean_restart $binfile do_syscall_tests =20 diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/in= fo-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*]} { } =20 # Support for XML-output is needed to run this test. -require !gdb_skip_xml_test +require allow_xml_test =20 # Compile test program. if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pt= hreads}] } { diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.bas= e/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 . =20 # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test =20 load_lib valgrind.exp =20 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. =20 # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test =20 load_lib valgrind.exp =20 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) =20 # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test =20 load_lib valgrind.exp =20 diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gd= b.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 . =20 # Valgrind gdbserver requires gdb with xml support. -require !gdb_skip_xml_test +require allow_xml_test =20 load_lib valgrind.exp =20 diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/uni= ttest.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 =20 load_lib completion-support.exp =20 -set do_xml_test [expr ![gdb_skip_xml_test]] +set do_xml_test [allow_xml_test] =20 standard_testfile =20 diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/te= stsuite/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=3Dmi" standard_testfile =20 # Support for XML is needed to run this test. -require !gdb_skip_xml_test +require allow_xml_test =20 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executabl= e {debug}] !=3D "" } { 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*]} { } =20 # Support for XML-output is needed to run this test. -require !gdb_skip_xml_test +require allow_xml_test =20 gdb_exit if [mi_gdb_start] { diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.serve= r/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 de= bug] =3D=3D -1} { return -1 } =20 -# 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] =20 save_vars { GDBFLAGS } { # If GDB and GDBserver are both running locally, set the sysroot to av= oid diff --git a/gdb/testsuite/gdb.xml/maint-xml-dump.exp b/gdb/testsuite/gdb.x= ml/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 =20 gdb_start =20 diff --git a/gdb/testsuite/gdb.xml/maint_print_struct.exp b/gdb/testsuite/g= db.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 . =20 -require !gdb_skip_xml_test +require allow_xml_test =20 gdb_start =20 diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/t= desc-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 . =20 -require !gdb_skip_xml_test +require allow_xml_test =20 gdb_start =20 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 . =20 -require !gdb_skip_xml_test +require allow_xml_test =20 gdb_start =20 diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/t= desc-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 . =20 -require !gdb_skip_xml_test +require allow_xml_test =20 gdb_start =20 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. =20 -require !gdb_skip_xml_test +require allow_xml_test =20 standard_testfile =20 diff --git a/gdb/testsuite/gdb.xml/tdesc-xinclude.exp b/gdb/testsuite/gdb.x= ml/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 . =20 -require !gdb_skip_xml_test +require allow_xml_test =20 gdb_start =20 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 } =20 -# 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. =20 -gdb_caching_proc gdb_skip_xml_test { +gdb_caching_proc allow_xml_test { global gdb_spawn_id global gdb_prompt global srcdir =20 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." } =20 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}] } =20 # Return true if argv[0] is available. diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gd= bserver-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*"]