diff options
author | Tom Tromey <tom@tromey.com> | 2022-12-14 10:09:38 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-01-13 13:18:56 -0700 |
commit | ba16d4d85f053d8a533b0c40218f4d681f6eebd5 (patch) | |
tree | dbf28855c433e3e3d302bd13649645163ce7a539 /gdb/testsuite | |
parent | 604f757b6dae76205253d5434083a7416d6c3630 (diff) | |
download | binutils-ba16d4d85f053d8a533b0c40218f4d681f6eebd5.zip binutils-ba16d4d85f053d8a533b0c40218f4d681f6eebd5.tar.gz binutils-ba16d4d85f053d8a533b0c40218f4d681f6eebd5.tar.bz2 |
Use require !skip_gdbserver_tests
This changes some tests to use "require !skip_gdbserver_tests".
Diffstat (limited to 'gdb/testsuite')
34 files changed, 34 insertions, 108 deletions
diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp index 868cf1f..548aa16 100644 --- a/gdb/testsuite/gdb.btrace/reconnect.exp +++ b/gdb/testsuite/gdb.btrace/reconnect.exp @@ -20,10 +20,7 @@ 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] { diff --git a/gdb/testsuite/gdb.mi/mi-file-transfer.exp b/gdb/testsuite/gdb.mi/mi-file-transfer.exp index ec914d1..71aa2f8 100644 --- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp +++ b/gdb/testsuite/gdb.mi/mi-file-transfer.exp @@ -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 diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp index 882ab69..50b04ad 100644 --- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp +++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp @@ -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 diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp index baec66d..c6305ed 100644 --- a/gdb/testsuite/gdb.python/py-send-packet.exp +++ b/gdb/testsuite/gdb.python/py-send-packet.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/abspath.exp b/gdb/testsuite/gdb.server/abspath.exp index ddfd722..58d9b39 100644 --- a/gdb/testsuite/gdb.server/abspath.exp +++ b/gdb/testsuite/gdb.server/abspath.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp index ea4c87e..bb6f367 100644 --- a/gdb/testsuite/gdb.server/attach-flag.exp +++ b/gdb/testsuite/gdb.server/attach-flag.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp index e52139f..fe561d8 100644 --- a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp +++ b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp @@ -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}] } { diff --git a/gdb/testsuite/gdb.server/connect-stopped-target.exp b/gdb/testsuite/gdb.server/connect-stopped-target.exp index dade801..ed193f8 100644 --- a/gdb/testsuite/gdb.server/connect-stopped-target.exp +++ b/gdb/testsuite/gdb.server/connect-stopped-target.exp @@ -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} 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 b080444..159f82f 100644 --- a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp +++ b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/connect-without-multi-process.exp b/gdb/testsuite/gdb.server/connect-without-multi-process.exp index 816d367..831ccd6 100644 --- a/gdb/testsuite/gdb.server/connect-without-multi-process.exp +++ b/gdb/testsuite/gdb.server/connect-without-multi-process.exp @@ -18,9 +18,7 @@ load_lib gdbserver-support.exp -if {[skip_gdbserver_tests]} { - return -} +require !skip_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 d53651e..88c4df1 100644 --- a/gdb/testsuite/gdb.server/exit-multiple-threads.exp +++ b/gdb/testsuite/gdb.server/exit-multiple-threads.exp @@ -25,10 +25,7 @@ load_lib gdbserver-support.exp -if { [skip_gdbserver_tests] } { - verbose "skipping gdbserver tests" - return -1 -} +require !skip_gdbserver_tests standard_testfile diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp index 62296d0..81b324d 100644 --- a/gdb/testsuite/gdb.server/ext-attach.exp +++ b/gdb/testsuite/gdb.server/ext-attach.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/ext-restart.exp b/gdb/testsuite/gdb.server/ext-restart.exp index 0d133ca..df26c91 100644 --- a/gdb/testsuite/gdb.server/ext-restart.exp +++ b/gdb/testsuite/gdb.server/ext-restart.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index bfc6867..7cfd2bf 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/ext-wrapper.exp b/gdb/testsuite/gdb.server/ext-wrapper.exp index 98aa889..4f150cf 100644 --- a/gdb/testsuite/gdb.server/ext-wrapper.exp +++ b/gdb/testsuite/gdb.server/ext-wrapper.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp index ea9298f..cd98ffe 100644 --- a/gdb/testsuite/gdb.server/file-transfer.exp +++ b/gdb/testsuite/gdb.server/file-transfer.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/monitor-exit-quit.exp b/gdb/testsuite/gdb.server/monitor-exit-quit.exp index 8fa41e3..88eb2e4 100644 --- a/gdb/testsuite/gdb.server/monitor-exit-quit.exp +++ b/gdb/testsuite/gdb.server/monitor-exit-quit.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/multi-ui-errors.exp b/gdb/testsuite/gdb.server/multi-ui-errors.exp index e5aad88..95a08c9 100644 --- a/gdb/testsuite/gdb.server/multi-ui-errors.exp +++ b/gdb/testsuite/gdb.server/multi-ui-errors.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp index d0b43f9c..0e2fbae 100644 --- a/gdb/testsuite/gdb.server/no-thread-db.exp +++ b/gdb/testsuite/gdb.server/no-thread-db.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp index d4fceea..60ca0a4 100644 --- a/gdb/testsuite/gdb.server/non-existing-program.exp +++ b/gdb/testsuite/gdb.server/non-existing-program.exp @@ -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 == "" } { diff --git a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp index f316609..4270769 100644 --- a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp +++ b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp @@ -19,10 +19,7 @@ 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." diff --git a/gdb/testsuite/gdb.server/run-without-local-binary.exp b/gdb/testsuite/gdb.server/run-without-local-binary.exp index 21682a5..4f3f0d9 100644 --- a/gdb/testsuite/gdb.server/run-without-local-binary.exp +++ b/gdb/testsuite/gdb.server/run-without-local-binary.exp @@ -15,9 +15,7 @@ load_lib gdbserver-support.exp -if {[skip_gdbserver_tests]} { - return -} +require !skip_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 a6d469e..76570f3 100644 --- a/gdb/testsuite/gdb.server/server-connect.exp +++ b/gdb/testsuite/gdb.server/server-connect.exp @@ -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] } { diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp index dbf5218..1eb9e2e 100644 --- a/gdb/testsuite/gdb.server/server-kill-python.exp +++ b/gdb/testsuite/gdb.server/server-kill-python.exp @@ -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. diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp index f59e11a..04b7f62 100644 --- a/gdb/testsuite/gdb.server/server-kill.exp +++ b/gdb/testsuite/gdb.server/server-kill.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/server-mon.exp b/gdb/testsuite/gdb.server/server-mon.exp index b9ae008..4b728cb 100644 --- a/gdb/testsuite/gdb.server/server-mon.exp +++ b/gdb/testsuite/gdb.server/server-mon.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp index 662ff0a..2038ca9 100644 --- a/gdb/testsuite/gdb.server/server-pipe.exp +++ b/gdb/testsuite/gdb.server/server-pipe.exp @@ -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 == "" } { diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-run.exp index 522719d..55b4005 100644 --- a/gdb/testsuite/gdb.server/server-run.exp +++ b/gdb/testsuite/gdb.server/server-run.exp @@ -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 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 8ea8344..066f2a1 100644 --- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp @@ -30,10 +30,7 @@ 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 } { diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp index 685ef17..134ab6a 100644 --- a/gdb/testsuite/gdb.server/stop-reply-no-thread.exp +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread.exp @@ -22,10 +22,7 @@ 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 } { diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp index 0c7e97c..9845a7a 100644 --- a/gdb/testsuite/gdb.server/sysroot.exp +++ b/gdb/testsuite/gdb.server/sysroot.exp @@ -20,10 +20,7 @@ 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} { diff --git a/gdb/testsuite/gdb.server/twice-connect.exp b/gdb/testsuite/gdb.server/twice-connect.exp index adaef53..a8318c0 100644 --- a/gdb/testsuite/gdb.server/twice-connect.exp +++ b/gdb/testsuite/gdb.server/twice-connect.exp @@ -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}] } { diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp index 4fc134d..f727892 100644 --- a/gdb/testsuite/gdb.server/unittest.exp +++ b/gdb/testsuite/gdb.server/unittest.exp @@ -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 diff --git a/gdb/testsuite/gdb.server/wrapper.exp b/gdb/testsuite/gdb.server/wrapper.exp index e85609b..caaa4f6 100644 --- a/gdb/testsuite/gdb.server/wrapper.exp +++ b/gdb/testsuite/gdb.server/wrapper.exp @@ -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*] } { |