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.python | |
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.python')
-rw-r--r-- | gdb/testsuite/gdb.python/py-framefilter-mi.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-inferior-leak.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-mi-cmd.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-mi-events.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-mi-objfile.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-mi.exp | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/gdb/testsuite/gdb.python/py-framefilter-mi.exp b/gdb/testsuite/gdb.python/py-framefilter-mi.exp index 08f9e17..344067f 100644 --- a/gdb/testsuite/gdb.python/py-framefilter-mi.exp +++ b/gdb/testsuite/gdb.python/py-framefilter-mi.exp @@ -22,7 +22,7 @@ set MIFLAGS "-i=mi2" gdb_exit if [mi_gdb_start] { - continue + return } standard_testfile py-framefilter-mi.c diff --git a/gdb/testsuite/gdb.python/py-inferior-leak.exp b/gdb/testsuite/gdb.python/py-inferior-leak.exp index 3e87835..c46b7aa 100644 --- a/gdb/testsuite/gdb.python/py-inferior-leak.exp +++ b/gdb/testsuite/gdb.python/py-inferior-leak.exp @@ -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] diff --git a/gdb/testsuite/gdb.python/py-mi-cmd.exp b/gdb/testsuite/gdb.python/py-mi-cmd.exp index 300ab95..d372518 100644 --- a/gdb/testsuite/gdb.python/py-mi-cmd.exp +++ b/gdb/testsuite/gdb.python/py-mi-cmd.exp @@ -20,7 +20,7 @@ set MIFLAGS "-i=mi" gdb_exit if {[mi_gdb_start]} { - continue + return } if {[lsearch -exact [mi_get_features] python] < 0} { diff --git a/gdb/testsuite/gdb.python/py-mi-events.exp b/gdb/testsuite/gdb.python/py-mi-events.exp index 9014a88..e8361c0 100644 --- a/gdb/testsuite/gdb.python/py-mi-events.exp +++ b/gdb/testsuite/gdb.python/py-mi-events.exp @@ -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}] diff --git a/gdb/testsuite/gdb.python/py-mi-objfile.exp b/gdb/testsuite/gdb.python/py-mi-objfile.exp index f1c353e..3e8bf82b 100644 --- a/gdb/testsuite/gdb.python/py-mi-objfile.exp +++ b/gdb/testsuite/gdb.python/py-mi-objfile.exp @@ -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 diff --git a/gdb/testsuite/gdb.python/py-mi.exp b/gdb/testsuite/gdb.python/py-mi.exp index b832b2c..2919804 100644 --- a/gdb/testsuite/gdb.python/py-mi.exp +++ b/gdb/testsuite/gdb.python/py-mi.exp @@ -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 |