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.
This commit is contained in:
Bruno Larsen
2022-05-13 13:23:57 -03:00
parent b7ff32f191
commit cdd4206647
298 changed files with 394 additions and 394 deletions

View File

@ -22,7 +22,7 @@ set MIFLAGS "-i=mi2"
gdb_exit
if [mi_gdb_start] {
continue
return
}
standard_testfile py-framefilter-mi.c

View File

@ -23,12 +23,12 @@ standard_testfile
clean_restart
# Skip all tests if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
if { [skip_python_tests] } { return }
# Skip this test if the tracemalloc module is not available.
if { ![gdb_py_module_available "tracemalloc"] } {
unsupported "tracemalloc module not available"
continue
return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]

View File

@ -20,7 +20,7 @@ set MIFLAGS "-i=mi"
gdb_exit
if {[mi_gdb_start]} {
continue
return
}
if {[lsearch -exact [mi_get_features] python] < 0} {

View File

@ -20,7 +20,7 @@ set MIFLAGS "-i=mi2"
gdb_exit
if [mi_gdb_start] {
continue
return
}
standard_testfile
@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
if { [mi_skip_python_tests] } { continue }
if { [mi_skip_python_tests] } { return }
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]

View File

@ -20,7 +20,7 @@ set MIFLAGS "-i=mi2"
gdb_exit
if [mi_gdb_start] {
continue
return
}
standard_testfile
@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
if { [mi_skip_python_tests] } { continue }
if { [mi_skip_python_tests] } { return }
# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
# Care is taken to put it in the same directory as the binary so that

View File

@ -21,7 +21,7 @@ set MIFLAGS "-i=mi2"
gdb_exit
if [mi_gdb_start] {
continue
return
}
standard_testfile py-prettyprint.c
@ -348,7 +348,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" \
}
if [mi_gdb_start] {
continue
return
}
mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir