From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 15/36] GDB: testsuite: base: Don't return -1 from top-level (manual)
Date: Mon, 27 Apr 2026 03:34:39 -0300 [thread overview]
Message-ID: <20260427063500.3847618-16-thiago.bauermann@linaro.org> (raw)
In-Reply-To: <20260427063500.3847618-1-thiago.bauermann@linaro.org>
This patch manually changes most "return -1" statements that weren't
caught by the sed command.
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 save_vars,
with_test_prefix, foreach, gdb_test_multiple.
- procedure whose callers don't use the return value;
Some weren't changed because they didn't meet the criteria above, or
weren't trivial to check.
There were also a few "return 0" statements which also meet the criteria
above and were opportunistically fixed. There were also a few return
statements with an unnecessary semi-colon at the end, which was removed.
---
gdb/testsuite/gdb.base/access-mem-running.exp | 4 ++--
gdb/testsuite/gdb.base/argv0-symlink.exp | 8 ++++----
gdb/testsuite/gdb.base/async-shell.exp | 2 +-
gdb/testsuite/gdb.base/attach-pie-misread.exp | 2 +-
gdb/testsuite/gdb.base/bigcore.exp | 6 +++---
.../gdb.base/bp-cmds-continue-ctrl-c.exp | 2 +-
.../gdb.base/bp-cmds-execution-x-script.exp | 2 +-
gdb/testsuite/gdb.base/bp-cmds-run-with-ex.exp | 2 +-
gdb/testsuite/gdb.base/bp-cond-failure.exp | 2 +-
gdb/testsuite/gdb.base/bp-permanent.exp | 2 +-
gdb/testsuite/gdb.base/branch-to-self.exp | 4 ++--
gdb/testsuite/gdb.base/break-always.exp | 2 +-
.../gdb.base/bt-on-error-and-warning.exp | 2 +-
gdb/testsuite/gdb.base/bt-on-fatal-signal.exp | 2 +-
gdb/testsuite/gdb.base/catch-follow-exec.exp | 2 +-
gdb/testsuite/gdb.base/catch-fork-kill.exp | 4 ++--
gdb/testsuite/gdb.base/catch-signal.exp | 2 +-
gdb/testsuite/gdb.base/catch-syscall.exp | 2 +-
gdb/testsuite/gdb.base/checkpoint.exp | 2 +-
gdb/testsuite/gdb.base/code_elim.exp | 4 ++--
gdb/testsuite/gdb.base/compare-sections.exp | 6 +++---
gdb/testsuite/gdb.base/cond-eval-mode.exp | 4 ++--
gdb/testsuite/gdb.base/condbreak-bad.exp | 6 +++---
.../continue-after-aborted-step-over.exp | 2 +-
.../gdb.base/continue-all-already-running.exp | 2 +-
gdb/testsuite/gdb.base/coredump-filter.exp | 2 +-
gdb/testsuite/gdb.base/corefile-buildid.exp | 4 ++--
gdb/testsuite/gdb.base/dmsym.exp | 4 ++--
gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp | 2 +-
gdb/testsuite/gdb.base/dprintf-detach.exp | 2 +-
gdb/testsuite/gdb.base/dprintf.exp | 2 +-
gdb/testsuite/gdb.base/dso2dso.exp | 4 ++--
gdb/testsuite/gdb.base/dtrace-probe.exp | 8 ++++----
gdb/testsuite/gdb.base/endianity.exp | 4 ++--
.../gdb.base/execl-update-breakpoints.exp | 2 +-
gdb/testsuite/gdb.base/finish.exp | 4 ++--
gdb/testsuite/gdb.base/fission-macro.exp | 4 ++--
gdb/testsuite/gdb.base/foll-exec-mode.exp | 8 ++++----
gdb/testsuite/gdb.base/fork-running-state.exp | 6 +++---
gdb/testsuite/gdb.base/fullname.exp | 2 +-
gdb/testsuite/gdb.base/fullpath-expand.exp | 2 +-
gdb/testsuite/gdb.base/gcore-relro.exp | 12 ++++++------
gdb/testsuite/gdb.base/gcore.exp | 2 +-
gdb/testsuite/gdb.base/gcorebg.exp | 2 +-
gdb/testsuite/gdb.base/gdbvars.exp | 2 +-
.../gdb.base/global-var-nested-by-dso.exp | 2 +-
gdb/testsuite/gdb.base/gnu-ifunc.exp | 2 +-
gdb/testsuite/gdb.base/gnu_vector.exp | 4 ++--
gdb/testsuite/gdb.base/huge.exp | 2 +-
gdb/testsuite/gdb.base/inferior-args.exp | 16 ++++++++--------
gdb/testsuite/gdb.base/info-fun.exp | 4 ++--
gdb/testsuite/gdb.base/info-proc.exp | 4 ++--
gdb/testsuite/gdb.base/info-program.exp | 4 ++--
gdb/testsuite/gdb.base/interp.exp | 2 +-
gdb/testsuite/gdb.base/jit-elf-fork.exp | 8 ++++----
gdb/testsuite/gdb.base/jit-reader-simple.exp | 2 +-
gdb/testsuite/gdb.base/jump.exp | 2 +-
gdb/testsuite/gdb.base/kill-during-detach.exp | 2 +-
gdb/testsuite/gdb.base/killed-outside.exp | 2 +-
gdb/testsuite/gdb.base/label.exp | 2 +-
gdb/testsuite/gdb.base/list-dot-nodebug.exp | 6 +++---
gdb/testsuite/gdb.base/longjmp.exp | 6 +++---
gdb/testsuite/gdb.base/moribund-step.exp | 2 +-
gdb/testsuite/gdb.base/msym-bp.exp | 2 +-
gdb/testsuite/gdb.base/new-ui.exp | 2 +-
gdb/testsuite/gdb.base/noreturn-finish.exp | 2 +-
gdb/testsuite/gdb.base/noreturn-return.exp | 2 +-
gdb/testsuite/gdb.base/nostdlib.exp | 2 +-
gdb/testsuite/gdb.base/overlays.exp | 6 +++---
gdb/testsuite/gdb.base/print-file-var.exp | 8 ++++----
gdb/testsuite/gdb.base/print-symbol-loading.exp | 2 +-
gdb/testsuite/gdb.base/printcmds.exp | 6 +++---
gdb/testsuite/gdb.base/random-signal.exp | 2 +-
gdb/testsuite/gdb.base/randomize.exp | 4 ++--
gdb/testsuite/gdb.base/readline.exp | 2 +-
gdb/testsuite/gdb.base/readnever.exp | 2 +-
gdb/testsuite/gdb.base/relocate.exp | 4 ++--
gdb/testsuite/gdb.base/reread.exp | 4 ++--
gdb/testsuite/gdb.base/return2.exp | 6 +++---
gdb/testsuite/gdb.base/set-cwd.exp | 12 ++++++------
gdb/testsuite/gdb.base/setshow.exp | 4 ++--
.../gdb.base/share-env-with-gdbserver.exp | 2 +-
gdb/testsuite/gdb.base/solib-display.exp | 4 ++--
gdb/testsuite/gdb.base/solib-overlap.exp | 6 +++---
gdb/testsuite/gdb.base/solib-search.exp | 2 +-
gdb/testsuite/gdb.base/solib-weak.exp | 6 +++---
gdb/testsuite/gdb.base/source-dir.exp | 4 ++--
gdb/testsuite/gdb.base/stack-protector.exp | 6 +++---
gdb/testsuite/gdb.base/stale-infcall.exp | 2 +-
gdb/testsuite/gdb.base/step-break.exp | 4 ++--
gdb/testsuite/gdb.base/step-over-no-symbols.exp | 2 +-
gdb/testsuite/gdb.base/step-over-syscall.exp | 8 ++++----
.../gdb.base/step-sw-breakpoint-adjust-pc.exp | 2 +-
gdb/testsuite/gdb.base/style-logging.exp | 2 +-
gdb/testsuite/gdb.base/testenv.exp | 2 +-
gdb/testsuite/gdb.base/traced-thread.exp | 2 +-
gdb/testsuite/gdb.base/valgrind-bt.exp | 4 ++--
gdb/testsuite/gdb.base/valgrind-infcall.exp | 4 ++--
gdb/testsuite/gdb.base/vdso-warning.exp | 2 +-
gdb/testsuite/gdb.base/vla-optimized-out.exp | 2 +-
gdb/testsuite/gdb.base/watch-bitfields.exp | 4 ++--
gdb/testsuite/gdb.base/watchpoint.exp | 4 ++--
gdb/testsuite/gdb.base/wchar.exp | 2 +-
gdb/testsuite/gdb.base/wrong_frame_bt_full.exp | 4 ++--
104 files changed, 190 insertions(+), 190 deletions(-)
diff --git a/gdb/testsuite/gdb.base/access-mem-running.exp b/gdb/testsuite/gdb.base/access-mem-running.exp
index 11dea64a6338..97f2641c9cb3 100644
--- a/gdb/testsuite/gdb.base/access-mem-running.exp
+++ b/gdb/testsuite/gdb.base/access-mem-running.exp
@@ -36,7 +36,7 @@ proc test { non_stop } {
}
if {![runto_main]} {
- return -1
+ return
}
# If debugging with target remote, check whether the all-stop variant
@@ -48,7 +48,7 @@ proc test { non_stop } {
if {![is_target_non_stop]} {
unsupported "can't issue commands while target is running"
- return 0
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
index 6b05bba205d6..58d5ef98fc44 100644
--- a/gdb/testsuite/gdb.base/argv0-symlink.exp
+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
@@ -42,13 +42,13 @@ with_test_prefix "file symlink" {
"ln -sf ${testfile} [standard_output_file $filelink]"]
if {[lindex $status 0] != 0} {
unsupported "$test (host does not support symbolic links)"
- return 0
+ return
}
clean_restart "$filelink"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set print repeats 10000"
@@ -82,13 +82,13 @@ with_test_prefix "dir symlink" {
set status [remote_exec host "ln -sf . [standard_output_file $dirlink]"]
if {[lindex $status 0] != 0} {
unsupported "$test (host does not support symbolic links)"
- return 0
+ return
}
clean_restart "$dirlink/$filelink"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set print repeats 10000"
diff --git a/gdb/testsuite/gdb.base/async-shell.exp b/gdb/testsuite/gdb.base/async-shell.exp
index 72f3645a757e..28003fa92d3d 100644
--- a/gdb/testsuite/gdb.base/async-shell.exp
+++ b/gdb/testsuite/gdb.base/async-shell.exp
@@ -23,7 +23,7 @@ require !use_gdb_stub
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
index a8002119d962..d2decd801fc3 100644
--- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
@@ -99,7 +99,7 @@ with_test_prefix "rebuild with DGEN defined" {
set prelink_args [build_executable_own_libs ${testfile}.exp $executable $srcfile \
[list pie "additional_flags=-DGEN=\"$genfile\""]]
if {$prelink_args == ""} {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index 7dd881082354..aca067c531a1 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -39,8 +39,8 @@ standard_testfile .c
set corefile [standard_output_file ${binfile}.corefile]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Traverse part of bigcore's linked list of memory chunks (forward or
@@ -209,7 +209,7 @@ proc test {dumper} {
}
if {! $core_ok} {
untested "check core size (system does not support large corefiles)"
- return 0
+ return
}
# Now load up that core file.
diff --git a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
index 368507b2409c..9fac9b551b32 100644
--- a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
+++ b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
@@ -121,7 +121,7 @@ with_test_prefix "run" {
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
do_test
diff --git a/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp b/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp
index 7204a3736c09..8b86c53363f6 100644
--- a/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp
+++ b/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp
@@ -45,7 +45,7 @@ proc test {} {
}
if { $res != 0} {
fail $test
- return -1
+ return
}
gdb_test_multiple "" $test {
diff --git a/gdb/testsuite/gdb.base/bp-cmds-run-with-ex.exp b/gdb/testsuite/gdb.base/bp-cmds-run-with-ex.exp
index 95c2811a3e03..1bdb75f44fd0 100644
--- a/gdb/testsuite/gdb.base/bp-cmds-run-with-ex.exp
+++ b/gdb/testsuite/gdb.base/bp-cmds-run-with-ex.exp
@@ -35,7 +35,7 @@ save_vars { GDBFLAGS } {
gdb_exit
if {[gdb_spawn] != 0} {
fail "spawn gdb"
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.exp b/gdb/testsuite/gdb.base/bp-cond-failure.exp
index f6ca85027e4c..ae9eb1f8f73c 100644
--- a/gdb/testsuite/gdb.base/bp-cond-failure.exp
+++ b/gdb/testsuite/gdb.base/bp-cond-failure.exp
@@ -48,7 +48,7 @@ proc run_test { cond_eval access_type bpexpr nloc } {
clean_restart $::testfile
if { ![runto_main] } {
- return -1
+ return
}
if { $cond_eval ne "auto" } {
diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp
index dac54fadef1c..35a3227d0380 100644
--- a/gdb/testsuite/gdb.base/bp-permanent.exp
+++ b/gdb/testsuite/gdb.base/bp-permanent.exp
@@ -45,7 +45,7 @@ proc test {always_inserted sw_watchpoint} {
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_test "set breakpoint always-inserted $always_inserted"
diff --git a/gdb/testsuite/gdb.base/branch-to-self.exp b/gdb/testsuite/gdb.base/branch-to-self.exp
index ffd15780d724..2cb388219e01 100644
--- a/gdb/testsuite/gdb.base/branch-to-self.exp
+++ b/gdb/testsuite/gdb.base/branch-to-self.exp
@@ -28,7 +28,7 @@ with_test_prefix "single-step" {
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
set line_num [gdb_get_line_number "loop-line" ${testfile}.c]
@@ -61,7 +61,7 @@ with_test_prefix "break-cond" {
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
set test "set breakpoint condition-evaluation $side"
diff --git a/gdb/testsuite/gdb.base/break-always.exp b/gdb/testsuite/gdb.base/break-always.exp
index f2eb1a3ba8b9..8fe3fb3f863d 100644
--- a/gdb/testsuite/gdb.base/break-always.exp
+++ b/gdb/testsuite/gdb.base/break-always.exp
@@ -78,7 +78,7 @@ foreach test_value {0 1} {
# Some targets do not allow manually writing a breakpoint to a
# certain memory address, like QEMU. In that case, just bail out.
unsupported "cannot write to address $bp_address"
- return -1
+ return
}
-re " = .*$gdb_prompt $" {
pass $write_test
diff --git a/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp b/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
index a9a1db344d21..0873ce5728c4 100644
--- a/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
+++ b/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
@@ -37,7 +37,7 @@ gdb_test_multiple "maint set internal-error backtrace on" \
"check backtrace is supported" {
-re "support for this feature is not compiled into GDB" {
untested "feature not supported"
- return -1
+ return
}
-re "$gdb_prompt $" {
pass $gdb_test_name
diff --git a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
index 9bf5f09c566f..67511741d395 100644
--- a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
+++ b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
@@ -42,7 +42,7 @@ if {![runto_main]} {
gdb_test_multiple "maint set backtrace-on-fatal-signal on" "" {
-re "support for this feature is not compiled into GDB" {
untested $testfile
- return -1
+ return
}
-re "$gdb_prompt $" {
pass $gdb_test_name
diff --git a/gdb/testsuite/gdb.base/catch-follow-exec.exp b/gdb/testsuite/gdb.base/catch-follow-exec.exp
index a46611080833..39d8348a1764 100644
--- a/gdb/testsuite/gdb.base/catch-follow-exec.exp
+++ b/gdb/testsuite/gdb.base/catch-follow-exec.exp
@@ -28,7 +28,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
proc catch_follow_exec { } {
if { ![runto_main] } {
- return -1
+ return
}
set bpnum ""
diff --git a/gdb/testsuite/gdb.base/catch-fork-kill.exp b/gdb/testsuite/gdb.base/catch-fork-kill.exp
index 498e34a49bec..17450ffea2cb 100644
--- a/gdb/testsuite/gdb.base/catch-fork-kill.exp
+++ b/gdb/testsuite/gdb.base/catch-fork-kill.exp
@@ -44,7 +44,7 @@ foreach kind {"fork" "vfork"} {
if {[build_executable $testfile.exp $testfile ${srcfile} \
${compile_options}] == -1} {
untested "failed to compile"
- return -1
+ return
}
}
@@ -60,7 +60,7 @@ proc do_test {fork_kind exit_kind} {
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set follow-fork child"
diff --git a/gdb/testsuite/gdb.base/catch-signal.exp b/gdb/testsuite/gdb.base/catch-signal.exp
index 6da1b6aeda79..95ebb58571ac 100644
--- a/gdb/testsuite/gdb.base/catch-signal.exp
+++ b/gdb/testsuite/gdb.base/catch-signal.exp
@@ -26,7 +26,7 @@ proc test_catch_signal {signame} {
with_test_prefix $signame {
if {![runto_main]} {
- return -1
+ return
}
# Test "catch signal" without arguments.
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
index 673fca4a9984..63abc1aec809 100644
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
@@ -24,7 +24,7 @@ require supports_catch_syscall
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.c] } {
- return -1
+ return
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp
index b6ea9f63f170..828a633d4a46 100644
--- a/gdb/testsuite/gdb.base/checkpoint.exp
+++ b/gdb/testsuite/gdb.base/checkpoint.exp
@@ -38,7 +38,7 @@ if {[is_remote host]} {
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
[list debug "additional_flags=-DPI_TXT=\"$pi_txt\" -DCOPY1_TXT=\"$copy1_txt\""]]} {
- return -1
+ return
}
global gdb_prompt
diff --git a/gdb/testsuite/gdb.base/code_elim.exp b/gdb/testsuite/gdb.base/code_elim.exp
index 15e59b9095bb..7c79ff54f196 100644
--- a/gdb/testsuite/gdb.base/code_elim.exp
+++ b/gdb/testsuite/gdb.base/code_elim.exp
@@ -38,12 +38,12 @@ remote_exec build "rm -f ${binfile2}"
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable $opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
proc not_null_var_address { var } {
diff --git a/gdb/testsuite/gdb.base/compare-sections.exp b/gdb/testsuite/gdb.base/compare-sections.exp
index bf6207061778..ba2687dbcb84 100644
--- a/gdb/testsuite/gdb.base/compare-sections.exp
+++ b/gdb/testsuite/gdb.base/compare-sections.exp
@@ -117,7 +117,7 @@ with_test_prefix "read-only" {
if {!$has_ro_sections} {
unsupported "no read-only sections"
- return -1;
+ return
}
set orig -1
@@ -132,7 +132,7 @@ with_test_prefix "read-only" {
if {$orig == -1} {
untested "couldn't read address of read-only section"
- return -1
+ return
}
# Come up with different value.
@@ -153,7 +153,7 @@ with_test_prefix "read-only" {
if { $written != $patch } {
unsupported "can't patch read-only section"
- return -1
+ return
}
gdb_test "compare-sections -r" \
diff --git a/gdb/testsuite/gdb.base/cond-eval-mode.exp b/gdb/testsuite/gdb.base/cond-eval-mode.exp
index e2afc3a95939..c2aefc4a93b6 100644
--- a/gdb/testsuite/gdb.base/cond-eval-mode.exp
+++ b/gdb/testsuite/gdb.base/cond-eval-mode.exp
@@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
}
if {![runto_main]} {
- return 0
+ return
}
set test_host "set breakpoint condition-evaluation host"
@@ -47,7 +47,7 @@ set warning "warning: Target does not support breakpoint condition evaluation.\r
gdb_test_multiple $test_target $test_target {
-re "$warning\r\n$gdb_prompt $" {
unsupported $test_target
- return -1
+ return
}
-re "^$test_target\r\n$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/condbreak-bad.exp b/gdb/testsuite/gdb.base/condbreak-bad.exp
index 216b485b6356..7ee32bdb40bb 100644
--- a/gdb/testsuite/gdb.base/condbreak-bad.exp
+++ b/gdb/testsuite/gdb.base/condbreak-bad.exp
@@ -67,7 +67,7 @@ with_test_prefix "with run" {
# deletes the breakpoints.
with_test_prefix "with continue 1" {
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$bp_location"
@@ -87,7 +87,7 @@ with_test_prefix "with continue 1" {
# Repeat with a condition that evaluates to false.
with_test_prefix "with continue 2" {
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$bp_location"
@@ -107,7 +107,7 @@ with_test_prefix "with continue 2" {
# Repeat with a condition that contains junk at the end.
with_test_prefix "with junk" {
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$bp_location"
diff --git a/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp b/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp
index 1285c4f14158..945d426f6b16 100644
--- a/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp
+++ b/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp
@@ -51,7 +51,7 @@ proc do_test {displaced breakpoint_always_inserted} {
gdb_test_no_output "set breakpoint always-inserted $breakpoint_always_inserted"
if {![runto_main]} {
- return -1
+ return
}
# We rely on not being able to set a breakpoint at 0, as proxy for
diff --git a/gdb/testsuite/gdb.base/continue-all-already-running.exp b/gdb/testsuite/gdb.base/continue-all-already-running.exp
index 734b5e9681bb..65d9073e74e1 100644
--- a/gdb/testsuite/gdb.base/continue-all-already-running.exp
+++ b/gdb/testsuite/gdb.base/continue-all-already-running.exp
@@ -21,7 +21,7 @@ standard_testfile
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/gdb.base/coredump-filter.exp
index 6bf26f1643ab..26bf2ebed50e 100644
--- a/gdb/testsuite/gdb.base/coredump-filter.exp
+++ b/gdb/testsuite/gdb.base/coredump-filter.exp
@@ -194,7 +194,7 @@ gdb_test_multiple "info inferiors" "getting inferior pid" {
# If the target does not provide PID information (like usermode QEMU),
# just bail out as the rest of the test may rely on it, giving spurious
# failures.
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/corefile-buildid.exp b/gdb/testsuite/gdb.base/corefile-buildid.exp
index 45c613b528ff..2f5ea644081f 100644
--- a/gdb/testsuite/gdb.base/corefile-buildid.exp
+++ b/gdb/testsuite/gdb.base/corefile-buildid.exp
@@ -217,13 +217,13 @@ foreach_with_prefix mode { exec shared } {
set progname ${binfile}-$mode
set build_proc build_corefile_buildid_${mode}
if { ![$build_proc $progname] } {
- return -1
+ return
}
# Generate a corefile.
set corefile [create_core_file $progname]
if { $corefile eq "" } {
- return -1
+ return
}
# Get the build-id filename without ".debug" on the end. This
diff --git a/gdb/testsuite/gdb.base/dmsym.exp b/gdb/testsuite/gdb.base/dmsym.exp
index 3820b13bfdc7..6b02b97014de 100644
--- a/gdb/testsuite/gdb.base/dmsym.exp
+++ b/gdb/testsuite/gdb.base/dmsym.exp
@@ -26,8 +26,8 @@ set dmsym_o [standard_output_file dmsym.o]
if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \
$dmsym_o \
object {}] != ""} {
- untested "failed to compile object file"
- return -1
+ untested "failed to compile object file"
+ return
}
if {[gdb_compile \
diff --git a/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp b/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
index b2cc3ddb144c..383176a5a76e 100644
--- a/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
+++ b/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
@@ -31,7 +31,7 @@ proc test { style } {
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
delete_breakpoints
diff --git a/gdb/testsuite/gdb.base/dprintf-detach.exp b/gdb/testsuite/gdb.base/dprintf-detach.exp
index dd9bfde8f47c..4f353874a78e 100644
--- a/gdb/testsuite/gdb.base/dprintf-detach.exp
+++ b/gdb/testsuite/gdb.base/dprintf-detach.exp
@@ -44,7 +44,7 @@ proc dprintf_detach_test { breakpoint_always_inserted dprintf_style disconnected
gdb_test_no_output "set disconnected-dprintf ${disconnected_dprintf}"
if {![runto_main]} {
- return -1
+ return
}
# Get PID of test program.
diff --git a/gdb/testsuite/gdb.base/dprintf.exp b/gdb/testsuite/gdb.base/dprintf.exp
index 9896f2c19246..716ec10e7a54 100644
--- a/gdb/testsuite/gdb.base/dprintf.exp
+++ b/gdb/testsuite/gdb.base/dprintf.exp
@@ -76,7 +76,7 @@ proc restart {} {
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_test "dprintf foo,\"At foo entry\\n\"" \
diff --git a/gdb/testsuite/gdb.base/dso2dso.exp b/gdb/testsuite/gdb.base/dso2dso.exp
index 1e7e633d1827..6f8962b0309a 100644
--- a/gdb/testsuite/gdb.base/dso2dso.exp
+++ b/gdb/testsuite/gdb.base/dso2dso.exp
@@ -49,14 +49,14 @@ if { [build_executable "build shlib 2" $binfile_libdso2 \
if { [prepare_for_testing "prepare" $testfile $srcfile \
[list debug shlib=$binfile_libdso2 shlib=$binfile_libdso1]] != 0 } {
- return
+ return
}
gdb_load_shlib $binfile_libdso2
gdb_load_shlib $binfile_libdso1
if { ![runto_main] } {
- return -1
+ return
}
set bp_location [gdb_get_line_number "STOP HERE" [file tail $srcfile_libdso1]]
diff --git a/gdb/testsuite/gdb.base/dtrace-probe.exp b/gdb/testsuite/gdb.base/dtrace-probe.exp
index dd560d1fcd06..150d088fa4f3 100644
--- a/gdb/testsuite/gdb.base/dtrace-probe.exp
+++ b/gdb/testsuite/gdb.base/dtrace-probe.exp
@@ -24,13 +24,13 @@ proc dtrace_test {} {
if {[dtrace_build_usdt_test_program] == -1} {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_test "print \$_probe_argc" "No probe at PC $hex" \
@@ -71,7 +71,7 @@ proc dtrace_test {} {
# that it gets reached.
if {![runto_main]} {
- return -1
+ return
}
gdb_test "enable probe test progress-counter" \
@@ -96,7 +96,7 @@ proc dtrace_test {} {
"Breakpoint ${::decimal} at $hex.*2 locations.*" \
"set multi-location probe breakpoint (probe two-locations)"
- return 0
+ return
}
dtrace_test
diff --git a/gdb/testsuite/gdb.base/endianity.exp b/gdb/testsuite/gdb.base/endianity.exp
index 0da319a824cd..e82f31f29854 100644
--- a/gdb/testsuite/gdb.base/endianity.exp
+++ b/gdb/testsuite/gdb.base/endianity.exp
@@ -21,12 +21,12 @@ set test_sso [expr \
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
[list debug additional_flags=-DTEST_SSO=$test_sso]] } {
- return -1
+ return
}
set bp_location [gdb_get_line_number "START"]
if {![runto "endianity.c:$bp_location"]} {
- return -1
+ return
}
gdb_test "print o" "= {v = 3, w = 2, x = 7, f = 23.5, cplx = 1.25 \\+ 7.25i, d = 75}" \
diff --git a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
index 98d38c9ccefa..7a68d197a104 100644
--- a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
+++ b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
@@ -90,7 +90,7 @@ proc test { always_inserted } {
gdb_test_no_output "set breakpoint always-inserted $always_inserted"
if {![runto_main]} {
- return -1
+ return
}
# Set a second breakpoint (whose original address also ends up
diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp
index 973f4cf3f742..27dd69be2684 100644
--- a/gdb/testsuite/gdb.base/finish.exp
+++ b/gdb/testsuite/gdb.base/finish.exp
@@ -77,7 +77,7 @@ proc finish_void { } {
proc finish_abbreviation { abbrev } {
if {![runto "int_func"]} {
- return -1
+ return
}
gdb_test "$abbrev" \
@@ -103,7 +103,7 @@ proc finish_tests { } {
global gdb_prompt allow_float_test
if {![runto_main]} {
- return -1
+ return
}
finish_void
diff --git a/gdb/testsuite/gdb.base/fission-macro.exp b/gdb/testsuite/gdb.base/fission-macro.exp
index 4482acbf9fa3..9b5d08b80460 100644
--- a/gdb/testsuite/gdb.base/fission-macro.exp
+++ b/gdb/testsuite/gdb.base/fission-macro.exp
@@ -42,7 +42,7 @@ proc do_tests { lang dwarf_version dwarf_bits strict_dwarf } {
set srcfiles [list $::srcfile $::srcfile2]
if { [build_executable "failed to prepare" $::testfile-$id $srcfiles $opts] } {
- return -1
+ return
}
clean_restart
@@ -50,7 +50,7 @@ proc do_tests { lang dwarf_version dwarf_bits strict_dwarf } {
gdb_load_no_complaints $::binfile-$id
if {![runto_main]} {
- return 0
+ return
}
gdb_test "p FIRST" " = 1"
diff --git a/gdb/testsuite/gdb.base/foll-exec-mode.exp b/gdb/testsuite/gdb.base/foll-exec-mode.exp
index c3f5390ca5c2..6fa076ada2a7 100644
--- a/gdb/testsuite/gdb.base/foll-exec-mode.exp
+++ b/gdb/testsuite/gdb.base/foll-exec-mode.exp
@@ -47,13 +47,13 @@ set compile_options debug
# build the first test case
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $compile_options] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Test exec catchpoints to ensure exec events are supported.
diff --git a/gdb/testsuite/gdb.base/fork-running-state.exp b/gdb/testsuite/gdb.base/fork-running-state.exp
index 11947773b5b3..11a324b19bea 100644
--- a/gdb/testsuite/gdb.base/fork-running-state.exp
+++ b/gdb/testsuite/gdb.base/fork-running-state.exp
@@ -33,12 +33,12 @@ proc do_test { detach_on_fork follow_fork non_stop schedule_multiple } {
if {[prepare_for_testing "failed to prepare" \
$testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
}
if {![runto_main]} {
- return 0
+ return
}
# If debugging with target remote, check whether the all-stop
@@ -50,7 +50,7 @@ proc do_test { detach_on_fork follow_fork non_stop schedule_multiple } {
if {![is_target_non_stop]} {
unsupported "can't issue info threads while target is running"
- return 0
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/fullname.exp b/gdb/testsuite/gdb.base/fullname.exp
index 7f46cb56d858..30969248d56c 100644
--- a/gdb/testsuite/gdb.base/fullname.exp
+++ b/gdb/testsuite/gdb.base/fullname.exp
@@ -95,7 +95,7 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
with_cwd [standard_output_file {}] {
if { [gdb_compile [standard_output_file tmp-${srcfile}] "${testfile}" \
executable {debug}] != "" } {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/fullpath-expand.exp b/gdb/testsuite/gdb.base/fullpath-expand.exp
index 053eb9b59f0a..e7f96c1e7a5b 100644
--- a/gdb/testsuite/gdb.base/fullpath-expand.exp
+++ b/gdb/testsuite/gdb.base/fullpath-expand.exp
@@ -29,7 +29,7 @@ with_cwd $srcdir {
if { $err != "" } {
untested "${srcfile} or ${srcfile2} compilation failed"
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/gcore-relro.exp b/gdb/testsuite/gdb.base/gcore-relro.exp
index 59bd37f93acc..70b6daff2936 100644
--- a/gdb/testsuite/gdb.base/gcore-relro.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro.exp
@@ -24,13 +24,13 @@ set objfile [standard_output_file ${testfile}.o]
if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
|| [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
set opts [list debug shlib=${binfile_lib} ldflags=-Wl,-z,relro]
if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
- unsupported "-Wl,-z,relro compilation failed"
- return -1
+ unsupported "-Wl,-z,relro compilation failed"
+ return
}
with_test_prefix "first session" {
@@ -38,11 +38,11 @@ with_test_prefix "first session" {
gdb_load_shlib ${binfile_lib}
if {![runto lib]} {
- return -1
+ return
}
if {![gdb_gcore_cmd $gcorefile "save a corefile"]} {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index aa887b0da14d..243e0b39082b 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -54,7 +54,7 @@ set pre_corefile_extern_array \
set corefile [standard_output_file gcore.test]
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
# Now restart gdb and load the corefile.
diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp
index 8724794b607a..67436dedb43a 100644
--- a/gdb/testsuite/gdb.base/gcorebg.exp
+++ b/gdb/testsuite/gdb.base/gcorebg.exp
@@ -26,7 +26,7 @@ require can_spawn_for_attach
set corefile [standard_output_file ${testfile}.core]
if {[build_executable "failed to build" $testfile ${srcfile}] == -1 } {
- return -1
+ return
}
# Cleanup.
diff --git a/gdb/testsuite/gdb.base/gdbvars.exp b/gdb/testsuite/gdb.base/gdbvars.exp
index 9522d5f2f39b..61185f94408a 100644
--- a/gdb/testsuite/gdb.base/gdbvars.exp
+++ b/gdb/testsuite/gdb.base/gdbvars.exp
@@ -122,7 +122,7 @@ proc test_convenience_functions {} {
# For the next test, we need the inferior to be running.
if { ![runto_main] } {
- return -1
+ return
}
gdb_test "print \$_isvoid (foo_void ())" " = 1" \
diff --git a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
index 5fca2345f6af..164f60b25793 100644
--- a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
+++ b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
@@ -45,7 +45,7 @@ gdb_load_shlib $binfile_lib1
gdb_load_shlib $binfile_lib2
if { ![runto_main] } {
- return -1
+ return
}
gdb_test "next" "$decimal.*b_main \\(\\);" "step over c_main"
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 2c1dffeeece1..d6a50a9b6862 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -393,7 +393,7 @@ with_test_prefix "static" {
|| [gdb_compile "${srcdir}/${subdir}/$srcfile $lib_o $final_o" \
$staticbinfile executable {debug}] != "" } {
untested "failed to compile second testcase"
- return -1
+ return
}
clean_restart $staticexecutable
diff --git a/gdb/testsuite/gdb.base/gnu_vector.exp b/gdb/testsuite/gdb.base/gnu_vector.exp
index b92d82c3428c..36724d1e9786 100644
--- a/gdb/testsuite/gdb.base/gnu_vector.exp
+++ b/gdb/testsuite/gdb.base/gnu_vector.exp
@@ -36,8 +36,8 @@ if { [do_compile {-mcpu=native}] != ""
&& [do_compile {-mcpu=native -Wno-psabi}] != ""
&& [do_compile {-march=native}] != ""
&& [do_compile] != ""} {
- untested "compiler can't handle vector_size attribute?"
- return -1
+ untested "compiler can't handle vector_size attribute?"
+ return
}
clean_restart $testfile
diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp
index 4ddfceebd9e5..98c081b557ab 100644
--- a/gdb/testsuite/gdb.base/huge.exp
+++ b/gdb/testsuite/gdb.base/huge.exp
@@ -46,7 +46,7 @@ clean_restart $testfile
with_timeout_factor 3 {
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set max-value-size unlimited"
diff --git a/gdb/testsuite/gdb.base/inferior-args.exp b/gdb/testsuite/gdb.base/inferior-args.exp
index eacb93b292e7..58488faff012 100644
--- a/gdb/testsuite/gdb.base/inferior-args.exp
+++ b/gdb/testsuite/gdb.base/inferior-args.exp
@@ -55,7 +55,7 @@ proc do_test { method startup_with_shell inferior_args expected_results \
if { [gdb_start_cmd $inferior_args] < 0 } {
fail "could not issue start command"
- return -1
+ return
}
# Consume up to the GDB prompt after the stop.
@@ -69,7 +69,7 @@ proc do_test { method startup_with_shell inferior_args expected_results \
if { [gdb_starti_cmd $inferior_args] < 0 } {
fail "could not issue start command"
- return -1
+ return
}
# Consume up to the GDB prompt after the stop.
@@ -78,18 +78,18 @@ proc do_test { method startup_with_shell inferior_args expected_results \
# Put a breakpoint and continue until main.
if { ![gdb_breakpoint "main" message] } {
fail "could not set breakpoint on main"
- return -1
+ return
}
if { [gdb_continue "main"] != 0 } {
fail "could not continue to main"
- return -1
+ return
}
} elseif { $method == "run" } {
if { ![gdb_breakpoint "main" message] } {
fail "could not set breakpoint on main"
- return -1
+ return
}
if { [use_gdb_stub] && !$stub_suitable } {
@@ -104,7 +104,7 @@ proc do_test { method startup_with_shell inferior_args expected_results \
# line.
if { [gdb_run_cmd $inferior_args] < 0 } {
fail "could not run"
- return -1
+ return
}
# Consume up to the GDB prompt after the stop.
@@ -113,13 +113,13 @@ proc do_test { method startup_with_shell inferior_args expected_results \
} elseif { $method == "set args" } {
# Using "set args" does not make sense with a stub.
if { [use_gdb_stub] } {
- return;
+ return
}
gdb_test_no_output "set args $inferior_args"
if { ![runto_main] } {
- return -1
+ return
}
} else {
diff --git a/gdb/testsuite/gdb.base/info-fun.exp b/gdb/testsuite/gdb.base/info-fun.exp
index c2f9ae03152a..1465220d3db4 100644
--- a/gdb/testsuite/gdb.base/info-fun.exp
+++ b/gdb/testsuite/gdb.base/info-fun.exp
@@ -38,7 +38,7 @@ foreach_with_prefix n_flag { 0 1 } {
|| [gdb_compile $srcdir/$subdir/${srcfile} ${binfile} \
executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {$libsepdebug == "SEP"} {
@@ -53,7 +53,7 @@ foreach_with_prefix n_flag { 0 1 } {
clean_restart $executable
if {![runto_main]} {
- return 0
+ return
}
set match_str {All functions matching regular expression "foo":[\r\n]*}
diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp
index f1b435e249f3..89eed2ac815a 100644
--- a/gdb/testsuite/gdb.base/info-proc.exp
+++ b/gdb/testsuite/gdb.base/info-proc.exp
@@ -27,7 +27,7 @@ save_vars { env(GDB_INFO_PROC_ENVIRON_1) } {
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
}
@@ -40,7 +40,7 @@ gdb_test_multiple "info proc" "info proc without a process" {
-re "Not supported on this target.*$gdb_prompt $" {
# info proc command not supported -- nothing to test here.
unsupported "gdb does not support info proc on this target"
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/info-program.exp b/gdb/testsuite/gdb.base/info-program.exp
index 3b6e7a2afb84..83cca1a24961 100644
--- a/gdb/testsuite/gdb.base/info-program.exp
+++ b/gdb/testsuite/gdb.base/info-program.exp
@@ -43,7 +43,7 @@ proc do_test { threads non-stop } {
"info program before run"
if { ![runto done] } {
- return -1
+ return
}
if {${non-stop} == "on"} {
@@ -102,7 +102,7 @@ proc do_test { threads non-stop } {
"info program, after kill"
if { ![runto done] } {
- return -1
+ return
}
delete_breakpoints
diff --git a/gdb/testsuite/gdb.base/interp.exp b/gdb/testsuite/gdb.base/interp.exp
index d19d0e3ceca6..516c1507657e 100644
--- a/gdb/testsuite/gdb.base/interp.exp
+++ b/gdb/testsuite/gdb.base/interp.exp
@@ -82,7 +82,7 @@ gdb_test "$commands\nend" "" "finish defining hello command"
gdb_test "hello" [string_to_regexp "^done,value=\"23\""]
if {![runto_main]} {
- return -1
+ return
}
gdb_test "list" ".*\[0-9\].*main \\(int argc.*" "can list sources"
diff --git a/gdb/testsuite/gdb.base/jit-elf-fork.exp b/gdb/testsuite/gdb.base/jit-elf-fork.exp
index f9f516c571c4..cc18cf2fa4a5 100644
--- a/gdb/testsuite/gdb.base/jit-elf-fork.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-fork.exp
@@ -102,7 +102,7 @@ proc do_setup { detach-on-fork follow-fork-mode } {
proc_with_prefix test_detach_on_fork_off_follow_fork_mode_parent { } {
if { [do_setup off parent] == -1 } {
- return -1
+ return
}
# We are stopped in the parent.
@@ -135,7 +135,7 @@ proc_with_prefix test_detach_on_fork_off_follow_fork_mode_parent { } {
proc_with_prefix test_detach_on_fork_off_follow_fork_mode_child { } {
if { [do_setup off child] == -1 } {
- return -1
+ return
}
# We are stopped in the child. This is the exact same thing as
@@ -170,7 +170,7 @@ proc_with_prefix test_detach_on_fork_off_follow_fork_mode_child { } {
proc_with_prefix test_detach_on_fork_on_follow_fork_mode_parent { } {
if { [do_setup on parent] == -1 } {
- return -1
+ return
}
# We are stopped in the parent, child is detached.
@@ -184,7 +184,7 @@ proc_with_prefix test_detach_on_fork_on_follow_fork_mode_parent { } {
proc_with_prefix test_detach_on_fork_on_follow_fork_mode_child { } {
if { [do_setup on child] == -1 } {
- return -1
+ return
}
# We are stopped in the child, parent is detached.
diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp
index 445e2b053fd2..a50a92b6c504 100644
--- a/gdb/testsuite/gdb.base/jit-reader-simple.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp
@@ -181,7 +181,7 @@ with_test_prefix "two JITers" {
gdb_load $binfile_dl2
if {![runto_main]} {
- return -1
+ return
}
set num_bps 0
diff --git a/gdb/testsuite/gdb.base/jump.exp b/gdb/testsuite/gdb.base/jump.exp
index 3139b081aa25..63b145dbf5e4 100644
--- a/gdb/testsuite/gdb.base/jump.exp
+++ b/gdb/testsuite/gdb.base/jump.exp
@@ -110,7 +110,7 @@ for {set inf 2} {$inf <= $num_inferiors} {incr inf} {
"Switching to inferior ${inf} .*" \
"switch to inferior ${inf}"
if {![runto_main]} {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/kill-during-detach.exp b/gdb/testsuite/gdb.base/kill-during-detach.exp
index f5e3a9022112..08c9bf353a8c 100644
--- a/gdb/testsuite/gdb.base/kill-during-detach.exp
+++ b/gdb/testsuite/gdb.base/kill-during-detach.exp
@@ -80,7 +80,7 @@ proc run_test { exit_p checkpoint_p } {
}
if {![runto_main]} {
- return -1
+ return
}
if { $checkpoint_p } {
diff --git a/gdb/testsuite/gdb.base/killed-outside.exp b/gdb/testsuite/gdb.base/killed-outside.exp
index 5fb818ec076b..d88f97e6fc7d 100644
--- a/gdb/testsuite/gdb.base/killed-outside.exp
+++ b/gdb/testsuite/gdb.base/killed-outside.exp
@@ -56,7 +56,7 @@ proc test {cmds_after_kill} {
set testpid [get_value "pid" "get pid of inferior"]
if { $testpid == -1 } {
- return -1
+ return
}
remote_exec target "kill -9 ${testpid}"
diff --git a/gdb/testsuite/gdb.base/label.exp b/gdb/testsuite/gdb.base/label.exp
index 418841961c8d..647f1551d511 100644
--- a/gdb/testsuite/gdb.base/label.exp
+++ b/gdb/testsuite/gdb.base/label.exp
@@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" $testfile ${srcfile} debug] } {
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break -q here" \
diff --git a/gdb/testsuite/gdb.base/list-dot-nodebug.exp b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
index 69ffd679e92e..18afe11cead2 100644
--- a/gdb/testsuite/gdb.base/list-dot-nodebug.exp
+++ b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
@@ -33,7 +33,7 @@ proc do_test { debug } {
[list ${::testfile}-${debug} $opts \
$::srcfile [list nodebug] \
$::srcfile2 [list debug]]]} {
- return -1
+ return
}
@@ -58,7 +58,7 @@ proc do_test { debug } {
set executable ${::testfile}-none
if {[build_executable "failed to prepare" ${executable} \
[list $::srcfile $::srcfile2] $opts]} {
- return -1
+ return
}
clean_restart ${executable}
@@ -79,7 +79,7 @@ proc do_test { debug } {
}
if { ![runto bar] } {
- return -1
+ return
}
gdb_test "list ." \
diff --git a/gdb/testsuite/gdb.base/longjmp.exp b/gdb/testsuite/gdb.base/longjmp.exp
index 92b9544021fa..c545db0c32d0 100644
--- a/gdb/testsuite/gdb.base/longjmp.exp
+++ b/gdb/testsuite/gdb.base/longjmp.exp
@@ -21,8 +21,8 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc do_test { with_probes } {
@@ -33,7 +33,7 @@ proc do_test { with_probes } {
}
if {![runto_main]} {
- return 0
+ return
}
# With a libc with probes, all tests should pass.
diff --git a/gdb/testsuite/gdb.base/moribund-step.exp b/gdb/testsuite/gdb.base/moribund-step.exp
index 79acb0a543cc..134a9032192a 100644
--- a/gdb/testsuite/gdb.base/moribund-step.exp
+++ b/gdb/testsuite/gdb.base/moribund-step.exp
@@ -20,7 +20,7 @@ require support_displaced_stepping
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/msym-bp.exp b/gdb/testsuite/gdb.base/msym-bp.exp
index 18e16c581f72..3df65e26b66a 100644
--- a/gdb/testsuite/gdb.base/msym-bp.exp
+++ b/gdb/testsuite/gdb.base/msym-bp.exp
@@ -41,7 +41,7 @@ proc test {debug} {
if { [prepare_for_testing "failed to prepare" $testfile-$debug \
[list $srcfile $srcfile2] $options] } {
- return -1
+ return
}
# Should find two locations: the static foo in the msym-bp.c file,
diff --git a/gdb/testsuite/gdb.base/new-ui.exp b/gdb/testsuite/gdb.base/new-ui.exp
index b5ee322dc04f..7a7fd6a54827 100644
--- a/gdb/testsuite/gdb.base/new-ui.exp
+++ b/gdb/testsuite/gdb.base/new-ui.exp
@@ -82,7 +82,7 @@ proc_with_prefix do_test {} {
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_test "new-ui" \
diff --git a/gdb/testsuite/gdb.base/noreturn-finish.exp b/gdb/testsuite/gdb.base/noreturn-finish.exp
index 0574733cde74..2ba6097fa772 100644
--- a/gdb/testsuite/gdb.base/noreturn-finish.exp
+++ b/gdb/testsuite/gdb.base/noreturn-finish.exp
@@ -23,7 +23,7 @@ proc noreturn_finish_test { } {
global gdb_prompt
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "noreturn_func"
diff --git a/gdb/testsuite/gdb.base/noreturn-return.exp b/gdb/testsuite/gdb.base/noreturn-return.exp
index c761f141cddb..d4a908cf0cdc 100644
--- a/gdb/testsuite/gdb.base/noreturn-return.exp
+++ b/gdb/testsuite/gdb.base/noreturn-return.exp
@@ -23,7 +23,7 @@ proc noreturn_test { } {
global gdb_prompt
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "noreturn_func"
diff --git a/gdb/testsuite/gdb.base/nostdlib.exp b/gdb/testsuite/gdb.base/nostdlib.exp
index 91a3de3fa235..920f145d6288 100644
--- a/gdb/testsuite/gdb.base/nostdlib.exp
+++ b/gdb/testsuite/gdb.base/nostdlib.exp
@@ -49,7 +49,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
}
if {$err != ""} {
untested "failed to compile"
- return -1
+ return
}
clean_restart $filename
diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp
index 3f584ee83c3a..0d11726d4df5 100644
--- a/gdb/testsuite/gdb.base/overlays.exp
+++ b/gdb/testsuite/gdb.base/overlays.exp
@@ -29,8 +29,8 @@ standard_testfile overlays.c ovlymgr.c foo.c bar.c baz.c grbx.c
if {[build_executable $testfile.exp $testfile \
[list $srcfile $srcfile2 $srcfile3 $srcfile4 $srcfile5 $srcfile6] \
"debug ldscript=-Wl,-T$linker_script"] == -1} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
remote_exec build "mv ${testfile}.o foo.o bar.o baz.o grbx.o ovlymgr.o ${objdir}/${subdir}"
@@ -45,7 +45,7 @@ gdb_load ${binfile}
#
if {![runto_main]} {
- return 0
+ return
}
# couple of convenience variables
diff --git a/gdb/testsuite/gdb.base/print-file-var.exp b/gdb/testsuite/gdb.base/print-file-var.exp
index b9e3cbbc0bc8..150c18a7b3c4 100644
--- a/gdb/testsuite/gdb.base/print-file-var.exp
+++ b/gdb/testsuite/gdb.base/print-file-var.exp
@@ -46,12 +46,12 @@ proc test {hidden dlopen version_id_main lang} {
if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib1}.c \
${libobj1} \
${lib_opts} ] != "" } {
- return -1
+ return
}
if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib2}.c \
${libobj2} \
${lib_opts} ] != "" } {
- return -1
+ return
}
set main_opts [list debug $lang]
@@ -74,7 +74,7 @@ proc test {hidden dlopen version_id_main lang} {
${main}.c \
$main_opts]
!= 0 } {
- return -1
+ return
}
clean_restart $executable
@@ -82,7 +82,7 @@ proc test {hidden dlopen version_id_main lang} {
gdb_locate_shlib $libobj2
if {![runto_main]} {
- return -1
+ return
}
# Try printing "this_version_num" qualified with the name of the file
diff --git a/gdb/testsuite/gdb.base/print-symbol-loading.exp b/gdb/testsuite/gdb.base/print-symbol-loading.exp
index 77c6145201e9..e3f4b526ac62 100644
--- a/gdb/testsuite/gdb.base/print-symbol-loading.exp
+++ b/gdb/testsuite/gdb.base/print-symbol-loading.exp
@@ -96,7 +96,7 @@ proc test_load_shlib { print_symbol_loading } {
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "nosharedlibrary"
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 631cfd891fcf..12933d898ed6 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -23,8 +23,8 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_integer_literals_accepted {} {
@@ -1213,7 +1213,7 @@ gdb_test "p ctable1\[120\]" "120 'x'" "p ctable1\[120\] #1"
gdb_load ${binfile}
if {![runto_main]} {
- return 0
+ return
}
# With a running target, printf convenience vars should of course work.
diff --git a/gdb/testsuite/gdb.base/random-signal.exp b/gdb/testsuite/gdb.base/random-signal.exp
index e0c5e669c2f2..9482b0aee8ed 100644
--- a/gdb/testsuite/gdb.base/random-signal.exp
+++ b/gdb/testsuite/gdb.base/random-signal.exp
@@ -52,7 +52,7 @@ with_test_prefix "run" {
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
do_test
diff --git a/gdb/testsuite/gdb.base/randomize.exp b/gdb/testsuite/gdb.base/randomize.exp
index 58c2c78ee26a..ef358bef88e2 100644
--- a/gdb/testsuite/gdb.base/randomize.exp
+++ b/gdb/testsuite/gdb.base/randomize.exp
@@ -43,11 +43,11 @@ set test "set disable-randomization off"
gdb_test_multiple "${test}" "${test}" {
-re "Disabling randomization .* unsupported .*$gdb_prompt $" {
untested "disabling randomization is not supported on this Linux GDB"
- return -1
+ return
}
-re "No symbol .* in current context.*$gdb_prompt $" {
untested "disabling randomization is not supported on this GDB platform"
- return -1
+ return
}
-re "$gdb_prompt $" {
pass $test
diff --git a/gdb/testsuite/gdb.base/readline.exp b/gdb/testsuite/gdb.base/readline.exp
index f8f9adecf8f7..c9e5830a3220 100644
--- a/gdb/testsuite/gdb.base/readline.exp
+++ b/gdb/testsuite/gdb.base/readline.exp
@@ -154,7 +154,7 @@ save_vars { env(TERM) } {
if { ![readline_is_used] } {
unsupported "readline isn't used."
- return -1
+ return
}
save_vars { timeout env(GDBHISTSIZE) env(GDBHISTFILE) } {
diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp
index 9f74b8b005d5..bba1186a3441 100644
--- a/gdb/testsuite/gdb.base/readnever.exp
+++ b/gdb/testsuite/gdb.base/readnever.exp
@@ -27,7 +27,7 @@ if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } {
save_vars { GDBFLAGS } {
append GDBFLAGS " --readnever"
if { [clean_restart $testfile] == -1 } {
- return -1
+ return
}
}
diff --git a/gdb/testsuite/gdb.base/relocate.exp b/gdb/testsuite/gdb.base/relocate.exp
index 8c1ffc52e509..5b5d7cffd726 100644
--- a/gdb/testsuite/gdb.base/relocate.exp
+++ b/gdb/testsuite/gdb.base/relocate.exp
@@ -21,8 +21,8 @@ append binfile .o
remote_exec build "rm -f ${binfile}"
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
clean_restart
diff --git a/gdb/testsuite/gdb.base/reread.exp b/gdb/testsuite/gdb.base/reread.exp
index d5373ce3348b..15d1186a40a1 100644
--- a/gdb/testsuite/gdb.base/reread.exp
+++ b/gdb/testsuite/gdb.base/reread.exp
@@ -27,7 +27,7 @@ foreach_with_prefix opts { "" "pie" } {
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" \
executable ${testfile1_opt}] != "" } {
untested "failed to compile first testcase"
- return -1
+ return
}
# build the second test case
@@ -44,7 +44,7 @@ foreach_with_prefix opts { "" "pie" } {
&& [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
executable ${testfile2_opt2}] != ""} {
untested "failed to compile second testcase"
- return -1
+ return
}
# Start with a fresh gdb.
diff --git a/gdb/testsuite/gdb.base/return2.exp b/gdb/testsuite/gdb.base/return2.exp
index e0aa63b8d5b0..241845d09cf6 100644
--- a/gdb/testsuite/gdb.base/return2.exp
+++ b/gdb/testsuite/gdb.base/return2.exp
@@ -19,8 +19,8 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
set allow_float_test [allow_float_test]
@@ -82,7 +82,7 @@ proc return2_tests { } {
global gdb_prompt allow_float_test
if {![runto_main]} {
- return -1
+ return
}
return_void
diff --git a/gdb/testsuite/gdb.base/set-cwd.exp b/gdb/testsuite/gdb.base/set-cwd.exp
index 279004596a1e..81416e9f9653 100644
--- a/gdb/testsuite/gdb.base/set-cwd.exp
+++ b/gdb/testsuite/gdb.base/set-cwd.exp
@@ -31,7 +31,7 @@ proc_with_prefix test_tilde_expansion { } {
gdb_test_no_output "set cwd ~/" "set inferior cwd to ~/ dir"
if { ![runto_main] } {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
@@ -95,13 +95,13 @@ proc_with_prefix test_cd_into_dir { } {
# This test only makes sense if $tmpdir != $gdb_cwd_before_run
if { ![gdb_assert ![string equal $tmpdir $gdb_cwd_before_run] \
"make sure that tmpdir and GDB's cwd are different"] } {
- return -1
+ return
}
gdb_test_no_output "set cwd $tmpdir" "set inferior cwd to temp dir"
if { ![runto_main] } {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
@@ -150,14 +150,14 @@ proc_with_prefix test_cwd_reset { } {
# This test only makes sense if $tmpdir != $gdb_cwd.
if { ![gdb_assert ![string equal $tmpdir $gdb_cwd] \
"make sure that tmpdir and GDB's cwd are different"] } {
- return -1
+ return
}
gdb_test_no_output "set cwd $tmpdir" "set inferior cwd to temp dir"
with_test_prefix "running with set cwd" {
if { ![runto_main] } {
- return -1
+ return
}
}
@@ -172,7 +172,7 @@ proc_with_prefix test_cwd_reset { } {
with_test_prefix "running without set cwd" {
if { ![runto_main] } {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index feac4e993ac1..b8923492e4b8 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -23,8 +23,8 @@
standard_testfile .c
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc_with_prefix test_setshow_annotate {} {
diff --git a/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp b/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
index 60875224de2f..0624424d1524 100644
--- a/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
+++ b/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
@@ -62,7 +62,7 @@ proc do_prepare_inferior { } {
global decimal hex
if { ![runto_main] } {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
index cda9605b0db0..83afcaba1494 100644
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -67,7 +67,7 @@ foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" {
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $sep_lib_flags] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {$libsepdebug == "SEP"} {
@@ -82,7 +82,7 @@ foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" {
clean_restart $executable
if {![runto_main]} {
- return 0
+ return
}
gdb_test "display (int) a_global" "1: \\(int\\) a_global = 41"
diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp
index feb080708b70..3fc92d37e90b 100644
--- a/gdb/testsuite/gdb.base/solib-overlap.exp
+++ b/gdb/testsuite/gdb.base/solib-overlap.exp
@@ -61,7 +61,7 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1"
|| [gdb_compile_shlib ${srcfile_lib} ${binfile_lib2} $lib_flags] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {[catch {exec prelink -N -r ${prelink_lib1} ${binfile_lib1}} output] != 0
@@ -69,7 +69,7 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1"
# Maybe we don't have prelink.
verbose -log "prelink failed: $output"
untested "could not prelink ${binfile_lib1_test_msg} or ${binfile_lib2_test_msg}."
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
@@ -85,7 +85,7 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1"
|| [gdb_compile_shlib ${srcfile_lib} ${binfile_lib2} $lib_flags] != ""} {
untested "failed to compile shared library"
kill_wait_spawned_process $test_spawn_id
- return -1
+ return
}
clean_restart ${binfile_base}
diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp
index 43f54b41df0e..3ae9bc442b2a 100644
--- a/gdb/testsuite/gdb.base/solib-search.exp
+++ b/gdb/testsuite/gdb.base/solib-search.exp
@@ -90,7 +90,7 @@ set corefile [standard_output_file solib-search.core]
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
# Before we restart gdb, replace the libs with the "wrong" ones.
diff --git a/gdb/testsuite/gdb.base/solib-weak.exp b/gdb/testsuite/gdb.base/solib-weak.exp
index 449d468603fe..79e6a6a46d61 100644
--- a/gdb/testsuite/gdb.base/solib-weak.exp
+++ b/gdb/testsuite/gdb.base/solib-weak.exp
@@ -23,12 +23,12 @@ require allow_shlib_tests
if {([istarget *-*-mingw*]
|| [istarget *-*-cygwin*]
|| [istarget *-*-pe*])} {
- return 0
+ return
}
# This test uses GCC-specific syntax.
if {![test_compiler_info "gcc-*"]} {
- return 0
+ return
}
proc do_test { lib1opts lib2opts lib1first } {
@@ -80,7 +80,7 @@ proc do_test { lib1opts lib2opts lib1first } {
if { [gdb_compile_shlib ${lib1src} ${lib1} ${lib1opts}] != ""
|| [gdb_compile_shlib ${lib2src} ${lib2} ${lib2opts}] != ""
|| [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable $exec_opts] != ""} {
- return -1
+ return
}
with_test_prefix $testopts {
diff --git a/gdb/testsuite/gdb.base/source-dir.exp b/gdb/testsuite/gdb.base/source-dir.exp
index d2589346ed82..25fd006667fa 100644
--- a/gdb/testsuite/gdb.base/source-dir.exp
+++ b/gdb/testsuite/gdb.base/source-dir.exp
@@ -115,7 +115,7 @@ proc test_truncated_comp_dir {} {
if { [gdb_compile "${srcfile}" "${binfile}" \
executable ${options}] != "" } {
untested "failed to compile"
- return -1
+ return
}
}
@@ -130,7 +130,7 @@ proc test_truncated_comp_dir {} {
"\r\nSource directories searched: \\\$cdir\[:;\]\\\$cwd"
if {![runto_main]} {
- return 0
+ return
}
gdb_test "info source" \
diff --git a/gdb/testsuite/gdb.base/stack-protector.exp b/gdb/testsuite/gdb.base/stack-protector.exp
index b2d1e6000e8c..3c61ef500b04 100644
--- a/gdb/testsuite/gdb.base/stack-protector.exp
+++ b/gdb/testsuite/gdb.base/stack-protector.exp
@@ -41,11 +41,11 @@ proc simple_func_break_test { protection } {
lappend options additional_flags=$protection
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Break on function foo and ensure it stops on the first line of code.
@@ -57,7 +57,7 @@ proc simple_func_break_test { protection } {
}
gdb_continue_to_breakpoint "foo" ".*break here.*"
- return 1
+ return
}
foreach_with_prefix protection $protector_options {
diff --git a/gdb/testsuite/gdb.base/stale-infcall.exp b/gdb/testsuite/gdb.base/stale-infcall.exp
index cb7c09972032..ea3db89d2e92 100644
--- a/gdb/testsuite/gdb.base/stale-infcall.exp
+++ b/gdb/testsuite/gdb.base/stale-infcall.exp
@@ -36,7 +36,7 @@ gdb_test_multiple "next" $test {
-re "( test-fail .*|\r\nCannot insert breakpoint 0\\.\r\n.*)\r\n$gdb_prompt $" {
xfail $test
untested "system lacks support for tracking longjmps"
- return -1
+ return
}
}
gdb_test_no_output {delete $test_fail_bpnum}
diff --git a/gdb/testsuite/gdb.base/step-break.exp b/gdb/testsuite/gdb.base/step-break.exp
index a580d7f201b3..e5fe59933bd1 100644
--- a/gdb/testsuite/gdb.base/step-break.exp
+++ b/gdb/testsuite/gdb.base/step-break.exp
@@ -18,11 +18,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "set breakpoint here"]
diff --git a/gdb/testsuite/gdb.base/step-over-no-symbols.exp b/gdb/testsuite/gdb.base/step-over-no-symbols.exp
index 655b7a062d81..5f4b98d6e6ae 100644
--- a/gdb/testsuite/gdb.base/step-over-no-symbols.exp
+++ b/gdb/testsuite/gdb.base/step-over-no-symbols.exp
@@ -49,7 +49,7 @@ proc test_step_over { displaced } {
clean_restart $::testfile
if {![runto_main]} {
- return -1
+ return
}
delete_breakpoints
diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
index 12eff194efc4..20890e85b3ea 100644
--- a/gdb/testsuite/gdb.base/step-over-syscall.exp
+++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
@@ -229,7 +229,7 @@ proc step_over_syscall { syscall } {
if {[build_executable ${testfile}.exp ${testfile} ${testfile}.c $options]} {
untested "failed to compile"
- return -1
+ return
}
foreach_with_prefix displaced {"off" "on"} {
@@ -242,7 +242,7 @@ proc step_over_syscall { syscall } {
set syscall_insn_addr [lindex $ret 0]
set syscall_insn_next_addr [lindex $ret 1]
if { $syscall_insn_addr == -1 } {
- return -1
+ return
}
gdb_test "continue" "Continuing\\..*Breakpoint ${::decimal}, (.* in )?(__libc_)?$syscall \\(\\).*" \
@@ -271,7 +271,7 @@ proc step_over_syscall { syscall } {
# Check the address of next instruction of syscall.
if {[gdb_test "stepi" "x/i .*=>.*" "single step over $syscall"] != 0} {
- return -1
+ return
}
check_pc_after_cross_syscall $displaced $syscall $syscall_insn_next_addr
@@ -301,7 +301,7 @@ proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
set syscall_insn_addr [lindex $ret 0]
set syscall_insn_next_addr [lindex $ret 1]
if { $syscall_insn_addr == -1 } {
- return -1
+ return
}
gdb_test "continue" "Continuing\\..*Breakpoint ${::decimal}, (.* in )?(__libc_)?$syscall \\(\\).*" \
diff --git a/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp b/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
index d8cf9da97f71..c4c12a5c57c9 100644
--- a/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
+++ b/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
@@ -42,7 +42,7 @@ proc test {non_stop displaced always_inserted} {
gdb_test_no_output "set breakpoint always-inserted $always_inserted"
if {![runto_main]} {
- return -1
+ return
}
with_test_prefix "user bp" {
diff --git a/gdb/testsuite/gdb.base/style-logging.exp b/gdb/testsuite/gdb.base/style-logging.exp
index 8895e88d4b59..7f56b2d49f2a 100644
--- a/gdb/testsuite/gdb.base/style-logging.exp
+++ b/gdb/testsuite/gdb.base/style-logging.exp
@@ -24,7 +24,7 @@ standard_testfile style.c
with_ansi_styling_terminal {
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/testenv.exp b/gdb/testsuite/gdb.base/testenv.exp
index 83de52c510b0..62887ebe7170 100644
--- a/gdb/testsuite/gdb.base/testenv.exp
+++ b/gdb/testsuite/gdb.base/testenv.exp
@@ -28,7 +28,7 @@ standard_testfile .c
# and start with a fresh gdb
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
# Test that the inferior sees EXPECTED env vars starting with
diff --git a/gdb/testsuite/gdb.base/traced-thread.exp b/gdb/testsuite/gdb.base/traced-thread.exp
index b6d354907225..219e3f900ac5 100644
--- a/gdb/testsuite/gdb.base/traced-thread.exp
+++ b/gdb/testsuite/gdb.base/traced-thread.exp
@@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
}
if {![runto "parent_stop"]} {
- return -1
+ return
}
# We don't want to be bothered.
diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.base/valgrind-bt.exp
index 36614427cf9b..2fd29e72508d 100644
--- a/gdb/testsuite/gdb.base/valgrind-bt.exp
+++ b/gdb/testsuite/gdb.base/valgrind-bt.exp
@@ -42,13 +42,13 @@ gdb_test_multiple "continue" $test {
fail "$test (remote connection closed)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "The program is not being run\\.\r\n$gdb_prompt $" {
fail "$test (valgrind vgdb has terminated)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "\r\n$gdb_prompt $" {
pass "$test (false warning)"
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp
index c39d31819837..ca13f42f076b 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp
@@ -42,13 +42,13 @@ while {$loop && $continue_count < 100} {
fail "$test (remote connection closed)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "The program is not being run\\.\r\n$gdb_prompt $" {
fail "$test (valgrind vgdb has terminated)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "\r\n$gdb_prompt $" {
pass "$test (false warning)"
diff --git a/gdb/testsuite/gdb.base/vdso-warning.exp b/gdb/testsuite/gdb.base/vdso-warning.exp
index 4f61554dc68a..358a1dd42d8d 100644
--- a/gdb/testsuite/gdb.base/vdso-warning.exp
+++ b/gdb/testsuite/gdb.base/vdso-warning.exp
@@ -73,7 +73,7 @@ with_test_prefix "core" {
set corefile [standard_output_file $testfile.core]
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.base/vla-optimized-out.exp b/gdb/testsuite/gdb.base/vla-optimized-out.exp
index d50804201cd6..7a0af0267c82 100644
--- a/gdb/testsuite/gdb.base/vla-optimized-out.exp
+++ b/gdb/testsuite/gdb.base/vla-optimized-out.exp
@@ -30,7 +30,7 @@ proc vla_optimized_out {exe_suffix options} {
if { [prepare_for_testing "failed to prepare" "$testfile-$exe_suffix" $srcfile \
$compile_flags] } {
- return -1
+ return
}
if {![runto f1]} {
diff --git a/gdb/testsuite/gdb.base/watch-bitfields.exp b/gdb/testsuite/gdb.base/watch-bitfields.exp
index 30e90fecf6b8..30c05ce094c2 100644
--- a/gdb/testsuite/gdb.base/watch-bitfields.exp
+++ b/gdb/testsuite/gdb.base/watch-bitfields.exp
@@ -54,7 +54,7 @@ proc expect_watchpoint { expr old new } {
proc test_watch_location {} {
with_test_prefix "-location watch against bitfields" {
if {![runto_main]} {
- return -1
+ return
}
watch "-location q.a"
@@ -79,7 +79,7 @@ proc test_watch_location {} {
proc test_regular_watch {} {
with_test_prefix "regular watch against bitfields" {
if {![runto_main]} {
- return -1
+ return
}
watch "q.d + q.f + q.g"
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index 29b9c3fd07dd..46eec592402d 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -26,8 +26,8 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# True if we're forcing no hardware watchpoints.
diff --git a/gdb/testsuite/gdb.base/wchar.exp b/gdb/testsuite/gdb.base/wchar.exp
index d3cfd09d5de4..d4c1a5fd87c6 100644
--- a/gdb/testsuite/gdb.base/wchar.exp
+++ b/gdb/testsuite/gdb.base/wchar.exp
@@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
set bp_location [gdb_get_line_number "START"]
if {![runto "wchar.c:$bp_location"]} {
- return -1
+ return
}
gdb_test "print narrow" "= 97 L'a'"
diff --git a/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp b/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
index 98680e5c5a32..8a381843cffb 100644
--- a/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
+++ b/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
@@ -28,8 +28,8 @@ set opaque_objfile [standard_output_file "$opaque_testfile.o"]
if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \
$opaque_objfile \
object {}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[gdb_compile \
next prev parent reply other threads:[~2026-04-27 6:37 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 6:34 [PATCH 00/36] GDB: testsuite: Fix top-level returns Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 01/36] GDB: testsuite: aarch64, arm: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 02/36] GDB: testsuite: aarch64, arm: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 03/36] GDB: testsuite: intel: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-28 15:54 ` Schimpe, Christina
2026-04-28 16:42 ` Schimpe, Christina
2026-04-27 6:34 ` [PATCH 04/36] GDB: testsuite: intel: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-28 16:39 ` Schimpe, Christina
2026-04-28 21:48 ` Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 05/36] GDB: testsuite: powerpc: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 06/36] GDB: testsuite: powerpc: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 07/36] GDB: testsuite: riscv: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 08/36] GDB: testsuite: riscv: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 09/36] GDB: testsuite: s390: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 10/36] GDB: testsuite: sparc: " Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 11/36] GDB: testsuite: Don't return -1 from top-level in tests of various arches Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 12/36] GDB: testsuite: Don't return -1 from top-level in multi-arch tests Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 13/36] GDB: testsuite: base: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 14/36] GDB: testsuite: base: Don't return 0 " Thiago Jung Bauermann
2026-04-27 6:34 ` Thiago Jung Bauermann [this message]
2026-04-27 6:34 ` [PATCH 16/36] GDB: testsuite: C++: Don't return -1 " Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 17/36] GDB: testsuite: C++: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 18/36] GDB: testsuite: DWARF: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 19/36] GDB: testsuite: DWARF: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 20/36] GDB: testsuite: GDB: Don't return -1 from top-level Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 21/36] GDB: testsuite: Guile: " Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 22/36] GDB: testsuite: Python: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 23/36] GDB: testsuite: Python: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 24/36] GDB: testsuite: linespec: Don't return -1 from top-level Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 25/36] GDB: testsuite: MI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 26/36] GDB: testsuite: MI: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 27/36] GDB: testsuite: reverse: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 28/36] GDB: testsuite: reverse: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 29/36] GDB: testsuite: server: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 30/36] GDB: testsuite: server: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 31/36] GDB: testsuite: threads: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 32/36] GDB: testsuite: threads: Don't return 0 " Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 33/36] GDB: testsuite: threads: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 34/36] GDB: testsuite: TUI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 35/36] GDB: testsuite: TUI: Don't return 0 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:35 ` [PATCH 36/36] GDB: testsuite: XML: Don't return -1 nor 0 from top-level 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=20260427063500.3847618-16-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