diff options
author | Bruno Larsen <blarsen@redhat.com> | 2022-05-13 13:23:57 -0300 |
---|---|---|
committer | Bruno Larsen <blarsen@redhat.com> | 2022-05-16 10:07:43 -0300 |
commit | cdd4206647d0ef8d54d0fa66b3dfa57a4ec07db9 (patch) | |
tree | be9e3ffcbe58cd24f751c1c828a91b8b79099784 /gdb/testsuite/gdb.threads | |
parent | b7ff32f191ed7e708412e9faa31cf691f08ca695 (diff) | |
download | binutils-cdd4206647d0ef8d54d0fa66b3dfa57a4ec07db9.zip binutils-cdd4206647d0ef8d54d0fa66b3dfa57a4ec07db9.tar.gz binutils-cdd4206647d0ef8d54d0fa66b3dfa57a4ec07db9.tar.bz2 |
gdb/testsuite: fix "continue outside of loop" TCL errors
Many test cases had a few lines in the beginning that look like:
if { condition } {
continue
}
Where conditions varied, but were mostly in the form of ![runto_main] or
[skip_*_tests], making it quite clear that this code block was supposed
to finish the test if it entered the code block. This generates TCL
errors, as most of these tests are not inside loops. All cases on which
this was an obvious mistake are changed in this patch.
Diffstat (limited to 'gdb/testsuite/gdb.threads')
13 files changed, 14 insertions, 14 deletions
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp index d824c5b..b4a255f 100644 --- a/gdb/testsuite/gdb.threads/attach-into-signal.exp +++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp @@ -19,7 +19,7 @@ # This test only works on Linux if { ![isnative] || [is_remote host] || [use_gdb_stub] || ![istarget *-linux*] } { - continue + return } standard_testfile diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp index b2e5277..68c866a 100644 --- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp +++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp @@ -39,7 +39,7 @@ # This test only works on Linux if { ![isnative] || [is_remote host] || [use_gdb_stub] || ![istarget *-linux*] } { - continue + return } standard_testfile diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp index d8a8382..72a9077 100644 --- a/gdb/testsuite/gdb.threads/attach-stopped.exp +++ b/gdb/testsuite/gdb.threads/attach-stopped.exp @@ -20,7 +20,7 @@ # This test only works on Linux if { ![isnative] || [is_remote host] || [use_gdb_stub] || ![istarget *-linux*] } { - continue + return } standard_testfile diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/check-libthread-db.exp index 4e61a3c..231c1d2 100644 --- a/gdb/testsuite/gdb.threads/check-libthread-db.exp +++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp @@ -15,7 +15,7 @@ # This test only works for native processes on GNU/Linux. if {[target_info gdb_protocol] != "" || ![istarget *-linux*]} { - continue + return } # Test relies on checking gdb debug output. Do not run if gdb debug is diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp index c05ac4a..845d859 100644 --- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp +++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp @@ -24,7 +24,7 @@ # inferiors have terminated, and this test requires that. if { [target_info exists gdb_protocol] && [target_info gdb_protocol] == "remote" } { - continue + return } standard_testfile diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp index 52e701a..81b5b57 100644 --- a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp +++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp @@ -27,7 +27,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab # test. if [target_info exists gdb,cannot_call_functions] { unsupported "this target can not call functions" - continue + return } proc get_dummy_frame_number { } { diff --git a/gdb/testsuite/gdb.threads/hand-call-new-thread.exp b/gdb/testsuite/gdb.threads/hand-call-new-thread.exp index 25da016..74cb58d 100644 --- a/gdb/testsuite/gdb.threads/hand-call-new-thread.exp +++ b/gdb/testsuite/gdb.threads/hand-call-new-thread.exp @@ -23,7 +23,7 @@ if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] } if ![runto_main] { - continue + return } # Set a thread-specific breakpoint that the wrong thread trips on diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp index e6d444e..744b47a 100644 --- a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp +++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp @@ -28,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab # test. if [target_info exists gdb,cannot_call_functions] { unsupported "this target can not call functions" - continue + return } clean_restart ${binfile} diff --git a/gdb/testsuite/gdb.threads/names.exp b/gdb/testsuite/gdb.threads/names.exp index f7dddaa..ecb2417 100644 --- a/gdb/testsuite/gdb.threads/names.exp +++ b/gdb/testsuite/gdb.threads/names.exp @@ -17,7 +17,7 @@ # threads). if [target_info exists gdb,no_thread_names] { - continue + return } standard_testfile @@ -27,7 +27,7 @@ if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] } if ![runto "all_threads_ready"] { - continue + return } gdb_test "info threads" \ diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp index 32c5f85..2a9746a 100644 --- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp +++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp @@ -21,7 +21,7 @@ # Test relies on checking gdb debug output. Do not run if gdb debug is # enabled as any debug will be redirected to the log. if [gdb_debug_enabled] { - continue + return } standard_testfile diff --git a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp index 6548b76..8669737 100644 --- a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp +++ b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp @@ -35,7 +35,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads} } if ![runto_main] { - continue + return } # Make sure it's GDB's decr_pc logic that's being tested, not the diff --git a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp index c8ac550..6fb58e3 100644 --- a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp +++ b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp @@ -33,7 +33,7 @@ proc do_test {displaced command} { clean_restart $executable if ![runto_main] { - continue + return } gdb_test_no_output "set displaced-stepping $displaced" diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp index 23589e2..6d021f8 100644 --- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp +++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp @@ -28,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab # test. if [target_info exists gdb,cannot_call_functions] { unsupported "this target can not call functions" - continue + return } clean_restart ${binfile} |