Use require !skip_gdbserver_tests
authorTom Tromey <tom@tromey.com>
Wed, 14 Dec 2022 17:09:38 +0000 (10:09 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jan 2023 20:18:56 +0000 (13:18 -0700)
This changes some tests to use "require !skip_gdbserver_tests".

34 files changed:
gdb/testsuite/gdb.btrace/reconnect.exp
gdb/testsuite/gdb.mi/mi-file-transfer.exp
gdb/testsuite/gdb.multi/attach-no-multi-process.exp
gdb/testsuite/gdb.python/py-send-packet.exp
gdb/testsuite/gdb.server/abspath.exp
gdb/testsuite/gdb.server/attach-flag.exp
gdb/testsuite/gdb.server/bkpt-other-inferior.exp
gdb/testsuite/gdb.server/connect-stopped-target.exp
gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
gdb/testsuite/gdb.server/connect-without-multi-process.exp
gdb/testsuite/gdb.server/exit-multiple-threads.exp
gdb/testsuite/gdb.server/ext-attach.exp
gdb/testsuite/gdb.server/ext-restart.exp
gdb/testsuite/gdb.server/ext-run.exp
gdb/testsuite/gdb.server/ext-wrapper.exp
gdb/testsuite/gdb.server/file-transfer.exp
gdb/testsuite/gdb.server/monitor-exit-quit.exp
gdb/testsuite/gdb.server/multi-ui-errors.exp
gdb/testsuite/gdb.server/no-thread-db.exp
gdb/testsuite/gdb.server/non-existing-program.exp
gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
gdb/testsuite/gdb.server/run-without-local-binary.exp
gdb/testsuite/gdb.server/server-connect.exp
gdb/testsuite/gdb.server/server-kill-python.exp
gdb/testsuite/gdb.server/server-kill.exp
gdb/testsuite/gdb.server/server-mon.exp
gdb/testsuite/gdb.server/server-pipe.exp
gdb/testsuite/gdb.server/server-run.exp
gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
gdb/testsuite/gdb.server/stop-reply-no-thread.exp
gdb/testsuite/gdb.server/sysroot.exp
gdb/testsuite/gdb.server/twice-connect.exp
gdb/testsuite/gdb.server/unittest.exp
gdb/testsuite/gdb.server/wrapper.exp

index 868cf1f068060910cb791d5412168656401e8936..548aa16ed2999e4600ae0788ea1f475b072a42a5 100644 (file)
 load_lib gdbserver-support.exp
 
 require !skip_btrace_tests
-if { [skip_gdbserver_tests] } {
-    unsupported "target does not support gdbserver"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if [prepare_for_testing "failed to prepare" $testfile $srcfile] {
index ec914d180439ea0ed61a1780130303209cd587bc..71aa2f83cc07efa52090845ac4a8bf8c1d85f178 100644 (file)
@@ -20,9 +20,7 @@ load_lib gdbserver-support.exp
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 standard_testfile basics.c
 
index 882ab69e14dcf05741a49f3989b5d0a21c01e808..50b04ad6761b1bd81f2a2a85473b052ba3946561 100644 (file)
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 require can_spawn_for_attach
 
index baec66d5b0c65800fef85250bf3dec7005564a55..c6305ed6291a2a5234750c0dd8a494ab7b46b106 100644 (file)
@@ -24,9 +24,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
index ddfd722127391f99803e948f88c08237592f7f82..58d9b39efc1f72ae7eb436992ad8928d03c7a5e7 100644 (file)
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile normal.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 # Because we're relying on being able to change our CWD before
 # executing gdbserver, we just run if we're not testing with a remote
index ea4c87ee07782d14e18788d5e04c8f2fb1977350..bb6f3673e4ef7c1c5c32e587a1445db68d387216 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 require can_spawn_for_attach
 
index e52139fc27dca3274648fe98bcf6cb14faa92dd6..fe561d8e924c90f2a720a8f74a998fa3d10c38ae 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [prepare_for_testing "failed to prepare" ${binfile} "${srcfile}" \
          {debug pthreads}] } {
index dade80134ff70da8d8db43d3f6bdec538c4749dd..ed193f8599c71abfe271eb7c01898345f5685576 100644 (file)
@@ -20,9 +20,7 @@
 load_lib gdbserver-support.exp
 load_lib prelink-support.exp
 
-if {[skip_gdbserver_tests]} {
-    return
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 set executable ${testfile}
index b0804445f7a699bebad07ddac45e90e173815c4e..159f82f6c3b49ee49aad652b52c13a4b4a762aa4 100644 (file)
@@ -25,9 +25,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
     return -1
index 816d367baa6f3d2a576c1b28575bee524ba49e40..831ccd6f876ecc5ca57ce76ee47700378cf00016 100644 (file)
@@ -18,9 +18,7 @@
 
 load_lib gdbserver-support.exp
 
-if {[skip_gdbserver_tests]} {
-    return
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 
index d53651e115b64f2fe0d55cac2787b382e1c692bb..88c4df11ccd0188e29f80ab5d0d25e4838d3241e 100644 (file)
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 
index 62296d091fa0f963d419a30b9fa1717f95d2f0ef..81b324d4c5faa672e6a7738c1f9642eaeaa8f247 100644 (file)
@@ -22,9 +22,7 @@ load_lib trace-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 require can_spawn_for_attach
 
index 0d133ca299375749be32361d2274e2a2c2475055..df26c91fa25350443c43943932d65461de980dc0 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 save_vars { GDBFLAGS } {
     # If GDB and GDBserver are both running locally, set the sysroot to avoid
index bfc68673540be4fcf4b2d3bccfe83d5e3c226c0d..7cfd2bf717f284f39e4492198edb24450994c670 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
index 98aa889edcd54d848580fa236c284c49d3624656..4f150cfc0a510c2696fd1c7b0709a2c77979ea40 100644 (file)
@@ -19,9 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile wrapper.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
index ea9298f3a236ddfa3b33079d793d91c4990cea33..cd98ffee90dd568e025f788f2d56b3b659d306ba 100644 (file)
@@ -20,9 +20,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
index 8fa41e3f07f15c1fce370ff577308c9752823937..88eb2e483b987ae9e6c883088d30c862ef49374f 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
index e5aad88f140e3a41305e55397d7b1bfeb925dfc3..95a08c9bca6f9973a7c8b6edaafc7da774594a11 100644 (file)
@@ -24,9 +24,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 save_vars { GDBFLAGS } {
     # If GDB and GDBserver are both running locally, set the sysroot to avoid
index d0b43f9cf79231f345affbf30c67c0aa0689fdf5..0e2fbae80bea245fa98ac9598b9eecf29b15a286 100644 (file)
@@ -25,9 +25,7 @@ load_lib gdbserver-support.exp
 standard_testfile
 set unresolvable_thread_db_path "/foo/bar"
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     return -1
index d4fceeab88a7878544f102cbf1dea71e0b597f1e..60ca0a43dfb59ffd9151bb934f9efbc559926ccf 100644 (file)
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 set gdbserver [find_gdbserver]
 if { $gdbserver == "" } {
index f316609b6090ffe568bf760370b982bcee112437..42707692c4b3295f6a83ff5d8b691d14e40c2150 100644 (file)
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 if [target_info exists gdb,nointerrupts] {
     verbose "Skipping reconnect-ctrl-c.exp because of nointerrupts."
index 21682a58c77111df74f5531f32915abd253807d8..4f3f0d9af4ee9bf7a3ee20445bb41eaa0321328a 100644 (file)
@@ -15,9 +15,7 @@
 
 load_lib gdbserver-support.exp
 
-if {[skip_gdbserver_tests]} {
-    return
-}
+require !skip_gdbserver_tests
 
 standard_testfile normal.c
 
index a6d469e54d59accf1b8b97d8c91c87cb49d90c62..76570f34232034a1a185c557548bb094d7961877 100644 (file)
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile normal.c
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 # We want to have control over where we start gdbserver.
 if { [is_remote target] } {
index dbf5218991534400dc62831d6f507b7b9b23aa29..1eb9e2e51c538e3af5dc0ad3ca12b7ebf3c1bb2a 100644 (file)
@@ -23,9 +23,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile multi-ui-errors.c
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 # Gdb needs to be running for skip_python_tests, but exit once we're done,
 # we'll start a custom gdb after this.
index f59e11a43b558a36ff9124b8d49449ffabd2d083..04b7f62561a40714b416b4bd91289801c6618405 100644 (file)
@@ -22,9 +22,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if {[skip_gdbserver_tests]} {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [build_executable "failed to prepare" ${testfile}] } {
     return -1
index b9ae0083a368fe3ba27cc4880d9b265fde375548..4b728cb80384f7d6a32e25fbd31a86e70711d221 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
index 662ff0a39c77bc51fbdd5656b5ca6dbb9816715d..2038ca9140da7fb2c5199f164acbd9ab5c57b022 100644 (file)
@@ -32,9 +32,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 set gdbserver [find_gdbserver]
 if { $gdbserver == "" } {
index 522719dc6a5e05b019e42a7c1976ed23e64ffc06..55b40057f91c6f0ce7981b1d5daf06fcafe099f0 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile server.c
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
index 8ea8344ad0029ceef3c92e257c1f8e4d190b1b2c..066f2a1b73654281d74edf58fbb68de0cae9e8ec 100644 (file)
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if { [build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1 } {
index 685ef17bd3d4dd702a77701c704b5e77e39ae290..134ab6a9c29c9c31068da36b29a9d38f0de16fe0 100644 (file)
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if { [build_executable "failed to prepare" $testfile $srcfile] == -1 } {
index 0c7e97c11d85554f57edbed2009fd1588d41b480..9845a7a83331f8f049a9f7d88f5e66f0e5342bf7 100644 (file)
 
 load_lib gdbserver-support.exp
 
-if { [skip_gdbserver_tests] } {
-    verbose "skipping gdbserver tests"
-    return -1
-}
+require !skip_gdbserver_tests
 
 standard_testfile
 if {[build_executable "failed to prepare" $testfile $srcfile "additional_flags=--no-builtin"] == -1} {
index adaef53d2ecab5603f04b972f39d9a7bd8e4a649..a8318c0de4a66280a7524802216b21d748e41c2d 100644 (file)
@@ -19,9 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [build_executable "failed to prepare" $::testfile $::srcfile \
          {debug}] } {
index 4fc134ddd834009111bfa2f1f455ebc369586e60..f727892fdc8d676d7312888e624a70576073c6b8 100644 (file)
@@ -19,9 +19,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 global server_spawn_id
 
index e85609bdeca73af6f6c79ea31c364c75558746b5..caaa4f69afbbbbd295f902c5c19c5e9176e041bc 100644 (file)
@@ -21,9 +21,7 @@ load_lib gdbserver-support.exp
 
 standard_testfile
 
-if { [skip_gdbserver_tests] } {
-    return 0
-}
+require !skip_gdbserver_tests
 
 if { [istarget *-*-mingw*]
      || [istarget *-*-cygwin*] } {