[v2,36/37] GDB: testsuite: TUI: Don't return 0 from top-level (manual)

Message ID 20260429230432.60487-37-thiago.bauermann@linaro.org
State New
Headers
Series GDB: testsuite: Fix top-level returns |

Commit Message

Thiago Jung Bauermann April 29, 2026, 11:04 p.m. UTC
  This patch changes statements that return 0 from the top level, and also
one "return -1" statement that wasn't caught by sed.
---
 gdb/testsuite/gdb.tui/basic.exp                 | 2 +-
 gdb/testsuite/gdb.tui/resize-2.exp              | 2 +-
 gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp | 2 +-
 gdb/testsuite/gdb.tui/tui-mode-switch.exp       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.tui/basic.exp b/gdb/testsuite/gdb.tui/basic.exp
index 26264082a163..45fdf3a7a76f 100644
--- a/gdb/testsuite/gdb.tui/basic.exp
+++ b/gdb/testsuite/gdb.tui/basic.exp
@@ -68,11 +68,11 @@  for { set i 1 } { $i <= $Term::_cols } { incr i } {
 # current way we position source code on the screen, which might change in
 # the future.
 gdb_assert { $main_screen_line == 7 } \
     "check main is where we expect on the screen"
 if { $main_screen_line == -1 } {
-    return 0
+    return
 }
 
 # Check the horizontal scrolling.
 set shifted_main_re [string range $main_re 1 end]
 set regexp "$main_line\[\\t \]+$shifted_main_re"
diff --git a/gdb/testsuite/gdb.tui/resize-2.exp b/gdb/testsuite/gdb.tui/resize-2.exp
index 69578cc4a22e..b7eb38f3c046 100644
--- a/gdb/testsuite/gdb.tui/resize-2.exp
+++ b/gdb/testsuite/gdb.tui/resize-2.exp
@@ -25,11 +25,11 @@  set screen_dim { 0 0 80 24 }
 # Use a layout with just a command window.
 gdb_test "tui new-layout command-layout cmd 1"
 
 if {![Term::prepare_for_tui]} {
     unsupported "TUI not supported"
-    return 0
+    return
 }
 
 # Enter TUI.
 Term::command_no_prompt_prefix "layout command-layout"
 
diff --git a/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp b/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
index 58add6dc3291..00f52c7cdfb6 100644
--- a/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
+++ b/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
@@ -29,11 +29,11 @@  if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" \
     # Try with a shorter version.
     lappend ccopts "additional_flags=-DSHORT_IDENTIFIERS"
     if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" \
 	      executable $ccopts] != "" } {
 	untested "compile"
-	return -1
+	return
     }
 }
 
 Term::clean_restart 24 80 $testfile
 if {![Term::prepare_for_tui]} {
diff --git a/gdb/testsuite/gdb.tui/tui-mode-switch.exp b/gdb/testsuite/gdb.tui/tui-mode-switch.exp
index c60596213b85..250b557125ec 100644
--- a/gdb/testsuite/gdb.tui/tui-mode-switch.exp
+++ b/gdb/testsuite/gdb.tui/tui-mode-switch.exp
@@ -13,11 +13,11 @@  Term::with_term $term {
     Term::clean_restart 12 40
 }
 
 if {![Term::prepare_for_tui]} {
     unsupported "TUI not supported"
-    return 0
+    return
 }
 
 # Generate prompt.
 Term::gen_prompt