From b963a97fb1cd04beb40a5d69599c74f5da933e78 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 7 Jan 2023 11:48:45 -0700 Subject: Rename to allow_xml_test 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 6819c30..0373bfa 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 9144945..22181bc 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 58f7126..e191217 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 049b42f..da0261e 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 05d0d8d..3fb4341 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 13d2900..6ed6ecd 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 48b3bb2..bcaca02 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 ff53285..a0e918c 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 1a77b96..27224b5 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 7e7db55..2f243a7 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 7cfd2bf..2add84e 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 0bf7855..cc0b889 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 f4d32d6..6f41189 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 9825320..e66335f 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 b324306..7e85cf6 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 13fafa1..4545cd1 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 997b1f4..21dede8 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 3a75712..902e7e7 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 64eef97..f293cbb 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 91a6bd7..49ae561 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*"] -- cgit v1.1