public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Rename to allow_xml_test
@ 2023-01-13 20:38 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-01-13 20:38 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b963a97fb1cd04beb40a5d69599c74f5da933e78

commit b963a97fb1cd04beb40a5d69599c74f5da933e78
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Jan 7 11:48:45 2023 -0700

    Rename to allow_xml_test
    
    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.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 <http://www.gnu.org/licenses/>.
 
-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 <http://www.gnu.org/licenses/>.
 
 # 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 <http://www.gnu.org/licenses/>.
 
 # 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 <http://www.gnu.org/licenses/>.
 
-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 <http://www.gnu.org/licenses/>.
 
-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 <http://www.gnu.org/licenses/>.
 
-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 <http://www.gnu.org/licenses/>.
 
-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 <http://www.gnu.org/licenses/>.
 
-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*"]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-13 20:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 20:38 [binutils-gdb] Rename to allow_xml_test Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).