From: Tom Tromey Date: Sun, 8 Jan 2023 17:53:55 +0000 (-0700) Subject: Rename to allow_gdbserver_tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cadfc59b0d721599b32fab6eeaba401360602e0f;p=binutils-gdb.git Rename to allow_gdbserver_tests This changes skip_gdbserver_tests to invert the sense, and renames it to allow_gdbserver_tests. --- diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp index acad4c6e828..113b8e18aad 100644 --- a/gdb/testsuite/gdb.btrace/enable.exp +++ b/gdb/testsuite/gdb.btrace/enable.exp @@ -70,13 +70,13 @@ gdb_test "record btrace" "The process is already being recorded\\. Use \"record # continue to the end and make sure we don't die gdb_test "continue" ".*Inferior.*exited.*" "continue to end" -# skip_gdbserver_tests requires GDB not running. +# allow_gdbserver_tests requires GDB not running. gdb_exit # skip the rerun test when using gdbserver # otherwise rerun twice, target should be automatically disabled load_lib gdbserver-support.exp -if [skip_gdbserver_tests] { +if !{[allow_gdbserver_tests]} { unsupported "target does not support gdbserver" return 0 } diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp index 1da9f4be566..2c8358327a4 100644 --- a/gdb/testsuite/gdb.btrace/reconnect.exp +++ b/gdb/testsuite/gdb.btrace/reconnect.exp @@ -20,7 +20,7 @@ load_lib gdbserver-support.exp require allow_btrace_tests -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile if [prepare_for_testing "failed to prepare" $testfile $srcfile] { diff --git a/gdb/testsuite/gdb.mi/mi-file-transfer.exp b/gdb/testsuite/gdb.mi/mi-file-transfer.exp index 71aa2f83cc0..726504c46d8 100644 --- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp +++ b/gdb/testsuite/gdb.mi/mi-file-transfer.exp @@ -20,7 +20,7 @@ load_lib gdbserver-support.exp load_lib mi-support.exp set MIFLAGS "-i=mi" -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile basics.c diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp index 50b04ad6761..1ef7984078a 100644 --- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp +++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp @@ -22,7 +22,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests require can_spawn_for_attach diff --git a/gdb/testsuite/gdb.multi/multi-target.exp.tcl b/gdb/testsuite/gdb.multi/multi-target.exp.tcl index af9b564228f..2356b6c8e6e 100644 --- a/gdb/testsuite/gdb.multi/multi-target.exp.tcl +++ b/gdb/testsuite/gdb.multi/multi-target.exp.tcl @@ -165,7 +165,7 @@ proc setup {non-stop} { proc multi_target_prepare {} { global binfile srcfile - if { [skip_gdbserver_tests] } { + if { ![allow_gdbserver_tests] } { return 0 } diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp index e09dbb05fd4..75e7bb6aa9c 100644 --- a/gdb/testsuite/gdb.python/py-send-packet.exp +++ b/gdb/testsuite/gdb.python/py-send-packet.exp @@ -24,7 +24,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests !skip_python_tests +require allow_gdbserver_tests !skip_python_tests if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return -1 diff --git a/gdb/testsuite/gdb.server/abspath.exp b/gdb/testsuite/gdb.server/abspath.exp index 58d9b39efc1..46657c65e8f 100644 --- a/gdb/testsuite/gdb.server/abspath.exp +++ b/gdb/testsuite/gdb.server/abspath.exp @@ -22,7 +22,7 @@ load_lib gdbserver-support.exp standard_testfile normal.c -require !skip_gdbserver_tests +require allow_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 diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp index bb6f3673e4e..ad67303a7dd 100644 --- a/gdb/testsuite/gdb.server/attach-flag.exp +++ b/gdb/testsuite/gdb.server/attach-flag.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests require can_spawn_for_attach diff --git a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp index fe561d8e924..d4395d2c441 100644 --- a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp +++ b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile server.c -require !skip_gdbserver_tests +require allow_gdbserver_tests if { [prepare_for_testing "failed to prepare" ${binfile} "${srcfile}" \ {debug pthreads}] } { diff --git a/gdb/testsuite/gdb.server/connect-stopped-target.exp b/gdb/testsuite/gdb.server/connect-stopped-target.exp index ed193f8599c..2dfe2ea94ac 100644 --- a/gdb/testsuite/gdb.server/connect-stopped-target.exp +++ b/gdb/testsuite/gdb.server/connect-stopped-target.exp @@ -20,7 +20,7 @@ load_lib gdbserver-support.exp load_lib prelink-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile set executable ${testfile} diff --git a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp index 159f82f6c3b..b98e566e2d6 100644 --- a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp +++ b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp @@ -25,7 +25,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests if { [build_executable "failed to prepare" $testfile $srcfile debug] } { return -1 diff --git a/gdb/testsuite/gdb.server/connect-without-multi-process.exp b/gdb/testsuite/gdb.server/connect-without-multi-process.exp index 831ccd6f876..fcd64c9f49a 100644 --- a/gdb/testsuite/gdb.server/connect-without-multi-process.exp +++ b/gdb/testsuite/gdb.server/connect-without-multi-process.exp @@ -18,7 +18,7 @@ load_lib gdbserver-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile diff --git a/gdb/testsuite/gdb.server/exit-multiple-threads.exp b/gdb/testsuite/gdb.server/exit-multiple-threads.exp index 88c4df11ccd..46239e3eabf 100644 --- a/gdb/testsuite/gdb.server/exit-multiple-threads.exp +++ b/gdb/testsuite/gdb.server/exit-multiple-threads.exp @@ -25,7 +25,7 @@ load_lib gdbserver-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp index 81b324d4c5f..f7092b0340c 100644 --- a/gdb/testsuite/gdb.server/ext-attach.exp +++ b/gdb/testsuite/gdb.server/ext-attach.exp @@ -22,7 +22,7 @@ load_lib trace-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests require can_spawn_for_attach diff --git a/gdb/testsuite/gdb.server/ext-restart.exp b/gdb/testsuite/gdb.server/ext-restart.exp index df26c91fa25..5b6aa7038f2 100644 --- a/gdb/testsuite/gdb.server/ext-restart.exp +++ b/gdb/testsuite/gdb.server/ext-restart.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile server.c -require !skip_gdbserver_tests +require allow_gdbserver_tests save_vars { GDBFLAGS } { # If GDB and GDBserver are both running locally, set the sysroot to avoid diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index 2add84e8b1b..59ead666d7b 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile server.c -require !skip_gdbserver_tests +require allow_gdbserver_tests if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { return -1 diff --git a/gdb/testsuite/gdb.server/ext-wrapper.exp b/gdb/testsuite/gdb.server/ext-wrapper.exp index 4f150cfc0a5..2fe601a81aa 100644 --- a/gdb/testsuite/gdb.server/ext-wrapper.exp +++ b/gdb/testsuite/gdb.server/ext-wrapper.exp @@ -19,7 +19,7 @@ load_lib gdbserver-support.exp standard_testfile wrapper.c -require !skip_gdbserver_tests +require allow_gdbserver_tests if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { return -1 diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp index cd98ffee90d..05da514413c 100644 --- a/gdb/testsuite/gdb.server/file-transfer.exp +++ b/gdb/testsuite/gdb.server/file-transfer.exp @@ -20,7 +20,7 @@ load_lib gdbserver-support.exp standard_testfile server.c -require !skip_gdbserver_tests +require allow_gdbserver_tests if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return -1 diff --git a/gdb/testsuite/gdb.server/monitor-exit-quit.exp b/gdb/testsuite/gdb.server/monitor-exit-quit.exp index 88eb2e483b9..f253f823896 100644 --- a/gdb/testsuite/gdb.server/monitor-exit-quit.exp +++ b/gdb/testsuite/gdb.server/monitor-exit-quit.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile server.c -require !skip_gdbserver_tests +require allow_gdbserver_tests if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { return -1 diff --git a/gdb/testsuite/gdb.server/multi-ui-errors.exp b/gdb/testsuite/gdb.server/multi-ui-errors.exp index 95a08c9bca6..9cc5239d888 100644 --- a/gdb/testsuite/gdb.server/multi-ui-errors.exp +++ b/gdb/testsuite/gdb.server/multi-ui-errors.exp @@ -24,7 +24,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests save_vars { GDBFLAGS } { # If GDB and GDBserver are both running locally, set the sysroot to avoid diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp index 0e2fbae80be..53d04753c40 100644 --- a/gdb/testsuite/gdb.server/no-thread-db.exp +++ b/gdb/testsuite/gdb.server/no-thread-db.exp @@ -25,7 +25,7 @@ load_lib gdbserver-support.exp standard_testfile set unresolvable_thread_db_path "/foo/bar" -require !skip_gdbserver_tests +require allow_gdbserver_tests if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { return -1 diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp index 60ca0a43dfb..32f27fa2b1c 100644 --- a/gdb/testsuite/gdb.server/non-existing-program.exp +++ b/gdb/testsuite/gdb.server/non-existing-program.exp @@ -22,7 +22,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests set gdbserver [find_gdbserver] if { $gdbserver == "" } { diff --git a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp index 42707692c4b..c8ef81443e5 100644 --- a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp +++ b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp @@ -19,7 +19,7 @@ load_lib gdbserver-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests if [target_info exists gdb,nointerrupts] { verbose "Skipping reconnect-ctrl-c.exp because of nointerrupts." diff --git a/gdb/testsuite/gdb.server/run-without-local-binary.exp b/gdb/testsuite/gdb.server/run-without-local-binary.exp index 4f3f0d9af4e..c390eeb435a 100644 --- a/gdb/testsuite/gdb.server/run-without-local-binary.exp +++ b/gdb/testsuite/gdb.server/run-without-local-binary.exp @@ -15,7 +15,7 @@ load_lib gdbserver-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile normal.c diff --git a/gdb/testsuite/gdb.server/server-connect.exp b/gdb/testsuite/gdb.server/server-connect.exp index 76570f34232..6c4c969c30d 100644 --- a/gdb/testsuite/gdb.server/server-connect.exp +++ b/gdb/testsuite/gdb.server/server-connect.exp @@ -22,7 +22,7 @@ load_lib gdbserver-support.exp standard_testfile normal.c -require !skip_gdbserver_tests +require allow_gdbserver_tests # We want to have control over where we start gdbserver. if { [is_remote target] } { diff --git a/gdb/testsuite/gdb.server/server-exec-info.exp b/gdb/testsuite/gdb.server/server-exec-info.exp index a80c0f96480..b1a392883b0 100644 --- a/gdb/testsuite/gdb.server/server-exec-info.exp +++ b/gdb/testsuite/gdb.server/server-exec-info.exp @@ -18,7 +18,7 @@ load_lib gdbserver-support.exp # We test for skip_shlib_tests in this test because without a main # exec file we only have the exec target loaded if shared libraries # are present. -require !skip_gdbserver_tests !skip_shlib_tests +require allow_gdbserver_tests !skip_shlib_tests standard_testfile server.c if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp index 4ef70daaf90..bc62cbfc431 100644 --- a/gdb/testsuite/gdb.server/server-kill-python.exp +++ b/gdb/testsuite/gdb.server/server-kill-python.exp @@ -23,7 +23,7 @@ load_lib gdbserver-support.exp standard_testfile multi-ui-errors.c -require !skip_gdbserver_tests !skip_python_tests +require allow_gdbserver_tests !skip_python_tests if {[build_executable "failed to prepare" ${testfile} \ ${srcfile}] == -1} { diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp index 04b7f62561a..b757369b71c 100644 --- a/gdb/testsuite/gdb.server/server-kill.exp +++ b/gdb/testsuite/gdb.server/server-kill.exp @@ -22,7 +22,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests if { [build_executable "failed to prepare" ${testfile}] } { return -1 diff --git a/gdb/testsuite/gdb.server/server-mon.exp b/gdb/testsuite/gdb.server/server-mon.exp index 4b728cb8038..728cc84a9e0 100644 --- a/gdb/testsuite/gdb.server/server-mon.exp +++ b/gdb/testsuite/gdb.server/server-mon.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile server.c -require !skip_gdbserver_tests +require allow_gdbserver_tests if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return -1 diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp index 2038ca9140d..693771e942e 100644 --- a/gdb/testsuite/gdb.server/server-pipe.exp +++ b/gdb/testsuite/gdb.server/server-pipe.exp @@ -32,7 +32,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests set gdbserver [find_gdbserver] if { $gdbserver == "" } { diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-run.exp index 55b40057f91..35f499f7d1a 100644 --- a/gdb/testsuite/gdb.server/server-run.exp +++ b/gdb/testsuite/gdb.server/server-run.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile server.c -require !skip_gdbserver_tests +require allow_gdbserver_tests if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { return -1 diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp index f22ec8956c4..ef99be74747 100644 --- a/gdb/testsuite/gdb.server/solib-list.exp +++ b/gdb/testsuite/gdb.server/solib-list.exp @@ -23,7 +23,7 @@ load_lib gdbserver-support.exp load_lib prelink-support.exp -require !skip_gdbserver_tests !skip_shlib_tests +require allow_gdbserver_tests !skip_shlib_tests standard_testfile solib-list-main.c set srclibfile ${testfile}-lib.c diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp index 066f2a1b736..20d45ba17da 100644 --- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp @@ -30,7 +30,7 @@ load_lib gdbserver-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile if { [build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1 } { diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp index 134ab6a9c29..848ada128f3 100644 --- a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp @@ -22,7 +22,7 @@ load_lib gdbserver-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile if { [build_executable "failed to prepare" $testfile $srcfile] == -1 } { diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp index 9845a7a8333..715d6001020 100644 --- a/gdb/testsuite/gdb.server/sysroot.exp +++ b/gdb/testsuite/gdb.server/sysroot.exp @@ -20,7 +20,7 @@ load_lib gdbserver-support.exp -require !skip_gdbserver_tests +require allow_gdbserver_tests standard_testfile if {[build_executable "failed to prepare" $testfile $srcfile "additional_flags=--no-builtin"] == -1} { diff --git a/gdb/testsuite/gdb.server/twice-connect.exp b/gdb/testsuite/gdb.server/twice-connect.exp index a8318c0de4a..8ff8334f5f2 100644 --- a/gdb/testsuite/gdb.server/twice-connect.exp +++ b/gdb/testsuite/gdb.server/twice-connect.exp @@ -19,7 +19,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests if { [build_executable "failed to prepare" $::testfile $::srcfile \ {debug}] } { diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp index f727892fdc8..d25ee362644 100644 --- a/gdb/testsuite/gdb.server/unittest.exp +++ b/gdb/testsuite/gdb.server/unittest.exp @@ -19,7 +19,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests global server_spawn_id diff --git a/gdb/testsuite/gdb.server/wrapper.exp b/gdb/testsuite/gdb.server/wrapper.exp index caaa4f69afb..ec985e0da2e 100644 --- a/gdb/testsuite/gdb.server/wrapper.exp +++ b/gdb/testsuite/gdb.server/wrapper.exp @@ -21,7 +21,7 @@ load_lib gdbserver-support.exp standard_testfile -require !skip_gdbserver_tests +require allow_gdbserver_tests if { [istarget *-*-mingw*] || [istarget *-*-cygwin*] } { diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index 49ae56190c2..30d94fd7eb6 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -160,12 +160,12 @@ proc find_gdbserver { } { return "" } -# Return non-zero if we should skip gdbserver-specific tests. +# Return non-zero if we should run gdbserver-specific tests. -proc skip_gdbserver_tests { } { - if { [find_gdbserver] == "" } { - return 1 - } +proc allow_gdbserver_tests { } { + if { [find_gdbserver] == "" } { + return 0 + } # If GDB is lack of XML support, and targets, like arm, have # multiple target descriptions, GDB doesn't know which target @@ -179,10 +179,10 @@ proc skip_gdbserver_tests { } { || [istarget "s390*-*-linux*"] || [istarget "x86_64-*-linux*"] || [istarget "i\[34567\]86-*-linux*"]) } { - return 1 + return 0 } - return 0 + return 1 } # Download the currently loaded program to the target if necessary.