From cdd4206647d0ef8d54d0fa66b3dfa57a4ec07db9 Mon Sep 17 00:00:00 2001 From: Bruno Larsen Date: Fri, 13 May 2022 13:23:57 -0300 Subject: 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. --- gdb/testsuite/gdb.cp/watch-cp.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/testsuite/gdb.cp/watch-cp.exp') diff --git a/gdb/testsuite/gdb.cp/watch-cp.exp b/gdb/testsuite/gdb.cp/watch-cp.exp index 2aba411..30e804d 100644 --- a/gdb/testsuite/gdb.cp/watch-cp.exp +++ b/gdb/testsuite/gdb.cp/watch-cp.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [skip_cplus_tests] || [skip_hw_watchpoint_tests]} { continue } +if { [skip_cplus_tests] || [skip_hw_watchpoint_tests]} { return } standard_testfile .cc @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { if ![runto_main] then { perror "couldn't run to main" - continue + return } gdb_test "watch watchme\[3\]" "atchpoint .*: watchme.*" "set watchpoint" -- cgit v1.1