Rename to allow_xml_test
authorTom Tromey <tom@tromey.com>
Sat, 7 Jan 2023 18:48:45 +0000 (11:48 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jan 2023 20:18:57 +0000 (13:18 -0700)
This changes gdb_skip_xml_test to invert the sense, and renames it to
allow_xml_test.

20 files changed:
gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp
gdb/testsuite/gdb.base/catch-syscall.exp
gdb/testsuite/gdb.base/info-os.exp
gdb/testsuite/gdb.base/valgrind-bt.exp
gdb/testsuite/gdb.base/valgrind-disp-step.exp
gdb/testsuite/gdb.base/valgrind-infcall-2.exp
gdb/testsuite/gdb.base/valgrind-infcall.exp
gdb/testsuite/gdb.gdb/unittest.exp
gdb/testsuite/gdb.mi/list-thread-groups-available.exp
gdb/testsuite/gdb.mi/mi-info-os.exp
gdb/testsuite/gdb.server/ext-run.exp
gdb/testsuite/gdb.xml/maint-xml-dump.exp
gdb/testsuite/gdb.xml/maint_print_struct.exp
gdb/testsuite/gdb.xml/tdesc-arch.exp
gdb/testsuite/gdb.xml/tdesc-errors.exp
gdb/testsuite/gdb.xml/tdesc-regs.exp
gdb/testsuite/gdb.xml/tdesc-reload.exp
gdb/testsuite/gdb.xml/tdesc-xinclude.exp
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/gdbserver-support.exp

index 6819c302187c1d08a309f7959034dcbfe4a9cc13..0373bfaf13cb727ad26255da8785cee6c7116332 100644 (file)
@@ -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
 
index 9144945e789e25a1b3851f6908ca7668ad60eaea..22181bc884e1b1e82c9a30bc4471e625b2bdd39c 100644 (file)
@@ -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
 
index 58f7126678ea205ab0dcd24eef8b7b1c33252e21..e191217681a5bf24069d5c671d45fe3d85f172ae 100644 (file)
@@ -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}] } {
index 049b42f9b1e8b7a9c9744762d526261a7fd95eef..da0261eabe60f37ca7bd3fd6615e4f444e2ebd65 100644 (file)
@@ -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
 
index 05d0d8d6951621d80c6006552c478c73ee7eefb8..3fb4341d2c71b4962cb87c54183278c4bf6308f2 100644 (file)
@@ -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
 
index 13d290079cc41c8b547eed0b40efb09c927f1a43..6ed6ecd1d4206d983b128df8f08146d4bae23cd5 100644 (file)
@@ -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
 
index 48b3bb2c6c1f9c1255e1c1bcf9afdf7fb8ca7c27..bcaca02c9006e4bcc1adedc702b07a53ad8be486 100644 (file)
@@ -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
 
index ff532856e40ccb2857be24f45542a68757543f08..a0e918c36f6904a05a47253b359d434ff263a050 100644 (file)
@@ -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
 
index 1a77b96f2f81956cb43dc174d5ae54656fc7a50e..27224b5f96fb6a8c18a36366209a7bc9d734bdac 100644 (file)
@@ -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"
index 7e7db550af72747899e4ec0023849b9042c5510a..2f243a7aac01fd79e4ccb63be07cfa0bd25fc19c 100644 (file)
@@ -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] {
index 7cfd2bf717f284f39e4492198edb24450994c670..2add84e8b1b01f8308bfd33eee47e45c07087d98 100644 (file)
@@ -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
index 0bf785537b15c307596244292e3849b82594dab6..cc0b889ab0938f16438aee262ace408358c884ca 100644 (file)
@@ -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
 
index f4d32d6623e33efb423a32198e8177da706e0d05..6f4118955016fb2824bf8e571df9c574f21c9597 100644 (file)
@@ -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
 
index 9825320b0246accf09cc59304b74ece056cfc178..e66335f229010ee81d81ce6d0f98af8385098a6c 100644 (file)
@@ -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
 
index b3243064e9ce0698f875aa7956ff68c8fef9e748..7e85cf67649f46092856450e2f9bd9235d7c46db 100644 (file)
@@ -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
 
index 13fafa1477ebe873b98c9eb386ffe6a914901960..4545cd1c9b53e0b82f6200b7ac53d22a876fe7a0 100644 (file)
@@ -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
 
index 997b1f4e0ad3f472a4cb7b407df6940d7eb52dcd..21dede88faae48bfbc6abe09336d595a39e24339 100644 (file)
@@ -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
 
index 3a757126799b4611e78206e4924137ebf5764341..902e7e770989c7b020d1a6cd3dd89614e586c1b9 100644 (file)
@@ -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
 
index 64eef9701c26b386d189c8f723a2a8a77fb235f2..f293cbb19cc18cc93a9a6ece2b0229b5716cc4e1 100644 (file)
@@ -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.
index 91a6bd702446bfac0684c6f7659e24265cb2d5be..49ae56190c25b22f3baf1e8d914716265c911fa6 100644 (file)
@@ -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*"]