From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 27/37] GDB: testsuite: MI: Don't return value from top-level (manual)
Date: Wed, 29 Apr 2026 20:04:18 -0300 [thread overview]
Message-ID: <20260429230432.60487-28-thiago.bauermann@linaro.org> (raw)
In-Reply-To: <20260429230432.60487-1-thiago.bauermann@linaro.org>
This patch manually changes "return -1" statements that weren't caught
by the sed command. It also changes a couple of "return 0" statements.
These return statements fall into one of these criteria:
- misaligned line, which is then fixed by this patch;
- return at top level but inside block such as with_test_prefix,
foreach_with_prefix, gdb_expect.
---
gdb/testsuite/gdb.mi/gdb2549.exp | 4 ++--
gdb/testsuite/gdb.mi/gdb701.exp | 4 ++--
gdb/testsuite/gdb.mi/gdb792.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-async-run.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-async.exp | 6 +++---
gdb/testsuite/gdb.mi/mi-basics.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-break-qualified.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-break.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-cli.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-complete.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-console.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-corefile.exp | 2 +-
gdb/testsuite/gdb.mi/mi-detach.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-disassemble.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-eval.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-exec-run.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-file.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-fill-memory.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-frame-regs.exp | 4 ++--
.../gdb.mi/mi-inheritance-syntax-error.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-pending.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-read-memory.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-reg-undefined.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-regs.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-return.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-reverse.exp | 6 +++---
gdb/testsuite/gdb.mi/mi-simplerun.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-solib.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-stack.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-start.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-stepi.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-syn-frame.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-until.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-var-cmd.exp | 2 +-
gdb/testsuite/gdb.mi/mi-var-cp.exp | 6 +++---
gdb/testsuite/gdb.mi/mi-var-rtti.exp | 2 +-
gdb/testsuite/gdb.mi/mi-vla-c99.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-vla-fortran.exp | 4 ++--
gdb/testsuite/gdb.mi/mi-watch.exp | 4 ++--
gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp | 14 +++++++-------
41 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/gdb2549.exp b/gdb/testsuite/gdb.mi/gdb2549.exp
index c644e3bd1d32..570e1bdeb4a9 100644
--- a/gdb/testsuite/gdb.mi/gdb2549.exp
+++ b/gdb/testsuite/gdb.mi/gdb2549.exp
@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
diff --git a/gdb/testsuite/gdb.mi/gdb701.exp b/gdb/testsuite/gdb.mi/gdb701.exp
index d72bd1ae81bf..dd6fd6181b2c 100644
--- a/gdb/testsuite/gdb.mi/gdb701.exp
+++ b/gdb/testsuite/gdb.mi/gdb701.exp
@@ -21,12 +21,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# When varobj reports the types of objects, it often isn't really reporting
# the type as GDB knows it. For example, in this testcase, we have a
# structure which has been typedefed. A varobj of this type would really have
diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp
index e2df8216956a..d0b7a97f02de 100644
--- a/gdb/testsuite/gdb.mi/gdb792.exp
+++ b/gdb/testsuite/gdb.mi/gdb792.exp
@@ -22,12 +22,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
diff --git a/gdb/testsuite/gdb.mi/mi-async-run.exp b/gdb/testsuite/gdb.mi/mi-async-run.exp
index 5a4077b6d198..a60a85393225 100644
--- a/gdb/testsuite/gdb.mi/mi-async-run.exp
+++ b/gdb/testsuite/gdb.mi/mi-async-run.exp
@@ -16,12 +16,12 @@
load_lib mi-support.exp
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Test the resolution of PR 18077
#
# When doing an -exec-run with a fresh copy of GDB, it would result in
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp
index d1674cdfe49f..7f7603cf7068 100644
--- a/gdb/testsuite/gdb.mi/mi-async.exp
+++ b/gdb/testsuite/gdb.mi/mi-async.exp
@@ -21,23 +21,23 @@
# mi_run_cmd, it ignores whatever target the rest of GDB testsuite is
# using, and always tries to run natively. So, don't do anything unless
# we're actually testing native.
require isnative
if {![istarget *-linux*]} {
- return
+ return
}
# Check if start command is supported.
require !use_gdb_stub
load_lib mi-support.exp
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# The plan is for async mode to become the default but toggle for now.
save_vars { GDBFLAGS } {
set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""]
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 27ac334e4a30..8f18f41af04b 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -35,12 +35,12 @@ standard_testfile basics.c
set escapedobjdir [string_to_regexp ${objdir}]
set testsubdir [standard_output_file ""]
set envirodir [string_to_regexp $testsubdir]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# In this file we want to test if the operations needed by the following
# procedures work, so it makes no sense using them here.
diff --git a/gdb/testsuite/gdb.mi/mi-break-qualified.exp b/gdb/testsuite/gdb.mi/mi-break-qualified.exp
index 1bb8258b9536..d196c37ef78b 100644
--- a/gdb/testsuite/gdb.mi/mi-break-qualified.exp
+++ b/gdb/testsuite/gdb.mi/mi-break-qualified.exp
@@ -22,12 +22,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[build_executable $testfile.exp $testfile $srcfile {c++ debug}] == -1} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
set loc_ns_func_line [gdb_get_line_number "location NS::func here"]
set loc_foo_func_line [gdb_get_line_number "location foo::func here"]
set loc_func_line [gdb_get_line_number "location func here"]
diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp
index a7b64faa8a5a..b0df2cedc4e5 100644
--- a/gdb/testsuite/gdb.mi/mi-break.exp
+++ b/gdb/testsuite/gdb.mi/mi-break.exp
@@ -24,12 +24,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Locate line numbers in basics.c.
set line_callee4_head [gdb_get_line_number "callee4 ("]
set line_callee4_body [expr {$line_callee4_head + 2}]
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
index e3a5d3b87a25..9d696e4b291c 100644
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -23,12 +23,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_gdb_test "-interpreter-exec" \
diff --git a/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp b/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
index 29c44c8475c3..9d43fc6e21c0 100644
--- a/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
@@ -20,12 +20,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_command_param_changed { } {
global scheduler_locking_supported
global binfile
diff --git a/gdb/testsuite/gdb.mi/mi-complete.exp b/gdb/testsuite/gdb.mi/mi-complete.exp
index 4038ae57f8ac..54084cab86d3 100644
--- a/gdb/testsuite/gdb.mi/mi-complete.exp
+++ b/gdb/testsuite/gdb.mi/mi-complete.exp
@@ -20,12 +20,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
# Don't run to main to avoid increasing the search scope to include
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index a7a083a56766..23ae1a280997 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -47,12 +47,12 @@ proc semihosted_string { string } {
}
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi-corefile.exp
index 67c6183f3867..864c8f74ddcf 100644
--- a/gdb/testsuite/gdb.mi/mi-corefile.exp
+++ b/gdb/testsuite/gdb.mi/mi-corefile.exp
@@ -28,11 +28,11 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
}
set corefile [core_find $binfile {}]
if {$corefile == ""} {
untested "unable to create or find corefile"
- return 0
+ return
}
if {[mi_gdb_start]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-detach.exp b/gdb/testsuite/gdb.mi/mi-detach.exp
index 62bd699ea8ac..e82e216315e7 100644
--- a/gdb/testsuite/gdb.mi/mi-detach.exp
+++ b/gdb/testsuite/gdb.mi/mi-detach.exp
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp
index cd4c91bd06a6..2ecbce193c75 100644
--- a/gdb/testsuite/gdb.mi/mi-disassemble.exp
+++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp
@@ -24,12 +24,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_disassembly_only {} {
global mi_gdb_prompt
global hex
diff --git a/gdb/testsuite/gdb.mi/mi-eval.exp b/gdb/testsuite/gdb.mi/mi-eval.exp
index 6720f878538a..f2761f46219b 100644
--- a/gdb/testsuite/gdb.mi/mi-eval.exp
+++ b/gdb/testsuite/gdb.mi/mi-eval.exp
@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-exec-run.exp b/gdb/testsuite/gdb.mi/mi-exec-run.exp
index 9707504aa21c..d7a680daa6c6 100644
--- a/gdb/testsuite/gdb.mi/mi-exec-run.exp
+++ b/gdb/testsuite/gdb.mi/mi-exec-run.exp
@@ -33,12 +33,12 @@ require !use_gdb_stub
set have_startup_shell [have_startup_shell]
standard_testfile mi-start.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "could not build mi-exec-run"
- return -1
+ untested "could not build mi-exec-run"
+ return
}
# The test proper. INFTTY_MODE determines whether "set inferior-tty"
# is in effect. MI_MODE determines whether MI is run on the main UI,
# or as a separate UI. FORCE_FAIL is true when we want -exec-run to
diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp
index 8ca0511f55d8..80411b82ff74 100644
--- a/gdb/testsuite/gdb.mi/mi-file.exp
+++ b/gdb/testsuite/gdb.mi/mi-file.exp
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-fill-memory.exp b/gdb/testsuite/gdb.mi/mi-fill-memory.exp
index 524732bebbd6..f9bd13209822 100644
--- a/gdb/testsuite/gdb.mi/mi-fill-memory.exp
+++ b/gdb/testsuite/gdb.mi/mi-fill-memory.exp
@@ -21,12 +21,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile "mi-read-memory"
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}.c" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
diff --git a/gdb/testsuite/gdb.mi/mi-frame-regs.exp b/gdb/testsuite/gdb.mi/mi-frame-regs.exp
index 65e3bd93d4a4..dbcda5ef7551 100644
--- a/gdb/testsuite/gdb.mi/mi-frame-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-frame-regs.exp
@@ -24,12 +24,12 @@ set MIFLAGS "-i=mi"
standard_testfile basics.c
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } then {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Return the address of the specified breakpoint.
proc breakpoint_address {bpnum} {
diff --git a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
index d9baa7639525..17ed3f1dcefd 100644
--- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
+++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp
index 1ad9aecdc8b4..51be357d4c0a 100644
--- a/gdb/testsuite/gdb.mi/mi-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-pending.exp
@@ -139,12 +139,12 @@ mi_send_resuming_command "exec-continue" "continuing execution to thread conditi
# Check if we stopped in thread 2 like we should.
set testname "run till MI pending breakpoint on pendfunc3 on thread 2"
gdb_expect {
-re "\\*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"4\",frame=\{addr=\"$hex\",func=\"pendfunc3\".*thread-id=\"2\".*" {
pass $testname
- return 0
+ return
}
timeout {
fail "$testname (timeout)"
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.mi/mi-read-memory.exp b/gdb/testsuite/gdb.mi/mi-read-memory.exp
index 782c0ee13dca..035c31e2ae84 100644
--- a/gdb/testsuite/gdb.mi/mi-read-memory.exp
+++ b/gdb/testsuite/gdb.mi/mi-read-memory.exp
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
diff --git a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
index dd7b2961b03f..725925d01a81 100644
--- a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
+++ b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
@@ -23,12 +23,12 @@ require dwarf2_support
require is_x86_64_m64_target
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nopie}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp
index 7aa4fb62c7ac..756855d9ded0 100644
--- a/gdb/testsuite/gdb.mi/mi-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-regs.exp
@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp
index bd90ac79893f..c9265c80317a 100644
--- a/gdb/testsuite/gdb.mi/mi-return.exp
+++ b/gdb/testsuite/gdb.mi/mi-return.exp
@@ -25,12 +25,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp
index 100857c6e299..dacb86048f60 100644
--- a/gdb/testsuite/gdb.mi/mi-reverse.exp
+++ b/gdb/testsuite/gdb.mi/mi-reverse.exp
@@ -33,12 +33,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
@@ -46,11 +46,11 @@ if {[supports_process_record]} {
# Activate process record/replay
if {[mi_gdb_test "-interpreter-exec console record" \
"=record-started,thread-group=\"i1\",method=\"full\"\r\n\\^done" \
"Turn on process record"]} {
warning "Fail to activate process record/replay, tests in this group will not be performed.\n"
- return -1
+ return
}
}
# Locate line numbers in basics.c.
set line_callee4_head [gdb_get_line_number "callee4 ("]
diff --git a/gdb/testsuite/gdb.mi/mi-simplerun.exp b/gdb/testsuite/gdb.mi/mi-simplerun.exp
index 8f18a63e46cc..98bc3da89191 100644
--- a/gdb/testsuite/gdb.mi/mi-simplerun.exp
+++ b/gdb/testsuite/gdb.mi/mi-simplerun.exp
@@ -28,12 +28,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-solib.exp b/gdb/testsuite/gdb.mi/mi-solib.exp
index 0a13df407a09..a3c4d20b0004 100644
--- a/gdb/testsuite/gdb.mi/mi-solib.exp
+++ b/gdb/testsuite/gdb.mi/mi-solib.exp
@@ -28,12 +28,12 @@ set lib_flags [list debug]
set srcfile_main ${srcdir}/${subdir}/$srcfile
set bin_flags [list debug shlib=${binfile_lib}]
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
|| [gdb_compile ${srcfile_main} ${binfile} executable $bin_flags] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 2b7884076da1..fbfc0619d008 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-start.exp b/gdb/testsuite/gdb.mi/mi-start.exp
index 5a232f0e6cd4..ff18866987f0 100644
--- a/gdb/testsuite/gdb.mi/mi-start.exp
+++ b/gdb/testsuite/gdb.mi/mi-start.exp
@@ -22,12 +22,12 @@ set MIFLAGS "-i=mi"
require !use_gdb_stub
standard_testfile mi-start.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "could not build mi-start"
- return -1
+ untested "could not build mi-start"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-stepi.exp b/gdb/testsuite/gdb.mi/mi-stepi.exp
index fe8854a79050..8b9ca60ac434 100644
--- a/gdb/testsuite/gdb.mi/mi-stepi.exp
+++ b/gdb/testsuite/gdb.mi/mi-stepi.exp
@@ -24,12 +24,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_stepi_nexti {} {
global mi_gdb_prompt
global hex fullname_syntax srcfile
diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
index 410849a910a5..f3b1a71ccb3c 100644
--- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp
+++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
@@ -23,12 +23,12 @@ set MIFLAGS "-i=mi"
set any "\[^\"\]+"
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
diff --git a/gdb/testsuite/gdb.mi/mi-until.exp b/gdb/testsuite/gdb.mi/mi-until.exp
index a84a1238ae45..f508ce292e1f 100644
--- a/gdb/testsuite/gdb.mi/mi-until.exp
+++ b/gdb/testsuite/gdb.mi/mi-until.exp
@@ -25,12 +25,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile until.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index bf207dad255e..a08528002cb1 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -590,11 +590,11 @@ set inline_tests {
# Needs to be last, following tests rely on this.
lappend inline_tests floating
foreach_with_prefix inline_test $inline_tests {
if { [mi_run_inline_test $inline_test] < 0 } {
- return -1
+ return
}
}
# Since the inline test framework does not really work with
# function calls, first to inline tests and then do the remainder
diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.exp b/gdb/testsuite/gdb.mi/mi-var-cp.exp
index db9efd67fd3d..fb850ad51db5 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cp.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.exp
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -39,11 +39,11 @@ set inline_tests {
path_expression
}
foreach_with_prefix inline_test $inline_tests {
if { [mi_run_inline_test $inline_test] < 0 } {
- return -1
+ return
}
}
set lineno [gdb_get_line_number "/* anonymous_structs_and_unions */"]
mi_create_breakpoint "$srcfile:$lineno" \
diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-rtti.exp
index 9a98e2adfa9c..4a1bee241f9f 100644
--- a/gdb/testsuite/gdb.mi/mi-var-rtti.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-rtti.exp
@@ -116,10 +116,10 @@ set inline_tests {
skip_type_update_when_not_use_rtti
}
foreach_with_prefix inline_test $inline_tests {
if { [mi_run_inline_test $inline_test] < 0 } {
- return -1
+ return
}
}
mi_gdb_exit
diff --git a/gdb/testsuite/gdb.mi/mi-vla-c99.exp b/gdb/testsuite/gdb.mi/mi-vla-c99.exp
index 91934de2491d..5e3c8f549407 100644
--- a/gdb/testsuite/gdb.mi/mi-vla-c99.exp
+++ b/gdb/testsuite/gdb.mi/mi-vla-c99.exp
@@ -23,12 +23,12 @@ set MIFLAGS "-i=mi"
standard_testfile vla.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" \
"${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
index fd144cb51e7a..0cc51a36f5ef 100644
--- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
@@ -24,12 +24,12 @@ set MIFLAGS "-i=mi"
standard_testfile vla.f90
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{debug f90}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Depending on the compiler being used,
# the type names can be printed differently.
set real [fortran_real4]
diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp
index 4fcba501224c..5b01793aa3da 100644
--- a/gdb/testsuite/gdb.mi/mi-watch.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch.exp
@@ -32,12 +32,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_watchpoint_creation_and_listing {} {
global mi_gdb_prompt
global srcfile
diff --git a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
index fcea890d78af..adcd713453c6 100644
--- a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
+++ b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
@@ -42,11 +42,11 @@ foreach name {different breakhere_different breakhere_validity breakhere_invalid
# Test various kinds of `set print entry-values'.
with_test_prefix "entry-values=no" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values no" {\^done} "no: set print entry-values"
mi_send_resuming_command "exec-continue" "no: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "no: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "no: entry_equal: -stack-list-variables"
@@ -61,11 +61,11 @@ with_test_prefix "entry-values=no" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "no: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=only" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values only" {\^done} "only: set print entry-values"
mi_send_resuming_command "exec-continue" "only: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "only: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "only: entry_equal: -stack-list-variables"
@@ -80,11 +80,11 @@ with_test_prefix "entry-values=only" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "only: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=preferred" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values preferred" {\^done} "preferred: set print entry-values"
mi_send_resuming_command "exec-continue" "preferred: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "preferred: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "preferred: entry_equal: -stack-list-variables"
@@ -99,11 +99,11 @@ with_test_prefix "entry-values=preferred" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "preferred: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=if-needed" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values if-needed" {\^done} "if-needed: set print entry-values"
mi_send_resuming_command "exec-continue" "if-needed: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "if-needed: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "if-needed: entry_equal: -stack-list-variables"
@@ -118,11 +118,11 @@ with_test_prefix "entry-values=if-needed" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "if-needed: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=both" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values both" {\^done} "both: set print entry-values"
mi_send_resuming_command "exec-continue" "both: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "both: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "both: entry_equal: -stack-list-variables"
@@ -137,11 +137,11 @@ with_test_prefix "entry-values=both" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"},{name="inv@entry",arg="1",value="<optimized out>"}\]} "both: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=compact" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values compact" {\^done} "compact: set print entry-values"
mi_send_resuming_command "exec-continue" "compact: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "compact: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "compact: entry_equal: -stack-list-variables"
@@ -156,11 +156,11 @@ with_test_prefix "entry-values=compact" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "compact: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=default" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values default" {\^done} "default: set print entry-values"
mi_send_resuming_command "exec-continue" "default: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "default: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "default: entry_equal: -stack-list-variables"
next prev parent reply other threads:[~2026-04-29 23:14 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 23:03 [PATCH v2 00/37] GDB: testsuite: Fix top-level returns Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 01/37] GDB: testsuite: aarch64, arm: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 02/37] GDB: testsuite: aarch64, arm: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 03/37] GDB: testsuite: x86, amd64, i386, ia64: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 04/37] GDB: testsuite: x86, amd64, i386: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 05/37] GDB: testsuite: powerpc: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 06/37] GDB: testsuite: powerpc: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 07/37] GDB: testsuite: riscv: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 08/37] GDB: testsuite: riscv: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 09/37] GDB: testsuite: s390: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 10/37] GDB: testsuite: sparc: " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 11/37] GDB: testsuite: Don't return value from top-level in tests of various arches Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 12/37] GDB: testsuite: Don't return value from top-level in multi-arch tests Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 13/37] GDB: testsuite: base: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 14/37] GDB: testsuite: base: Don't return 0 " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 15/37] GDB: testsuite: base: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-05-08 22:01 ` Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 16/37] GDB: testsuite: C++: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 17/37] GDB: testsuite: C++: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 18/37] GDB: testsuite: DWARF: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 19/37] GDB: testsuite: DWARF: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 20/37] GDB: testsuite: GDB: Don't return -1 from top-level Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 21/37] GDB: testsuite: Guile: " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 22/37] GDB: testsuite: Python: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 23/37] GDB: testsuite: Python: Don't return 0 " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 24/37] GDB: testsuite: Python: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 25/37] GDB: testsuite: linespec: Don't return value from top-level Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 26/37] GDB: testsuite: MI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` Thiago Jung Bauermann [this message]
2026-04-29 23:04 ` [PATCH v2 28/37] GDB: testsuite: reverse: " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 29/37] GDB: testsuite: reverse: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 30/37] GDB: testsuite: server: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 31/37] GDB: testsuite: server: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 32/37] GDB: testsuite: threads: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 33/37] GDB: testsuite: threads: Don't return 0 " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 34/37] GDB: testsuite: threads: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 35/37] GDB: testsuite: TUI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 36/37] GDB: testsuite: TUI: Don't return 0 from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 37/37] GDB: testsuite: XML: Don't return -1 nor 0 from top-level Thiago Jung Bauermann
2026-05-08 17:47 ` [PATCH v2 00/37] GDB: testsuite: Fix top-level returns Tom Tromey
2026-05-08 22:06 ` Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260429230432.60487-28-thiago.bauermann@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox