[v2,18/37] GDB: testsuite: DWARF: Don't return value from top-level (sed)

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

Commit Message

Thiago Jung Bauermann April 29, 2026, 11:04 p.m. UTC
  This patch is purely the result of running:

$ sed -i 's/^    return -1/    return/' *.exp*

and

$ sed -i 's/^    return 0/    return/' *.exp*

inside gdb/testsuite/gdb.dwarf2.
---
 .../DW_OP_piece_with_DW_OP_GNU_uninit.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/ada-array-bound.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-cold-name.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp  |  4 ++--
 gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/arr-opt-out.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/arr-stride.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/arr-subrange.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/atomic-type.exp         |  2 +-
 .../gdb.dwarf2/backward-spec-inter-cu.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/bad-regnum.exp          |  4 ++--
 .../gdb.dwarf2/bitfield-parent-optimized-out.exp |  4 ++--
 .../gdb.dwarf2/break-inline-psymtab.exp          |  6 +++---
 gdb/testsuite/gdb.dwarf2/callframecfa.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/calling-convention.exp  |  6 +++---
 gdb/testsuite/gdb.dwarf2/clztest.exp             |  4 ++--
 gdb/testsuite/gdb.dwarf2/corrupt.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/count.exp               |  4 ++--
 gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/cu-empty-name.exp       |  4 ++--
 gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/data-loc.exp            |  6 +++---
 .../gdb.dwarf2/debug-names-bad-cu-index.exp      |  2 +-
 .../gdb.dwarf2/debug-names-duplicate-cu.exp      |  2 +-
 .../gdb.dwarf2/debug-names-missing-cu.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl  |  2 +-
 gdb/testsuite/gdb.dwarf2/debug-names.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dup-psym.exp            |  2 +-
 .../dw-form-ref-addr-with-type-units.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-align.exp           |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-aranges.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp         |  4 ++--
 .../gdb.dwarf2/dw2-bad-mips-linkage-name.exp     |  2 +-
 .../gdb.dwarf2/dw2-bad-parameter-type.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-basic.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp        |  4 ++--
 .../gdb.dwarf2/dw2-canonicalize-type.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-common-block.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp   |  6 +++---
 gdb/testsuite/gdb.dwarf2/dw2-compressed.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-const.exp           |  2 +-
 .../gdb.dwarf2/dw2-cp-infcall-ref-static.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp   |  6 +++---
 .../gdb.dwarf2/dw2-disasm-over-non-stmt.exp      |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp       |  2 +-
 .../gdb.dwarf2/dw2-double-set-die-type.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp       |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp |  2 +-
 .../gdb.dwarf2/dw2-empty-inline-ranges.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp    |  6 +++---
 gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp     |  4 ++--
 .../gdb.dwarf2/dw2-epilogue-begin.exp.tcl        |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-error.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-filename.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp  |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-icycle.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp |  4 ++--
 .../gdb.dwarf2/dw2-inline-many-frames.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp    |  4 ++--
 .../gdb.dwarf2/dw2-inline-small-func.exp         |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp |  4 ++--
 .../gdb.dwarf2/dw2-inline-with-lexical-scope.exp |  2 +-
 .../gdb.dwarf2/dw2-inter-cu-error-2.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp  |  2 +-
 .../gdb.dwarf2/dw2-inter-cu-forth-and-back.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-intercu.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-intermix.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp       |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp         |  4 ++--
 .../gdb.dwarf2/dw2-lexical-block-bare.exp        |  2 +-
 .../gdb.dwarf2/dw2-line-number-zero.exp          |  6 +++---
 .../gdb.dwarf2/dw2-linkage-name-trust.exp        |  4 ++--
 .../gdb.dwarf2/dw2-main-no-line-number.exp       |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp  |  2 +-
 .../gdb.dwarf2/dw2-modula2-self-type.exp         |  2 +-
 .../gdb.dwarf2/dw2-multiple-debug-info.exp       |  2 +-
 .../gdb.dwarf2/dw2-namespaceless-anonymous.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-noloc.exp           |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-op-call.exp         |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp    |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp   |  2 +-
 .../gdb.dwarf2/dw2-out-of-range-end-of-seq.exp   |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-param-error.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-producer.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp    |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp  |  4 ++--
 .../gdb.dwarf2/dw2-ranges-psym-warning.exp       |  6 +++---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp     |  6 +++---
 .../gdb.dwarf2/dw2-ref-missing-frame.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp   |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-restore.exp         |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-restrict.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp  |  2 +-
 .../dw2-single-line-discriminators.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp   |  4 ++--
 .../gdb.dwarf2/dw2-skipped-line-entries.exp      |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp  |  2 +-
 ...2-step-between-different-inline-functions.exp |  4 ++--
 .../dw2-step-between-inline-func-blocks.exp      |  4 ++--
 .../dw2-step-out-of-function-no-stmt.exp         |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-strp.exp            |  2 +-
 .../gdb.dwarf2/dw2-symtab-includes-lookup.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-tu-dwarf-4-5.exp    |  2 +-
 .../gdb.dwarf2/dw2-undefined-ret-addr.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp      |  4 ++--
 .../gdb.dwarf2/dw2-unspecified-type.exp          |  4 ++--
 .../gdb.dwarf2/dw2-unusual-field-names.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp | 10 +++++-----
 gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp   |  2 +-
 .../gdb.dwarf2/dw2-vendor-extended-opcode.exp    |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp  |  4 ++--
 .../gdb.dwarf2/dw2-wrong-mangled-name.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp       |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp  |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp    |  4 ++--
 gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp        |  6 +++---
 gdb/testsuite/gdb.dwarf2/dwp-symlink.exp         | 16 ++++++++--------
 gdb/testsuite/gdb.dwarf2/dwz-many.exp            |  2 +-
 gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dwz.exp                 |  4 ++--
 gdb/testsuite/gdb.dwarf2/dwznolink.exp           |  2 +-
 .../gdb.dwarf2/dyn-type-unallocated.exp          |  6 +++---
 gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp          |  6 +++---
 .../gdb.dwarf2/enqueued-cu-base-addr.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/enum-type-c++.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/enum-type.exp           |  2 +-
 .../gdb.dwarf2/fission-absolute-dwo.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-base.exp        |  4 ++--
 .../gdb.dwarf2/fission-loclists-pie.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-loclists.exp    |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-mix.exp         |  6 +++---
 gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp    |  4 ++--
 .../gdb.dwarf2/fission-relative-dwo.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-reread.exp      |  2 +-
 .../gdb.dwarf2/fission-type-unit-locexpr.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/formdata16.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/fortran-var-string.exp  |  6 +++---
 .../gdb.dwarf2/forward-spec-inter-cu.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/forward-spec.exp        |  2 +-
 .../gdb.dwarf2/gdb-add-index-symlink.exp         |  4 ++--
 gdb/testsuite/gdb.dwarf2/gdb-add-index.exp       |  4 ++--
 gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/gdb-index-tilde.exp     |  8 ++++----
 .../gdb.dwarf2/gdb-index-types-dwarf5.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/gdb-index.exp           |  6 +++---
 .../gdb.dwarf2/implptr-optimized-out.exp         |  4 ++--
 gdb/testsuite/gdb.dwarf2/implptr.exp             |  4 ++--
 gdb/testsuite/gdb.dwarf2/implptrconst.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/implptrpiece.exp        |  4 ++--
 gdb/testsuite/gdb.dwarf2/implref-array.exp       |  6 +++---
 gdb/testsuite/gdb.dwarf2/implref-const.exp       |  6 +++---
 gdb/testsuite/gdb.dwarf2/implref-global.exp      |  6 +++---
 gdb/testsuite/gdb.dwarf2/implref-struct.exp      |  6 +++---
 .../imported-unit-abstract-const-value.exp       |  4 ++--
 .../gdb.dwarf2/imported-unit-bp.exp.tcl          |  2 +-
 gdb/testsuite/gdb.dwarf2/imported-unit-c.exp     |  6 +++---
 .../gdb.dwarf2/imported-unit-runto-main.exp      |  6 +++---
 gdb/testsuite/gdb.dwarf2/imported-unit.exp       |  4 ++--
 .../gdb.dwarf2/info-locals-optimized-out.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/inline.exp              |  2 +-
 .../inlined_subroutine-inheritance.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/intbits.exp             |  6 +++---
 gdb/testsuite/gdb.dwarf2/local-var.exp           |  2 +-
 .../gdb.dwarf2/locexpr-data-member-location.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/mac-fileno.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/main-subprogram.exp     |  4 ++--
 .../gdb.dwarf2/malformed-line-header.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/mega-enum.exp           |  2 +-
 .../gdb.dwarf2/member-ptr-forwardref.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/method-ptr.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/missing-line-table.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/missing-sig-type.exp    |  2 +-
 .../missing-type-name-for-templates.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/missing-type-name.exp   |  4 ++--
 gdb/testsuite/gdb.dwarf2/multidictionary.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/nameless-enum.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/nonvar-access.exp       |  4 ++--
 gdb/testsuite/gdb.dwarf2/nostaticblock.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/nullptr_t.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp  |  4 ++--
 gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp |  4 ++--
 .../gdb.dwarf2/pieces-optimized-out.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/pieces.exp              |  4 ++--
 gdb/testsuite/gdb.dwarf2/pr10770.exp             |  6 +++---
 gdb/testsuite/gdb.dwarf2/pr11465.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/pr13961.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/rust-enum.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/self-spec.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/shortpiece.exp          |  2 +-
 .../gdb.dwarf2/static-optimized-out.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/staticvirtual.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/struct-decl.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/struct-with-sig.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/subrange-enum.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/subrange.exp            |  2 +-
 .../gdb.dwarf2/symbol_needs_eval_fail.exp        |  4 ++--
 .../gdb.dwarf2/symbol_needs_eval_timeout.exp     |  4 ++--
 .../template-specification-full-name.exp         |  4 ++--
 gdb/testsuite/gdb.dwarf2/trace-crash.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/typeddwarf.exp          |  6 +++---
 gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp |  4 ++--
 gdb/testsuite/gdb.dwarf2/utf-rust.exp            |  4 ++--
 gdb/testsuite/gdb.dwarf2/valop.exp               |  4 ++--
 gdb/testsuite/gdb.dwarf2/var-access.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/variant.exp             |  4 ++--
 gdb/testsuite/gdb.dwarf2/varval.exp              | 10 +++++-----
 gdb/testsuite/gdb.dwarf2/void-type.exp           |  4 ++--
 gdb/testsuite/gdb.dwarf2/watch-notconst.exp      |  2 +-
 241 files changed, 398 insertions(+), 398 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp b/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp
index eb5899661a6f..52599ca3ced9 100644
--- a/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp
+++ b/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp
@@ -71,17 +71,17 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[build_executable ${testfile}.exp ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 clean_restart ${testfile}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set cmd "print i64_var"
 if { [is_64_target] } {
     gdb_test $cmd \
diff --git a/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp b/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp
index 90858e26e654..4a5e14e2c2ed 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp
@@ -80,11 +80,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 gdb_test "print value" \
     [string_to_regexp " = (disc => 3, nums => (7, 11, 13))"]
diff --git a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
index f4dc9acf4b1f..144bec7e5325 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
@@ -57,11 +57,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 gdb_breakpoint "pck.xtra.function" message
 gdb_breakpoint "pck.xtra.function\[cold\]" message
diff --git a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
index e50763109c48..01c0fbe5e4e2 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
@@ -61,11 +61,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 with_test_prefix "first first" {
     gdb_test_no_output "set language ada"
     gdb_breakpoint "<__gnat_namefirst>" message
diff --git a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
index 526ebaffe682..b53d8a359355 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
@@ -84,10 +84,10 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 gdb_test "ptype array_type" "type = array \\(1 \\.\\. 7\\) of integer"
diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
index 00e737bcef2b..171e0cbf3aab 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
@@ -26,11 +26,11 @@  standard_testfile .c -dw.S
 # Any program would do, but since we already have ada-valprint-error.c
 # specifically for this testcase, might as well use that.
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
@@ -102,11 +102,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # Note: This test may fail with certain clang + linker combinations
 # Specifically, clang + ld.lld can fail to apply relocations when linking
 # nodebug .o with separate DWARF .o, leaving fd__global as NULL instead
diff --git a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
index 0f47b7783ed6..1d04ea176d0a 100644
--- a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
+++ b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp
@@ -16,11 +16,11 @@ 
 require allow_cplus_tests
 
 standard_testfile .cc
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
-    return -1
+    return
 }
 
 set cmd "ptype main"
 
 set re \
diff --git a/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp b/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp
index bef0d63528e0..8587897ccef1 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp
@@ -79,11 +79,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 
 gdb_test "print the_table" " = <optimized out>"
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.exp b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
index f1ef47efd51e..cdec17eed07c 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-stride.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
@@ -109,11 +109,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 
 gdb_test "ptype pck.table" \
diff --git a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
index c466d1b8257a..ec2640cdb7ac 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
@@ -74,11 +74,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 
 gdb_test "ptype pck.table" \
diff --git a/gdb/testsuite/gdb.dwarf2/atomic-type.exp b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
index c2f9bfcece41..92865016ea3a 100644
--- a/gdb/testsuite/gdb.dwarf2/atomic-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
@@ -79,9 +79,9 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "ptype f" "int \\(const _Atomic char \\\* volatile _Atomic\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
index c59e0463e290..de76cc8aca22 100644
--- a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
@@ -73,11 +73,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[build_executable "failed to build executable" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 set eol "\r\n"
 set ws "\[ \t\]"
 
diff --git a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
index 84c1895e5d2f..6c9d80b1e048 100644
--- a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
+++ b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
@@ -60,15 +60,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "info addr foo1" \
     "Symbol \"foo1\" is a variable in \\\$bad_register_number."
 
diff --git a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
index 45e66a42f0fd..0e7318bfd644 100644
--- a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
@@ -68,15 +68,15 @@  Dwarf::assemble $asm_file {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "p var" " = <optimized out>"
 gdb_test "p var.bitfield" " = <optimized out>"
 gdb_test "p var.intfield" " = <optimized out>"
diff --git a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
index 45213468abb2..3f03bf78df97 100644
--- a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
+++ b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
@@ -15,20 +15,20 @@ 
 
 standard_testfile .c -2.c
 
 set sources [list $srcfile $srcfile2]
 if { [prepare_for_testing "failed to prepare" ${testfile} $sources] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 get_debug_format
 if { [skip_inline_frame_tests] } {
-    return -1
+    return
 }
 
 # Set a break-point in inline function bar, in a CU for which the partial
 # symtab has not been expanded.
 gdb_breakpoint "bar" message
diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
index 315ce0a12f6d..91a1be56506d 100644
--- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
@@ -22,15 +22,15 @@  require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list {additional_flags=-nostdlib}]]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "break *func" "Breakpoint 2.*" "set breakpoint for call-frame-cfa"
 gdb_continue_to_breakpoint "continue to breakpoint for call-frame-cfa"
 gdb_test "display arg" "arg = 77" "set display for call-frame-cfa"
diff --git a/gdb/testsuite/gdb.dwarf2/calling-convention.exp b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
index 294a250408c3..202371400ea7 100644
--- a/gdb/testsuite/gdb.dwarf2/calling-convention.exp
+++ b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
@@ -32,11 +32,11 @@  require dwarf2_support
 standard_testfile .c .S
 
 # First compile the .c file so we can ask GDB what is sizeof(int).
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
@@ -67,15 +67,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "call foo ()" \
     "Cannot call the function 'foo' which does not follow the target calling convention."
 gdb_breakpoint "foo"
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp
index 43f17889f5a6..c827ae6175c8 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.exp
+++ b/gdb/testsuite/gdb.dwarf2/clztest.exp
@@ -24,15 +24,15 @@  require dwarf2_support
 # This test can only be run on x86-64 targets.
 require is_x86_64_m64_target
 
 if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S \
       {nodebug nopie additional_flags=-nostdlib}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Initialize tests to be an empty array.
 unset -nocomplain tests
 array set tests {}
diff --git a/gdb/testsuite/gdb.dwarf2/corrupt.exp b/gdb/testsuite/gdb.dwarf2/corrupt.exp
index aff411132142..b46f0cb1b434 100644
--- a/gdb/testsuite/gdb.dwarf2/corrupt.exp
+++ b/gdb/testsuite/gdb.dwarf2/corrupt.exp
@@ -67,9 +67,9 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 gdb_test "print 1" "= 1" "recover from corrupt DWARF"
diff --git a/gdb/testsuite/gdb.dwarf2/count.exp b/gdb/testsuite/gdb.dwarf2/count.exp
index a238c352d97f..8ed443fe7343 100644
--- a/gdb/testsuite/gdb.dwarf2/count.exp
+++ b/gdb/testsuite/gdb.dwarf2/count.exp
@@ -125,15 +125,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "ptype array" "type = char \\\[5\\\]"
 gdb_test "whatis array" "type = char \\\[5\\\]"
 gdb_test "print array" " = \"hello\""
diff --git a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
index bbb3a3765ab4..6a3abaf83a4d 100644
--- a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
@@ -80,10 +80,10 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_assert [runto_main] "run to main"
 gdb_test "p global_var" " = {x = 0, y = 0}"
diff --git a/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp b/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp
index 32f4a4c007fd..d4aa02038071 100644
--- a/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp
@@ -36,13 +36,13 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if { ![runto_main] } {
-    return -1
+    return
 }
 
 gdb_continue_to_end
diff --git a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
index 8ff6765d170c..844b01d1b4a5 100644
--- a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
+++ b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
@@ -51,10 +51,10 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 gdb_test "break *$main_start" ".*Breakpoint $decimal at $hex" \
     "set breakpoint at main address"
diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp
index 3a2787e9f268..b78afe257164 100644
--- a/gdb/testsuite/gdb.dwarf2/data-loc.exp
+++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp
@@ -25,11 +25,11 @@  standard_testfile .c -dw.S
 # For that, we ask GDB by debugging our data-loc.c program.
 # Any program would do, but since we already have data-loc.c
 # specifically for this testcase, might as well use that.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
@@ -119,15 +119,15 @@  Dwarf::assemble $asm_file {
 # program using our debug info instead of the info generated by
 # the compiler.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 
 # foo.three
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
index 00dacb78b817..10e649f06afe 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
@@ -80,11 +80,11 @@  Dwarf::assemble {
     }
 }
 
 if {[build_executable ${testfile}.exp $testfile "${asm_file} ${srcfile}" \
 	 [list ldflags=-nostartfiles]] == -1} {
-    return -1
+    return
 }
 
 clean_restart
 
 with_complaints 1 {
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
index b9ad865a79d1..11294ae5a131 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
@@ -60,11 +60,11 @@  Dwarf::assemble {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
 	 [list ldflags=-nostartfiles]]} {
-    return -1
+    return
 }
 
 # Check for warning.
 set re \
     [list \
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
index 532482318dd1..c5eca54b55cf 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
@@ -67,11 +67,11 @@  Dwarf::assemble {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
 	 [list ldflags=-nostartfiles]]} {
-    return -1
+    return
 }
 
 # Verify that .debug_names section is not ignored.
 set index [have_index $binfile]
 gdb_assert { [string equal $index ""] } ".debug_names not used"
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl b/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl
index 4d588ab6cec6..af3f263a2733 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl
@@ -88,11 +88,11 @@  Dwarf::assemble {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
 	 [list ldflags=-nostartfiles]]} {
-    return -1
+    return
 }
 
 # Verify that .debug_names section is not ignored.
 set index [have_index $binfile]
 gdb_assert { [string equal $index "debug_names"] } ".debug_names used"
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names.exp b/gdb/testsuite/gdb.dwarf2/debug-names.exp
index 23e8dad4577a..39bdd3d59e82 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names.exp
@@ -63,11 +63,11 @@  Dwarf::assemble {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \
 	 [list ldflags=-nostartfiles]]} {
-    return -1
+    return
 }
 
 # Verify that .debug_names section is not ignored.
 set index [have_index $binfile]
 gdb_assert { [string equal $index "debug_names"] } ".debug_names used"
diff --git a/gdb/testsuite/gdb.dwarf2/dup-psym.exp b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
index da3a8947c2fb..b020146e285b 100644
--- a/gdb/testsuite/gdb.dwarf2/dup-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
@@ -21,11 +21,11 @@  require dwarf2_support
 
 standard_testfile .S
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile {debug} main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 set test "info sources should contain only one reference to file1.txt"
 gdb_test_multiple "info sources" "$test" {
   -re "file1\\.txt.*file1\\.txt.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp b/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp
index 9a8a396375b1..6c3304352988 100644
--- a/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp
@@ -98,11 +98,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # Without the corresponding fix, we get an internal error:
 #
 #   gdb/dwarf2/read.c:3940: internal-error: load_full_comp_unit: Assertion `! this_cu->is_debug_types' failed.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
index 04d8f91be5b8..367871e3094e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
@@ -48,11 +48,11 @@  lappend flags additional_flags=[quote_for_host -DWORLD_START=$world_start]
 lappend flags additional_flags=[quote_for_host -DWORLD_END=$world_start \
 				    + $world_len]
 
 set executable ${testfile}
 if {[build_executable ${testfile}.exp ${executable} $sources $flags] == -1} {
-    return -1
+    return
 }
 
 clean_restart $executable
 
 gdb_test "break hello" \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
index 06d4f6930240..1716741c0c14 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
@@ -19,11 +19,11 @@  require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $executable
 
 # -1 was produced, it is now caught with the complaint:
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-align.exp b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
index f4e6947f755e..6671dd5a3fd3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-align.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
@@ -66,15 +66,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set lang c++"
 gdb_test "print alignof(int_4096)" " = 4096"
 gdb_test "print alignof(ptr_4096)" " = 4096"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index 50b949345fcc..bbfdf23168b8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
@@ -23,11 +23,11 @@  require allow_cplus_tests
 standard_testfile .S
 
 if {[gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
 	 object {debug}] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 clean_restart
 
 # Be sure to set cp-abi before $binfile gets loaded
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
index 949464bd3c18..a02d580bfd26 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 # Force the debugger to create the file1.txt symtab, to make sure that
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp
index d1d2a09c8830..beda49270c74 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp
@@ -34,10 +34,10 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $asm_file $srcfile ]] } {
-    return -1
+    return
 }
 
 # Failed gdb_load would abort the testcase execution earlier.
 pass "file loaded"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index 134397cdfcbe..b148ae0e005c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
@@ -34,11 +34,11 @@  require dwarf2_support
 
 standard_testfile main.c -other.S -dwarf.S
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 set int_size [get_sizeof "int" 4]
 
 # Make some DWARF for the test.
@@ -158,11 +158,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [build_executable ${testfile}.exp ${testfile} \
 	  [list $srcfile $srcfile2 $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # Attempt to place a breakpoint on 'some_func', then check GDB is
 # still alive.  This test can optionally set a breakpoint on 'main'
 # first (based on GOTO_MAIN), the original bug behaved differently
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
index 5a8e902b0181..aa7c12c12fab 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
@@ -53,11 +53,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # A successful run will have two PASSes.  A GDB that's lacking
 # attribute type checking will segfault at some point.  It doesn't
 # much matter what we test here, so long as we do something to make
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
index 9bba38c81025..79cd67af65d9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
@@ -20,11 +20,11 @@  require dwarf2_support
 standard_testfile .S
 set executable ${testfile}
 
 # First try referencing DW_AT_frame_base which is not defined.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $executable
 
 # The first access (as we do not use -readnow) prints some:
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
index 307fcc1546d2..6f6eb153c3a5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
@@ -50,10 +50,10 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "ptype var" "type = bool"
 gdb_test "print var" "Missing .* symbol \"var\"."
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
index 305fc7173ab0..f94bb8633ce3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
index d7b76eaf6e72..6b71e1e05581 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
@@ -66,15 +66,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Make sure we can print both types correctly.
 gdb_test "print bf16_1" " = 3.141"
 gdb_test "print fp16_1" " = 3.1406"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
index 4928bcb3e4c2..48206cdc2376 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
@@ -23,10 +23,10 @@  set additional_flags [gdb_target_symbol_prefix_flags_asm]
 standard_testfile .S
 set executable ${testfile}
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 [list nodebug $additional_flags]]} {
-    return -1
+    return
 }
 
 # The correct new[] and delete[] syntax is probably unsupported by GDB.
 gdb_test "ptype f" {type = void \(typename<sizeof \(int\)>, C::operator new\(int\), C::operator delete\(void\*\), C::operator new\[\]\(int\), C::operator delete\[\]\(void\*\)\)}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index 7c470ff25a0d..38d2652cd3bf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -26,11 +26,11 @@  require allow_fortran_tests
 
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile \
       {nodebug nopie f90}] } {
-    return -1
+    return
 }
 
 if {![runto MAIN__]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
index b067f3b7f28b..6e729f8c6ec0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
@@ -21,11 +21,11 @@  require dwarf2_support
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
 standard_testfile .S
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	$additional_flags]} {
-    return -1
+    return
 }
 
 # Here should be GDB-computed "Compilation directory is".
 gdb_test "list gcc42" ".*"
 gdb_test "info source" "\r\nCurrent source file is dw2-compdir-oldgcc42.S\r\nCompilation directory is /dir/d\r\n.*" \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp b/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp
index f0a159e4aa4e..f8da14c0a5aa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp
@@ -31,11 +31,11 @@  require dwarf2_support
 
 standard_testfile main.c -debug.S
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 "${srcfile}" {}]} {
-    return -1
+    return
 }
 
 set float_size [get_sizeof float 0]
 set double_size [get_sizeof double 0]
 set long_double_size [get_sizeof "long double" 0]
@@ -157,15 +157,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 "${asm_file} ${srcfile}" {}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 proc do_test { type {clang 0}} {
     with_test_prefix $type {
 	with_test_prefix clang=$clang {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
index 5ac342506c95..ff197a4d74fe 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
@@ -24,11 +24,11 @@  set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile \
 	      {debug additional_flags=-static additional_flags=-nostdlib} \
 	      main.c -g0 $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.exp b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
index 41eea8063b1f..93ddfaa0f2ff 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
@@ -19,11 +19,11 @@  require dwarf2_support
 
 standard_testfile .S
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_test "print twelve" "= 12"
 
 gdb_test "print/x val8" " = 0xffffffff00000000"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
index 1ddf32aab571..a659ae7171a9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -25,15 +25,15 @@  require dwarf2_support
 
 standard_testfile .S -main.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile2 $srcfile] {}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # main is not provided by DWARF.
 gdb_test_no_output "set language c++"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
index db6ad49e9968..ea3842fe7c0a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
@@ -24,9 +24,9 @@  require dwarf2_support
 
 standard_testfile .S
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_test "ptype noloc" "type = const int"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
index a21cc40284b7..6b01e1d28800 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
@@ -80,11 +80,11 @@  set srcabsdir [standard_output_file ${testfile}.d]
 set srctmpfile tmp-${testfile}.c
 
 # $srcdir may be relative.
 if {[file pathtype $srcabsdir] != "absolute"} {
     untested "objdir pathtype is not absolute"
-    return -1
+    return
 }
 
 set f [open $asmsrcfile "w"]
 puts $f "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */"
 
@@ -412,11 +412,11 @@  if { [test_compiler_info clang*] } {
     lappend opts "additional_flags=-fno-integrated-as"
 }
 
 if { [gdb_compile "${asmsrcfile} ${srcdir}/${subdir}/$srcfile" "${binfile}" executable $opts] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 set dirs {}
 foreach r {"" /rdir} {
   foreach x {"" /xdir} {
@@ -448,11 +448,11 @@  remote_exec host "sh -c \"mkdir $dircreatelist\""
 remote_exec host "sh -c \"for d in $dircreatelist; do cp ${srcdir}/${subdir}/${srcfile} \\\$d/${srctmpfile}; done\""
 
 clean_restart ${testfile}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "cd ${srcabsdir}/rdir" "Working directory [string_to_regexp ${srcabsdir}]/rdir\\." "cd .../rdir"
 
 proc test { func compdir filename } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index 1c0d3979ee93..76de1bc46499 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -92,15 +92,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug} ] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Global lines array, maps lines numbers to the list of addresses
 # associated with that line in the debug output.
 array set lines {}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
index f7ddd2280b93..9ae132fae2f5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
@@ -18,11 +18,11 @@  require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $executable
 
 gdb_test_no_output "set breakpoint pending off"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
index dc76285c1acc..bd36d62a5d32 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
@@ -22,10 +22,10 @@  require dwarf2_support
 
 standard_testfile .S
 
 if  { [gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
 	   object {nodebug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 gdb_test "ptype a" "type = class .*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
index 6bbc25319b9f..2933de412320 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
@@ -20,11 +20,11 @@  require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $executable
 gdb_test_no_output "maint expand-symtab"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
index df925a653746..6f3c6a0092e4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
@@ -21,16 +21,16 @@  require dwarf2_support
 require is_x86_64_m64_target
 
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie}] } {
-    return -1
+    return
 }
 
 if {![runto stop_frame]} {
     perror "Failed to stop in stop_frame"
-    return -1
+    return
 }
 
 gdb_test "bt" \
     "#0  stop_frame \[^\r\n\]*\r\nBacktrace stopped: previous frame identical to this frame \\(corrupt stack\\?\\)" \
     "backtrace from stop_frame"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp
index 91ba571de6ff..15539bad8564 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp
@@ -50,11 +50,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [build_executable "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 clean_restart
 
 # If there's an ERROR during gdb_load, the assert will produce an UNRESOLVED
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp
index 914b9d6f8130..5c6ec7a2d4ec 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp
@@ -58,11 +58,11 @@  get_func_info main
 #
 # Use `nopie` to ensure that addresses are the same across runs, in case ASLR
 # can't be disabled.
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list ${srcfile}] {debug nopie}] } {
-    return -1
+    return
 }
 
 # Some addresses that we need when generating the DWARF.
 for { set i 0 } { $i < 9 } { incr i } {
     set main_$i [get_hexadecimal_valueof "&main_$i" "UNKNOWN" \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
index a00eea2a28ec..7b7dd946c009 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
@@ -21,11 +21,11 @@  require dwarf2_support
 
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
 	   object {nodebug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 # `p var' below can work without identified DWARF DIE just based on its ELF symbol.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
index 9a8a88a74735..f365866c0960 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
@@ -19,11 +19,11 @@  require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $executable
 gdb_test "ptype emptyrange" {No symbol "emptyrange" in current context\.} \
 	 "empty range before CU load"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp
index f7cc7f7c0674..9a1f5e101e7a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp
@@ -27,11 +27,11 @@  standard_testfile
 # before calling prepare_for_testing otherwise GDB will have exited.
 get_func_info foo
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list ${srcfile}] {debug nopie}]} {
-    return -1
+    return
 }
 
 # Address for the middle of foo.  This is used as our entry point when
 # the entry_pc is defined as an address.
 set foo_middle_addr [get_hexadecimal_valueof "&foo_middle" "UNKNOWN" \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
index 33feb375b9d0..fa3bf5f4b3e0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
@@ -189,15 +189,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Try whether we can set and hit breakpoints at the entry_points.
 gdb_breakpoint "*foo"
 gdb_breakpoint "*foobar"
@@ -218,11 +218,11 @@  gdb_test "bt" [multi_line \
 # Now try whether we can also set breakpoints on entry_points from other CUs.
 
 clean_restart ${testfile}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "*fooso"
 gdb_continue_to_breakpoint "foo_so"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp
index 710b9285cecb..3b48846fb718 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp
@@ -92,11 +92,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if { ![runto *main] } {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
index 3739dff18cf4..fecb2e9296de 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
@@ -16,15 +16,15 @@  load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
 if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto f]} {
-    return -1
+    return
 }
 
 # FAIL was printing:
 # param=Unhandled dwarf expression opcode 0xf3
 gdb_test "frame" "param=<optimized out>.*" "<optimized out> is printed"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl
index 89519f577846..d74a8db0a7bf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl
@@ -164,15 +164,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Moving to the scope with a local variable.
 
 gdb_breakpoint $srcfile:$watch_start_line
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
index 6da0949b3829..01d07a4e6ec0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -23,11 +23,11 @@  standard_testfile .S
 require is_x86_64_m64_target
 
 # We can't use prepare_for_testing here because we need to check the
 # 'file' command's output.
 if {[build_executable $testfile.exp $testfile $srcfile {nodebug quiet}]} {
-    return -1
+    return
 }
 
 clean_restart
 
 gdb_test_no_output "set breakpoint pending off"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
index f5e9a4c5bd40..953ad7d8eb5d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -21,11 +21,11 @@  require dwarf2_support
 
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
-    return -1
+    return
 }
 
 gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
index b3009fa3f83e..c52f7302ea60 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
@@ -112,15 +112,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Do the testing in Ada mode, since this is the language for which
 # this feature has been implemented, and where we know the language
 # has the concept of fixed-point types.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
index 81048e4c2e2a..a6e81e2407d3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
@@ -88,11 +88,11 @@  proc create_dwarf_assembly {source_file one_diridx} {
 }
 
 set asm_file [create_dwarf_assembly $srcfile2 false]
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set debug symtab-create 1"
 gdb_test_multiple "ptype bar" "" {
     -re -wrap "name_for_id = $objdir/$srcfile\r\n.*" {
@@ -106,9 +106,9 @@  gdb_test_multiple "ptype bar" "" {
 # Test whether gdb crashes in the case where the number of
 # directory indexes is only one.
 set asm_file [create_dwarf_assembly $srcfile3 true]
 if {[prepare_for_testing "failed to prepare" ${testfile}-one-diridx \
 	 [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "ptype bar" ".*" "do not crash with only one directory table entry"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
index 79030d01f95a..59a5ff6aaf92 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 
 standard_testfile .S main.c
 
 if { [build_executable "failed to prepare" ${testfile} \
 	  [list $srcfile $srcfile2] {nodebug}] } {
-    return -1
+    return
 }
 
 # We are trying to verify that the partial symtab to symtab expansion
 # for the debugging info hand-coded in our assembly file does not cause
 # the debugger to crash (infinite recursion).  To facilitate the test,
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
index 048ab99f2056..7efeec9b4891 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
@@ -57,13 +57,13 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto func]} {
-    return -1
+    return
 }
 
 gdb_test "p/x param" " = 0xdeadf00d"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
index a0325cfb71d3..a65a0e702bb9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
 	   object {nodebug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 gdb_test "ptype inherited" "type = class inherited .*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
index 7e7223cfcaf3..114252335dea 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
@@ -27,11 +27,11 @@  require is_x86_64_m64_target
 set basename "inline-break"
 
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
-    return -1
+    return
 }
 
 #
 # func1 is a static inlined function that is called once.
 # The result should be a single-location breakpoint.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index 3b712fb1ab3a..d8e8c0591476 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -140,15 +140,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] $build_options] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
 # the output of "info breakpoints" below will only contain a single breakpoint.
 delete_breakpoints
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index 831ed521fd53..c1faccb883aa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -129,15 +129,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] $build_options] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
 # the output of "info breakpoints" below will only contain a single breakpoint.
 delete_breakpoints
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 2854e8666184..7709fec14fc6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -284,15 +284,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # First we step through all of the functions until we get the 'kkk'.
 set patterns [list "main call aaa" \
 		  "aaa return" \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
index 8e218a9f8d09..7f9f9464aaf5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
@@ -21,11 +21,11 @@  standard_testfile .S -main.c
 
 set binfile_stripped ${binfile}-stripped
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list $srcfile2 $srcfile] {nodebug nopie}] } {
-    return -1
+    return
 }
 
 set break_at ""
 set test "info addr break_at"
 gdb_test_multiple $test $test {
@@ -50,11 +50,11 @@  if {$result != 0} {
 }
 
 gdb_load ${binfile_stripped}
 
 if {![runto "*${break_at}"]} {
-    return -1
+    return
 }
 
 set index [have_index $binfile_stripped]
 if {$index == "debug_names"} {
     # This test doesn't include .debug_aranges, so it doesn't cause CU
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index c6086e39d001..bf372fcd5637 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -118,15 +118,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug optimize=-O1}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
 # the output of "info breakpoints" below will only contain a single breakpoint.
 delete_breakpoints
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index 320d7188fe2e..07e9ef45be0d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -121,15 +121,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set patterns [list "main call foo" \
 		  "foo call bar" \
 		  "bar return global_var"]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
index 8bdd6128eed4..1454b1e14c46 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
@@ -130,11 +130,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 runto breakpoint_label
 
 # When using cc-with-debug-names, nothing will force the CU to be
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
index 14bcda616e91..b783bf7434e6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
@@ -43,11 +43,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[build_executable "failed to prepare" $testfile \
 	 [list $asm_file $srcfile] {nodebug}]} {
-    return -1
+    return
 }
 
 clean_restart
 
 gdb_test_no_output "maint set dwarf synchronous on"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp
index 0919177f313b..2e892350db57 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp
@@ -45,11 +45,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[build_executable "failed to prepare" $testfile \
 	 [list $asm_file $srcfile] {nodebug}]} {
-    return -1
+    return
 }
 
 clean_restart
 
 gdb_test_no_output "maint set dwarf synchronous on"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp
index 577b387d1269..a1aee9b2f473 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp
@@ -55,10 +55,10 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $asm_file $srcfile] {nodebug}]} {
-    return -1
+    return
 }
 
 # Regression test for PR32081.
 gdb_assert { ![regexp -nocase "error:" $gdb_file_cmd_msg] } "No Error message"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp
index 8f70def01a76..964868f8d3e1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp
@@ -72,15 +72,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto main]} {
-    return -1
+    return
 }
 
 gdb_test "p var1" " = 1"
 
 set re \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
index 7f927f11f6e0..99c7cf8c1113 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 set remote_dwarf_srcfile [gdb_remote_download host \
 			      ${srcdir}/${subdir}/${dwarf_srcfile}]
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
index 66dcdb8f9f91..c94a49f466bf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_remote_download host \
     ${srcdir}/${subdir}/${dwarf_srcfile}
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index 6791a46386cd..df29523bcaae 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -143,15 +143,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Check stepping through the out of order lines gives the experience
 # we expect; lines in the correct order, and stop at the correct
 # labels.Q
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index e20949ffee37..6d0c3795ea34 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -94,15 +94,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # First, break by address at a location we know is marked as not a
 # statement.  GDB should still correctly report the file and line
 # number.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
index feb6245c8c17..eb119d062c0c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
@@ -54,11 +54,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 			  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 runto_main
 
 # FAILing GDB did print: No symbol "testvar" in current context.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index 804bc07d640c..edc479134b1e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -108,15 +108,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "$srcfile:27"
 gdb_continue_to_breakpoint "bar1" "\[^\r\n\]*:27\r\n.*"
 
@@ -128,11 +128,11 @@  gdb_continue_to_breakpoint "bar2" "\[^\r\n\]*:41\r\n.*"
 
 gdb_test "n" "foo \\(2\\);" "bar2, 1st next"
 gdb_test "n" "foo \\(4\\);" "bar2, 2nd next"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "bar1_label_3"
 setup_kfail "gdb/nnnnn" *-*-*
 gdb_continue_to_breakpoint "bar1_label_3" "bar1 \\(\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index a243b6ad01a9..e45ca986c159 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -27,15 +27,15 @@  standard_testfile .S
 set executable ${testfile}
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile c++ $testfile-main.cc {c++ nodebug} \
 	      $srcfile {}]]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # main is not provided by DWARF.
 gdb_test_no_output "set language c++"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
index aaef7478f412..b2f7a42c7302 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
@@ -44,14 +44,14 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set breakpoint_at_missing_lineno_set [gdb_breakpoint "1" no-message]
 gdb_assert { !$breakpoint_at_missing_lineno_set  }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
index fe700ccee8d5..8f582f6e752f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
@@ -24,11 +24,11 @@  set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
 standard_testfile .S
 
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 	 ${additional_flags}]} {
-    return -1
+    return
 }
 
 # The "info func" code tries to expand the corresponding symtab when a
 # minsym is found; and if this works, it omits the minsym from the
 # results.  However, this test also does not include .debug_aranges,
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
index 2819895b55ad..74a5ea90b130 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
@@ -39,11 +39,11 @@  Dwarf::assemble $asm_file {
 
 # Don't use prepare_for_testing here as we want to manually run the
 # file command (so we can check its output).
 if {[build_executable "failed to build executable" $testfile \
 	 [list $srcfile $asm_file] {nodebug quiet}]} {
-    return -1
+    return
 }
 
 set host_binfile [gdb_remote_download host $binfile]
 
 # Restart with no executable.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
index 6624ce4cdfa7..28d16d535a96 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
@@ -19,11 +19,11 @@  require dwarf2_support
 
 standard_testfile .S
 
 # First try referencing DW_AT_frame_base which is not defined.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 # C language would just naively print:
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-multiple-debug-info.exp b/gdb/testsuite/gdb.dwarf2/dw2-multiple-debug-info.exp
index ada547a0440c..d8892be95d0e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-multiple-debug-info.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-multiple-debug-info.exp
@@ -26,11 +26,11 @@  lappend opts dwarf5
 lappend opts c++
 lappend opts additional_flags=-fdebug-types-section
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" object \
 	  $opts] != "" } {
-    return -1
+    return
 }
 
 clean_restart $::testfile
 
 gdb_test "ptype a" "type = class sp1::A .*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
index 8722be6bf09d..34f911eca126 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
@@ -53,10 +53,10 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing ${testfile}.exp ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "ptype '(anonymous namespace)::v'" "type = myint"
 gdb_test "p/d '(anonymous namespace)::v'" " = 1"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp
index 53ef496ea4ab..b3b9ea034fe8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp
@@ -14,11 +14,11 @@ 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 standard_testfile .c main.c
 
 if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2"]} {
-    return -1
+    return
 }
 
 set cmd "p var"
 
 set re \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
index 230d39a7ed51..962e6ba2a512 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
@@ -209,11 +209,11 @@  Dwarf::assemble $asm_file {
 	}
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # Symbols have the form: {file,main}_loc{addr,empty,no}_{,un}resolvable
 # file: Symbol DIE is placed in DW_TAG_compile_unit.
 # main: Symbol DIE is placed in DW_TAG_subprogram.
@@ -271,11 +271,11 @@  proc file_symbols {type} {
 }
 
 file_symbols no-run
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 file_symbols in-main
 
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
index 3cb4cb4107f9..a7d32a63d8b9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
@@ -27,11 +27,11 @@  set binfile_inner ${binfile}-inner.x
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile_outer}" "${binfile_outer}" \
       object {}] != ""
      || [gdb_compile "${srcdir}/${subdir}/${srcfile_inner}" "${binfile_inner}" \
       object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $executable_outer
 
 set host_binfile_inner [gdb_remote_download host $binfile_inner]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
index eb5b67222bb5..852eb5b5e04c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
@@ -21,11 +21,11 @@  require dwarf2_support
 
 standard_testfile .S main.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $srcfile2] {nodebug}] } {
-    return -1
+    return
 }
 
 # Additional test to verify the referenced CU is not aged out.
 gdb_test_no_output "maintenance set dwarf max-cache-age 0"
 
@@ -33,9 +33,9 @@  gdb_test "p array1" " = 1"
 gdb_test "p array2" " = 2" "array2 using DW_OP_call2"
 gdb_test "p array3" " = 3" "array3 using DW_OP_call4"
 
 # Location lists need PC.
 if {![runto_main]} {
-    return -1
+    return
 }
 gdb_test "p arraynoloc" " = <optimized out>"
 gdb_test "p arraycallnoloc" {Asked for position 0 of stack, stack only has 0 elements on it\.}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
index fa10f6b6c3cc..92fd7f71fb99 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
@@ -22,15 +22,15 @@  require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 require is_x86_64_m64_target
 
 if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "breakpt"
 
 # Change the radix, making it easier to spot 0xdeadbeef in output.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
index 196dd822cc81..0aa06852ac33 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
@@ -22,11 +22,11 @@  set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
 	   object {nodebug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 gdb_test "p/x stack2" " = 0x1"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
index ef5e79dd68fd..7951d2514445 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
@@ -241,10 +241,10 @@  proc do_mi_test {} {
 	    "throw error, dereference ptr to access pointer member "
     }
 }
 
 if { [build_test_program] == -1 } {
-    return -1
+    return
 }
 
 do_console_test
 do_mi_test
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index 63fe8bfaba72..3d790f1d4af8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -74,15 +74,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set test "END with address 1 eliminated"
 gdb_test_multiple "maint info line-table \\b$srcfile$" $test {
     -re -wrap "END *0x0*1 *$hex *Y *\r\n.*" {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
index 9e4ea48c2470..cdd3923cb2c1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
@@ -19,15 +19,15 @@  require dwarf2_support
 
 standard_testfile .S -main.c
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list $srcfile2 $srcfile] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto f]} {
-    return -1
+    return
 }
 
 # FAIL was printing:
 # [...] in f (bad=)
 gdb_test "frame" { f \(bad=<error reading variable: Asked for position 0 of stack, stack only has 0 elements on it\.>, good=23\)}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
index 23d233331bfa..8f50ab7b9c2e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
@@ -20,11 +20,11 @@  require dwarf2_support
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
index 0bd6c0398638..acb9f3bb6006 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
@@ -71,11 +71,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # Don't runto main here, otherwise the following doesn't
 # function as regression test for PR30369.
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
index 76cf6f3309f9..294e7c8bf45f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
@@ -78,15 +78,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set prologue_end_line [gdb_get_line_number "main assign o"]
 gdb_test "frame" ".*main \\\(\\\) at \[^\r\n\]*:$prologue_end_line\r\n.*"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index f2271b54b494..0b792f8e4cf6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -116,15 +116,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Make use of the line numbers we faked in the .debug_line table above.
 gdb_test "info line main" \
     "Line 11 of .* starts at address .* and ends at .*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
index cbab1a8ede57..924752ccd65e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
@@ -65,14 +65,14 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto foo]} {
-    return -1
+    return
 }
 
 gdb_test "show language" \
     "The current source language is \"auto; currently c\"\."
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
index b6486247620e..ea5ef93c014b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
@@ -29,11 +29,11 @@  standard_testfile -main.c .c -dw.S
 # would do, but since we already have it specifically for this
 # testcase, might as well use that.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list ${srcfile} ${srcfile2}]] } {
-    return -1
+    return
 }
 
 set asm_file [standard_output_file $srcfile3]
 Dwarf::assemble $asm_file {
     global srcdir subdir srcfile srcfile2
@@ -100,19 +100,19 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [build_executable "failed to prepare" ${testfile} \
 	  [list $srcfile $srcfile2 $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 clean_restart
 
 gdb_load_no_complaints $binfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Generate backtrace from baz, that visits the hole in the addrmap.  If
 # the hole is there in the symbol table, but not the partial symbol table,
 # we run into:
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index fa8a0e7d421c..eb4187f151cf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -31,11 +31,11 @@  standard_testfile main.c .c -dw.S
 # would do, but since we already have it specifically for this
 # testcase, might as well use that.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list ${srcfile} ${srcfile2}]] } {
-    return -1
+    return
 }
 
 set asm_file [standard_output_file $srcfile3]
 Dwarf::assemble $asm_file {
     global srcdir subdir srcfile srcfile2
@@ -111,18 +111,18 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [build_executable "failed to prepare" ${testfile} \
 	  [list $srcfile $srcfile2 $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 clean_restart
 gdb_load_no_complaints $binfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # "someothername" should be put into the partial symbol table, but
 # there was a bug causing functions using DW_AT_ranges not to be.
 # Note we use a name that is very different from the linkage name, in
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
index 3ef8589f7bad..0ff1865da710 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
@@ -42,11 +42,11 @@  set executable ${testfile}
 if { [prepare_for_testing_full "failed to prepare" \
 	  [list $testfile {} \
 	       $srcfile [concat $flags {nodebug}]  \
 	       $srcfile2 {nodebug} \
 	       $srcfile3 {debug}]] == -1 } {
-    return -1
+    return
 }
 
 # First try referencing DW_AT_frame_base which is not defined.
 if {[runto func_nofb]} {
     gdb_test "p func_nofb_var" {Could not find the frame base for "func_nofb".} "func_nofb print"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
index 10a801b2b631..b9a8cbbdb311 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
@@ -21,16 +21,16 @@  require dwarf2_support
 require is_x86_64_m64_target
 
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie}] } {
-    return -1
+    return
 }
 
 if {![runto stop_frame]} {
     perror "Failed to stop in stop_frame"
-    return -1
+    return
 }
 
 gdb_test "bt" "#0  (${::hex} in )?stop_frame \[^\r\n\]*\r\n#1  \[^\r\n\]*first_frame \[^\r\n\]*\r\n#2  \[^\r\n\]*main\[^\r\n\]*" \
     "backtrace from stop_frame"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
index 29693c0c0376..c4aac0b4818b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
@@ -54,11 +54,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 			  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 runto_main
 
 # Variable 'bregx' needs to be inside main as for global symbols GDB does not
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
index 98d80e7d6376..e0c334f80cc6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
@@ -26,13 +26,13 @@  if { [test_compiler_info clang*] } {
     lappend opts [list {additional_flags=-fno-integrated-as}]
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile] \
 	 $opts]} {
-    return -1
+    return
 }
 
 if {![runto foo]} {
-    return 0
+    return
 }
 gdb_test "continue" "$hex in foo \\(\\)"
 gdb_test "where" "#0 +$hex in foo \\(\\)\r\n#1 +$hex in _start \\(\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
index 15b53dc1a1d1..be138b896938 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
@@ -23,9 +23,9 @@  require is_x86_64_m64_target
 
 standard_testfile .S
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {nodebug nopie}]} {
-    return -1
+    return
 }
 
 gdb_test "ptype f" "int \\(char \\\* restrict\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
index a2864b1b0ce0..541e087c23f2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
@@ -18,11 +18,11 @@  load_lib dwarf.exp
 require dwarf2_support
 
 standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 # Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
index c7ffd9224e9d..6812d5b06b8f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
@@ -26,11 +26,11 @@  require is_x86_64_m64_target
 
 standard_testfile .S
 set csrcfile ${testfile}.c
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {nodebug nopie}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
index 582c343ad832..276793325d6d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
@@ -45,11 +45,11 @@  if {[is_ilp32_target]} {
 
 if { [build_executable ${testfile}.exp ${executable} \
 	  "${testfile}.c ${testfile}.S" \
 	  [list additional_flags=-DINLINED \
 		additional_flags=-DPTRBITS=$ptrbits]] == -1 } {
-    return -1
+    return
 }
 
 # We need those symbols global to access them from the .S file.
 set test "strip stub symbols"
 set objcopy_program [gdb_find_objcopy]
@@ -66,11 +66,11 @@  if {$result != 0} {
 pass $test
 
 clean_restart $executable
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "func"
 gdb_continue_to_breakpoint "func"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp b/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp
index 2ab89b132f39..d3bafd4abf16 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp
@@ -150,15 +150,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if { ![runto_main] } {
-    return -1
+    return
 }
 
 # Check the END markers using 'maint info line-table'.
 # EXPECTED_SYMTAB is the basename of the source file being checked.
 # TEST_SPEC is a list of lists.  Each inner list if a pair made of a
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index d76dea6f0805..a3bde43c62be 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -18,11 +18,11 @@  load_lib dwarf.exp
 require dwarf2_support
 
 standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 clean_restart
 
 gdb_test_no_output "maint set dwarf synchronous on"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp
index 76ca8ddc7f17..9ab8e1c953a9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp
@@ -178,15 +178,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" "${::testfile}" \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint bar
 gdb_continue_to_breakpoint "continue to bar line 1" \
     ".*bar line 1\[^\r\n\]+"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp
index 506057df7322..33697ae9e4a3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp
@@ -161,15 +161,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" "${::testfile}" \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint bar
 gdb_continue_to_breakpoint "continue to bar line 1" \
     ".*bar line 1\[^\r\n\]+"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index c381229397be..285cd00bfc53 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -97,15 +97,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Step into bar.
 gdb_breakpoint "bar"
 gdb_continue_to_breakpoint "bar"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
index 6f3a867aaf60..7dbc94f57ca6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 
 standard_testfile .S
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_test "p a_string" " = \"hello world!\\\\n\""
 gdb_test "ptype a_string" "type = const char \\\[14\\\]"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
index 9b1ccea00f66..0b2d7f64f754 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
@@ -89,11 +89,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
 	  "${asm_file} ${srcfile}" {}] } {
-    return -1
+    return
 }
 
 # Check that no symtabs are expanded.
 set test "no symtabs expanded"
 if { [readnow] } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
index 7a1e4fb35b21..7c7c2a20432c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
@@ -61,18 +61,18 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
 	  "${asm_file} ${srcfile}" {}] } {
-    return -1
+    return
 }
 
 # Check that no symtabs are expanded.
 set test "no symtabs expanded"
 if { [readnow] } {
     unsupported $test
-    return -1
+    return
 }
 gdb_test_no_output "maint info symtabs" $test
 
 # Expand dw2-symtab-includes.h symtab
 gdb_test "maint expand-symtab dw2-symtab-includes.h"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-tu-dwarf-4-5.exp b/gdb/testsuite/gdb.dwarf2/dw2-tu-dwarf-4-5.exp
index 7493b2cbc554..359c8e128339 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-tu-dwarf-4-5.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-tu-dwarf-4-5.exp
@@ -41,11 +41,11 @@  lappend lopts additional_flags=-nostdlib
 
 if { [prepare_for_testing_full "failed to prepare" \
 	 [list $testfile $lopts \
 	      $srcfile $opts \
 	      $srcfile2 $opts2]] } {
-    return -1
+    return
 }
 
 gdb_test_no_output \
     [join \
 	 [list \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
index 88765d4f513a..8dac3949c5f6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
@@ -21,15 +21,15 @@  require dwarf2_support
 
 # This test can only be run on x86-64 targets.
 require is_x86_64_m64_target
 
 if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug nopie}]} {
-    return -1
+    return
 }
 
 if {![runto "stop_frame"]} {
-    return -1
+    return
 }
 
 # If test is compiled with clang, GDB would display absolute path.
 # This command keeps output consistent across toolchains.
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
index 06ce7a764785..1034ab5faf42 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
@@ -21,15 +21,15 @@  require dwarf2_support
 set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
 if { [prepare_for_testing "failed to prepare" "dw2-unresolved" \
 	{dw2-unresolved-main.c dw2-unresolved.S} \
 	[list nodebug $additional_flags]] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # This testcase tests LOC_UNRESOLVED works right.
 
 gdb_breakpoint "*extern_block_start"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
index 7acfb714f3df..fe0974fd8f4f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
@@ -91,15 +91,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 "${asm_file} ${srcfile} ${srcfile2}" {}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 foreach f {foo bar foo2} {
     # Print the function type.  Return type should be stub type, which is printed
     # as void.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
index 43cdfccb1aef..b3bb1ed0f8c9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
@@ -40,11 +40,11 @@  set asm_file [standard_output_file $srcfile2]
 #
 # For that, we ask GDB by debugging our test program.  Any program
 # would do, but since we already have one specifically for this
 # testcase, might as well use that.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 set int_size [get_sizeof "int" -1]
 
 # Rebuild the test binary with the single field within the structure
 # renamed to FIELD_NAME, then test that we can access the field
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
index 04ea209ddd7f..68d25f70375e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
@@ -23,11 +23,11 @@  load_lib dwarf.exp
 require dwarf2_support
 
 standard_testfile .c -dw.S
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
     global srcfile
@@ -84,15 +84,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Print the type of global_var.  This type information is entirely
 # fictional, it only exists in the DWARF, but it contains lots of nice
 # field names, all of which are stored in the .debug_str section.
@@ -120,22 +120,22 @@  set debug_str_section "${host_binfile}-debug-str"
 set args "--dump-section .debug_str=${debug_str_section} $host_binfile"
 set result [remote_exec host "[gdb_find_objcopy] $args"]
 set status [lindex $result 0]
 set output [lindex $result 1]
 if { $status == 0 && ![string equal $output ""] } {
-    return -1
+    return
 }
 
 # Now copy the executable, and remove the .debug_str section.  This
 # creates an executable with an invalid DWARF configuration.  GDB
 # should give an error when trying to read the debug information from
 # this executable.
 set binfile_no_debug_str "${host_binfile}-no-debug-str"
 set args "--remove-section .debug_str $host_binfile ${binfile_no_debug_str}"
 if {[run_on_host "objcopy" [gdb_find_objcopy] "$args"]} {
     perror "failed to run objcopy"
-    return -1
+    return
 }
 
 # Restart GDB, but don't load an executable.  When we do load the
 # executable we're going to get an error, which we check for below.
 clean_restart
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
index bbe74955e44b..04a2aa06ea93 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
@@ -19,11 +19,11 @@  require dwarf2_support
 
 standard_testfile .S main.c
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $srcfile2] {nodebug}]} {
-    return -1
+    return
 }
 
 proc test { } {
     # FAIL was: = (int *) 0x0
     # Such DIE record can be produced using: gcc -fdata-sections -Wl,-gc-sections
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index d12b68311071..f02d82c3f220 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -62,13 +62,13 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "$srcfile:27" message
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
index acc5c115d8e4..5d31a05b06be 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
@@ -86,15 +86,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # At one point this would trigger a divide by zero inside GDB.  Now we
 # just get an error message.
 gdb_test "print get_bar ()" "could not determine alignment of type"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
index 26e8ffaba75e..bec85887e03d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
@@ -52,15 +52,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "func_demangled_test"
 gdb_continue_to_breakpoint "func_demangled_test"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
index 15a01b616f32..b02f71422c0a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
@@ -19,11 +19,11 @@  require dwarf2_support
 
 standard_testfile .S
 set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
-    return -1
+    return
 }
 
 save_vars { GDBFLAGS } {
     set GDBFLAGS "$GDBFLAGS --readnow"
     clean_restart $executable
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
index cf731e3d1108..bb0769050bcd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp
@@ -24,18 +24,18 @@  include_file dw4-sig-types.h
 # we let that be the test of whether the target supports it.
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list $srcfile $srcfile2] \
 	  {debug c++ additional_flags=-gdwarf-4 additional_flags=-fdebug-types-section}] } {
-    return -1
+    return
 }
 
 # Stress test gdb's handling of cached comp units, disable the cache.
 gdb_test_no_output "maint set dwarf max-cache-age 0"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Bring symtab for myset into gdb.
 gdb_test "p myset" ".*"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp b/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp
index 8429af8574d5..0f9b8385bed6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp
@@ -22,15 +22,15 @@  standard_testfile .cc
 # we let that be the test of whether the target supports it.
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  $srcfile {debug c++ additional_flags=-gdwarf-4 \
 			additional_flags=-fdebug-types-section}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "ptype X" "type = struct X {.*"
 gdb_test "ptype Y" "type = struct Y {.*"
 gdb_test "ptype Z" "type = struct Z {.*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp
index 9e47cdac5fc1..02f1777bdd58 100644
--- a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp
@@ -23,15 +23,15 @@  standard_testfile .cc
 # Since we pass an explicit -gdwarf-5 to the compiler,
 # we let that be the test of whether the target supports it.
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  $srcfile {debug c++ dwarf5 additional_flags=-O0}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "break-here"]
 gdb_continue_to_breakpoint "break-here" ".* break-here .*"
 
diff --git a/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp b/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp
index 4ca793059ba3..9e203809e844 100644
--- a/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp
@@ -14,15 +14,15 @@ 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 standard_testfile
 
 if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
-    return -1
+    return
 }
 if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} {
     unsupported "testsuite run does not produce dwp files"
-    return 0
+    return
 }
 
 # Note: the procedure gdb_gnu_strip_debug will produce an executable called
 # ${binfile}, which is just like the executable ($binfile) but without
 # the debuginfo. Instead $binfile has a .gnu_debuglink section which contains
@@ -30,11 +30,11 @@  if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} {
 # gdb.base/ subdirectory.
 
 if {[gdb_gnu_strip_debug $binfile$EXEEXT]} {
     # check that you have a recent version of strip and objcopy installed
     unsupported "cannot produce separate debug info files"
-    return -1
+    return
 }
 
 clean_restart "$testfile"
 
 gdb_test "ptype main" {type = int \(int, char \*\*\)}
diff --git a/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp b/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp
index fa1ed877d7e7..fb1202afae9f 100644
--- a/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp
@@ -16,33 +16,33 @@ 
 standard_testfile
 
 remote_file host delete [standard_output_file ${testfile}.dwp]
 if {[remote_file host exists [standard_output_file ${testfile}.dwp]]} {
     unsupported "dwp file cannot be deleted"
-    return 0
+    return
 }
 if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
-    return -1
+    return
 }
 if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} {
     unsupported "testsuite run does not produce dwp files"
-    return 0
+    return
 }
 
 set thelink "${testfile}-thelink"
 
 remote_file host delete [standard_output_file ${thelink}]
 remote_file host delete [standard_output_file ${thelink}.dwp]
 # file link is only Tcl 8.4+.
 remote_exec host "ln -sf ${testfile} [standard_output_file $thelink]"
 if {![remote_file host exists [standard_output_file $thelink]]} {
     unsupported "host does not support symbolic links (binary symlink is missing)"
-    return 0
+    return
 }
 if {[remote_file host exists [standard_output_file $thelink.dwp]]} {
     unsupported "host does not support symbolic links (we tried to delete a file and it is still there)"
-    return 0
+    return
 }
 
 clean_restart "$testfile"
 
 set main_type_re [string_to_regexp "type = int (int, char **)"]
@@ -55,15 +55,15 @@  gdb_test "ptype main" $main_type_re "binary symlink, dwp default"
 
 gdb_exit
 remote_exec host "mv -f [standard_output_file ${testfile}.dwp] [standard_output_file ${thelink}.dwp]"
 if {[remote_file host exists [standard_output_file ${testfile}.dwp]]} {
     unsupported "host does not support symbolic links (binary symlink exists)"
-    return 0
+    return
 }
 if {![remote_file host exists [standard_output_file ${thelink}.dwp]]} {
     unsupported "host does not support symbolic links (dwp symlink is missing)"
-    return 0
+    return
 }
 
 clean_restart "$testfile"
 
 gdb_test "ptype main" \
@@ -124,10 +124,10 @@  remote_exec host "ln -sf ${dwp_bin_dir}/${dwp_real_binary} ${dwp_symlink_dir}/${
 remote_exec host "ln -sf ${dwp_dwp_dir}/${dwp_real_dwp} ${dwp_symlink_dir}/${dwp_symlink_dwp}"
 
 clean_restart "${dwp_symlink_dir}/${dwp_symlink_binary}"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test {print argv[0]} "/${dwp_symlink_binary}\"" \
     "separate executable/dwp symlinks"
diff --git a/gdb/testsuite/gdb.dwarf2/dwz-many.exp b/gdb/testsuite/gdb.dwarf2/dwz-many.exp
index 551dd070958d..f11fd54c5909 100644
--- a/gdb/testsuite/gdb.dwarf2/dwz-many.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwz-many.exp
@@ -40,11 +40,11 @@  if {[prepare_for_testing_full "failed to prepare" \
 	 [list \
 	      $testfile {debug} \
 	      $srcfile {nodebug} \
 	      $asm_file {nodebug} \
 	      $srcfile3 {debug}]]} {
-    return -1
+    return
 }
 
 set linenr [gdb_get_line_number "return 0" $srcfile3]
 
 for {set i 0} {$i < 100} {incr i} {
diff --git a/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp b/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
index 4d074fb7464f..db497636d64a 100644
--- a/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
@@ -54,11 +54,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $asm_file $srcfile] {nodebug}] } {
-    return -1
+    return
 }
 
 set cmd "p the_int"
 set re \
     [string_to_regexp \
diff --git a/gdb/testsuite/gdb.dwarf2/dwz.exp b/gdb/testsuite/gdb.dwarf2/dwz.exp
index c907a64f53f8..96dab6cf9309 100644
--- a/gdb/testsuite/gdb.dwarf2/dwz.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwz.exp
@@ -79,14 +79,14 @@  Dwarf::assemble $asm_file {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "p other_int" " = 99"
 gdb_test "p the_int" " = 23"
diff --git a/gdb/testsuite/gdb.dwarf2/dwznolink.exp b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
index e6c6ce6005d4..898ae1637f50 100644
--- a/gdb/testsuite/gdb.dwarf2/dwznolink.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
@@ -44,11 +44,11 @@  Dwarf::assemble $asm_file {
 
 # We can't use prepare_for_testing here because we need to check the
 # 'file' command's output.
 if {[build_executable $testfile.exp $testfile \
 	 [list $srcfile $asm_file] {nodebug quiet}]} {
-    return -1
+    return
 }
 
 clean_restart
 gdb_test "file -readnow $binfile" \
     "could not find supplementary DWARF file" \
diff --git a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
index b4ebd7002fc0..75eb35ec9a57 100644
--- a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
+++ b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
@@ -41,11 +41,11 @@  standard_testfile .c -dw.S
 set flags {}
 lappend flags debug
 lappend_include_file flags $srcdir/lib/attributes.h
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $flags] } {
-    return -1
+    return
 }
 
 with_shared_gdb {
     set func_info_vars [get_func_info main $flags]
 
@@ -124,15 +124,15 @@  set flags {}
 lappend flags {nodebug}
 lappend_include_file flags $srcdir/lib/attributes.h
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list $srcfile $asm_file] $flags] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "marker_label"
 gdb_continue_to_breakpoint "stop at marker_label"
 gdb_test "ptype dyn_object" "type = integer, allocatable \\(:\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp b/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp
index c87358ae947f..33ad0de8691f 100644
--- a/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp
@@ -86,11 +86,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 gdb_test "print value" \
     [string_to_regexp " = (disc => 3, nums => (7, 11, 13))"]
diff --git a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
index b7266db2affd..1f759c31dedb 100644
--- a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
@@ -25,11 +25,11 @@  standard_testfile .c -dw.S
 # For that, we ask GDB by debugging our dynarr-ptr.c program.
 # Any program would do, but since we already have dynarr-ptr.c
 # specifically for this testcase, might as well use that.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
@@ -119,15 +119,15 @@  Dwarf::assemble $asm_file {
 # program using our debug info instead of the info generated by
 # the compiler.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language ada"
 
 # foo.three_ptr.all
diff --git a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
index 6cffbd377933..31eb5f6a8396 100644
--- a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
@@ -70,11 +70,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # Expand cu1.  This will enqueue cu2.
 set cu1_expanded 0
 gdb_test_multiple "ptype foo" "" {
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type-c++.exp b/gdb/testsuite/gdb.dwarf2/enum-type-c++.exp
index 392632545621..827fe67bc08b 100644
--- a/gdb/testsuite/gdb.dwarf2/enum-type-c++.exp
+++ b/gdb/testsuite/gdb.dwarf2/enum-type-c++.exp
@@ -22,11 +22,11 @@  require dwarf2_support
 
 standard_testfile main.c .cc
 
 if { [prepare_for_testing "failed to prepare" $testfile \
 	  [list $srcfile $srcfile2] {debug c++}] } {
-    return -1
+    return
 }
 
 require {string equal [have_index $binfile] ""}
 
 set lines [gdb_get_lines "maint print objfiles"]
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type.exp b/gdb/testsuite/gdb.dwarf2/enum-type.exp
index 7a37608670ec..5af889a35441 100644
--- a/gdb/testsuite/gdb.dwarf2/enum-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/enum-type.exp
@@ -102,11 +102,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "print sizeof(enum E)" " = 4"
 
 gdb_test "ptype enum EU" \
diff --git a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
index 4b87c48ad4a3..e173e728a109 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
@@ -108,18 +108,18 @@  Dwarf::assemble $asm_file {
 # ASM_FILE we split out the debug information into the dwo file.
 set object_file [standard_output_file ${testfile}.o]
 if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
 	  [list $asm_file {nodebug split-dwo} ${object_file}] \
 	  [list $srcfile {nodebug}]] } {
-    return -1
+    return
 }
 
 # Now we can start GDB.
 clean_restart ${testfile}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Print the type of global_var.  This type information is entirely
 # fictional, it only exists in the DWARF.  If we don't have the DWARF
 # information then there's no way we can print this.
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index d1abf6c9eb7b..28507eac9ba1 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -30,17 +30,17 @@  set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
 	 [list $srcfile \
 	      [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
-    return -1
+    return
 }
 
 clean_restart $::testfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Do a few basic things to verify we're finding the DWO debug info.
 
 gdb_test "ptype main" "type = int \\(\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
index 30e7d3913332..04072731754c 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
@@ -36,17 +36,17 @@  set dwo [standard_output_file "${testfile}.dwo"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
 	 {nodebug pie} \
 	 [list $srcfile \
 	      [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
-    return -1
+    return
 }
 
 clean_restart $::testfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Verify gdb can find argc.
 
 gdb_test "p argc" " = 1"
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index f081ea007734..6747192b1644 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -30,17 +30,17 @@  set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
 	 [list $srcfile \
 	      [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
-    return -1
+    return
 }
 
 clean_restart $::testfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Verify gdb can find argc.
 
 gdb_test "p argc" " = 1"
diff --git a/gdb/testsuite/gdb.dwarf2/fission-mix.exp b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
index 7a4cfe5b22cc..be7916c558a9 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-mix.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
@@ -24,17 +24,17 @@  include_file fission-mix.h
 set objfile [standard_output_file ${testfile}.o]
 set objfile2 [standard_output_file ${testfile}2.o]
 
 # Compile fission-mix.c without Fission and fission-mix-2.c with Fission.
 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} $objfile object {debug}] != "" } {
-    return -1
+    return
 }
 if { [gdb_compile ${srcdir}/${subdir}/${srcfile2} $objfile2 object {debug additional_flags=-gsplit-dwarf}] != "" } {
-    return -1
+    return
 }
 if {[gdb_compile "$objfile $objfile2" $binfile executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart $::testfile
 
 gdb_test "break -q main" "Breakpoint .*"
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index f40e2f059465..0621069174bc 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -198,17 +198,17 @@  set obj1 [standard_output_file "${testfile}-1-dw.o"]
 set obj2 [standard_output_file "${testfile}-2-dw.o"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
 	 [list $asm_file_1 [list nodebug split-dwo] $obj1] \
 	 [list $asm_file_2 [list nodebug split-dwo] $obj2] \
 	 [list $srcfile  [list nodebug]]]} {
-    return -1
+    return
 }
 
 clean_restart $::testfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Do a few basic things to verify we're finding the DWO debug info.
 
 gdb_test "ptype main" "type = int \\(\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
index e246fac17b4c..6fe3e0b216b3 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
@@ -105,18 +105,18 @@  Dwarf::assemble $asm_file {
 # ASM_FILE we split out the debug information into the dwo file.
 set object_file [standard_output_file ${testfile}.o]
 if { [build_executable_and_dwo_files "${testfile}.exp" ${testfile} {nodebug} \
 	  [list $asm_file {nodebug split-dwo} ${object_file}] \
 	  [list $srcfile {nodebug}]] } {
-    return -1
+    return
 }
 
 # Now we can start GDB.
 clean_restart ${testfile}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Print the type of global_var.  This type information is entirely
 # fictional, it only exists in the DWARF.  If we don't have the DWARF
 # information then there's no way we can print this.
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
index b7e6cf2de65c..7fa70bcafe92 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
@@ -38,11 +38,11 @@  set dwo_options $options
 lappend dwo_options split-dwo
 lappend dwo_options additional_flags=-DDWO=\"$dwo\"
 
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \
 	 [list $srcfile $dwo_options $obj]]} {
-    return -1
+    return
 }
 
 # Load FILENAME, perform some basic tests to confirm that the debug
 # information has been found, then unload FILENAME.
 proc run_test { filename } {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp b/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
index 5d94473c5ad6..47fc2fbd1dee 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
@@ -145,11 +145,11 @@  Dwarf::assemble $asm_file {
 
 set object_file [standard_output_file ${testfile}.o]
 if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
 	  [list $asm_file {nodebug split-dwo} ${object_file}] \
 	  [list $srcfile {nodebug}]] } {
-    return -1
+    return
 }
 
 proc run_test { testfile } {
     clean_restart ${testfile}
 
diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp
index 8169fa5e2c6b..ee35fdf0f058 100644
--- a/gdb/testsuite/gdb.dwarf2/formdata16.exp
+++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp
@@ -21,11 +21,11 @@  require dwarf2_support
 standard_testfile main.c -dw.S
 
 # We need to know the endianess in order
 # to write some of the debugging info we'd like to generate.
 if {[prepare_for_testing "failed to prepare for endianness test" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 set endianness [get_endianness]
 
 set high "0x123456789abcdef0"
@@ -82,11 +82,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 			  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "p/x xxx" " = 0x123456789abcdef00fedcba987654321"
 gdb_test "p xxx" "= 24197857203266734864629346612071973665"
 gdb_test "p/x yyy" " = 0xfedcba987654321"
diff --git a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
index b96740384fd9..925872bc2c89 100644
--- a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
+++ b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
@@ -25,11 +25,11 @@  standard_testfile .c -dw.S
 # For that, we ask GDB by debugging our dynarr-ptr.c program.
 # Any program would do, but since we already have dynarr-ptr.c
 # specifically for this testcase, might as well use that.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
@@ -136,15 +136,15 @@  Dwarf::assemble $asm_file {
 # program using our debug info instead of the info generated by
 # the compiler.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language fortran"
 
 gdb_test "info functions test_1_func" \
diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
index ebcf375c5413..eb1d8a2df58f 100644
--- a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
@@ -73,11 +73,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[build_executable "failed to build executable" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 set eol "\r\n"
 set ws "\[ \t\]"
 
diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec.exp b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
index af55d7e2eb77..fd7d008adb34 100644
--- a/gdb/testsuite/gdb.dwarf2/forward-spec.exp
+++ b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
@@ -69,11 +69,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 require {string equal [have_index $binfile] ""}
 
 set re_ws "\[ \t\]"
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
index 6245fbe66bd6..6d3bf29c1b10 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
@@ -37,22 +37,22 @@  with_test_prefix non-symlink {
 }
 
 # Regenerate exec without index.
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list ${srcfile}]] } {
-    return -1
+    return
 }
 
 set symlink [file dirname $binfile]/symlink
 
 if { ![file exists $symlink] } {
     file link -symbolic $symlink $binfile
 }
 
 if { [ensure_gdb_index $symlink] == -1 } {
     fail "Unable to call gdb-add-index with a symlink to a symfile"
-    return -1
+    return
 }
 
 # Ok, we have a copy of $binfile with an index.
 # Restart gdb and verify the index was used.
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
index faf1aa7c5a02..4d91987bbb83 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
@@ -20,16 +20,16 @@  require dwarf2_support
 
 standard_testfile main.c
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list ${srcfile}]] } {
-    return -1
+    return
 }
 
 if { [ensure_gdb_index $binfile] == -1 } {
     untested "error adding gdb index"
-    return -1
+    return
 }
 
 # Ok, we have a copy of $binfile with an index.
 # Restart gdb and verify the index was used.
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp
index c964988bc88d..351abc225d75 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp
@@ -22,11 +22,11 @@  lappend opts debug
 lappend opts c++
 lappend opts additional_flags=-std=c++11
 
 if {[prepare_for_testing "failed to prepare" "${testfile}" \
 	 [list ${srcfile}] $opts]} {
-    return -1
+    return
 }
 
 # The bug was that gdb would crash when saving.
 set output_dir [host_standard_output_file ""]
 set cmd "save gdb-index"
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
index f0d37362bacf..50f08b59e281 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
@@ -17,11 +17,11 @@  load_lib dwarf.exp
 
 standard_testfile main.c
 
 if {[prepare_for_testing "failed to prepare" "${testfile}" \
 	 [list ${srcfile}] {nodebug}]} {
-    return -1
+    return
 }
 
 set have_index [have_index $binfile]
 set have_index_re \
     [list \
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-tilde.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-tilde.exp
index e22fc606ca6f..0930e1010432 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-tilde.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-tilde.exp
@@ -33,19 +33,19 @@  set home $::env(HOME)
 
 # Check that FULL_DIR is within the $HOME directory.  If it's not, then
 # that's fine, but we can't test tilde expansion in this case.
 if { [string compare -length [string length $home] $full_dir $home] != 0 } {
     unsupported "test not run within home directory"
-    return -1
+    return
 }
 
 # Convert the $HOME prefix in to ~.
 set dir "~[string range $full_dir [string length $home] end]"
 
 # Build the test executable.
 if { [prepare_for_testing "failed to prepare" "${testfile}" ${srcfile}] } {
-    return -1
+    return
 }
 
 # Start GDB and load in the executable.
 clean_restart ${::testfile}
 
@@ -71,16 +71,16 @@  gdb_test_multiple "maint print objfile $binfile" "check we can generate an index
     }
 }
 
 if { $has_index } {
     unsupported "already have an index"
-    return -1
+    return
 }
 
 if { !$can_dump_index } {
     unsupported "lacks debug information needed to dump index"
-    return -1
+    return
 }
 
 # Generate an index file.
 gdb_test_no_output "save gdb-index $dir" \
     "save gdb-index to tilde based directory"
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
index 94fc0ade3f18..cf1eff88bffe 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
@@ -23,16 +23,16 @@  set flags {}
 lappend flags {additional_flags=-fdebug-types-section}
 lappend flags {dwarf5}
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  $srcfile $flags] } {
-    return -1
+    return
 }
 
 if { [ensure_gdb_index $binfile] != 1 } {
     untested "error adding gdb index"
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
 
 # Verify that .gdb_index section is not ignored.
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
index 91e7ef5a5e14..456d7266c599 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
@@ -23,11 +23,11 @@  require !readnow
 
 standard_testfile main.c
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
 	  [list ${srcfile}]] } {
-    return -1
+    return
 }
 
 # Add a .gdb_index section to PROGRAM.
 # PROGRAM is assumed to be the output of standard_output_file.
 # Returns the path of the program or "" if there is a failure.
@@ -139,14 +139,14 @@  gdb_test "mt print objfiles ${testfile}" \
 # There is gdb_touch_execfile, but it doesn't handle remote hosts.
 # Is touch portable enough?
 # First make sure enough time has passed, file mtime resolution is seconds.
 gdb_test_no_output "shell sleep 1"
 if {[run_on_host "touch binary" touch $host_binfile_with_index]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 gdb_test "mt print objfiles ${testfile}" \
     "(gdb_index|debug_names).*" \
     "index used after symbol reloading"
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
index 09fefaed496d..ac4f0491198d 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
@@ -75,14 +75,14 @@  Dwarf::assemble $asm_file {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}]} {
-    return -1
+    return
 }
 
 # DW_OP_GNU_implicit_pointer implementation requires a valid frame.
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "p p->f" " = <optimized out>"
diff --git a/gdb/testsuite/gdb.dwarf2/implptr.exp b/gdb/testsuite/gdb.dwarf2/implptr.exp
index 495c0de0297a..d30951c083de 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr.exp
@@ -33,18 +33,18 @@  if {[info exists COMPILE]} {
     set srcfile ${csrcfile}
     lappend opts debug optimize=-O2
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} {
-    return -1
+    return
 }
 
 # Additional test to verify the referenced CU is not aged out.
 gdb_test_no_output "maintenance set dwarf max-cache-age 0"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Test various pointer depths in bar.
 proc implptr_test_bar {} {
     global csrcfile
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 7e1daf02d73c..49684e3ec0cb 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -83,14 +83,14 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "print *c" " = 114 'r'"
 gdb_test "print d\[-2\]" " = 114 'r'"
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index d262f78485f6..9211cf6d24a0 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -101,15 +101,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Determine byte order.
 set endian [get_endianness]
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp
index a3f5b98768dc..dfa676de6933 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-array.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp
@@ -35,11 +35,11 @@  set asm_file [standard_output_file ${srcfile2}]
 #
 # For that, we ask GDB by debugging our implref-array program.
 # Any program would do, but since we already have implref-array
 # specifically for this testcase, might as well use that.
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 set array_length [get_valueof "/u" "sizeof(array) / sizeof(array\[0\])" -1]
 
 # Create the DWARF.  We need a regular variable which represents the array, and
@@ -112,16 +112,16 @@  Dwarf::assemble ${asm_file} {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
-    return -1
+    return
 }
 
 # DW_OP_GNU_implicit_pointer implementation requires a valid frame.
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # This matches e.g. '(int (&)[5])'
 set ref_type [format {\(int \(&\)\[%d\]\)} ${array_length}]
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp
index 9c30633af036..0d79e05f8ef0 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp
@@ -35,11 +35,11 @@  set asm_file [standard_output_file ${srcfile2}]
 #
 # For that, we ask GDB by debugging our implref-const program.
 # Any program would do, but since we already have implref-const
 # specifically for this testcase, might as well use that.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.  We need a regular variable and a reference to it that'll
 # be marked with DW_OP_GNU_implicit_pointer.
 Dwarf::assemble ${asm_file} {
@@ -91,16 +91,16 @@  Dwarf::assemble ${asm_file} {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
-    return -1
+    return
 }
 
 # DW_OP_GNU_implicit_pointer implementation requires a valid frame.
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Doing 'print ref' should show us e.g. '(int &) <synthetic pointer>: 42'.
 gdb_test "print ref" " = \\(int &\\) <synthetic pointer>: \\\d+"
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp
index d861c76ec3fc..4c2466756e3c 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-global.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp
@@ -35,11 +35,11 @@  set asm_file [standard_output_file ${srcfile2}]
 #
 # For that, we ask GDB by debugging our implref-global program.
 # Any program would do, but since we already have implref-global
 # specifically for this testcase, might as well use that.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.  We need a regular variable and a reference to it that'll
 # be marked with DW_OP_GNU_implicit_pointer.  The variable must be global so
 # that its name is an exported symbol that we can reference from the DWARF
@@ -91,16 +91,16 @@  Dwarf::assemble ${asm_file} {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
-    return -1
+    return
 }
 
 # DW_OP_GNU_implicit_pointer implementation requires a valid frame.
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Address of the referenced value.
 set address [get_hexadecimal_valueof "&global_var" ""]
 
diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
index ce2dea7db3a4..d62f426ed736 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
@@ -35,11 +35,11 @@  set asm_file [standard_output_file ${srcfile2}]
 #
 # For that, we ask GDB by debugging our implref-struct program.
 # Any program would do, but since we already have implref-struct
 # specifically for this testcase, might as well use that.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.  We need a regular variable for the struct and a reference
 # to it that'll be marked with DW_OP_GNU_implicit_pointer. The variable must be
 # global so that its name is an exported symbol that can we can reference from
@@ -128,16 +128,16 @@  Dwarf::assemble ${asm_file} {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} {
-    return -1
+    return
 }
 
 # DW_OP_GNU_implicit_pointer implementation requires a valid frame.
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Returns the struct members, e.g. '{a = 0, b = 1, c = 2}'.
 proc get_members {var} {
     set members [get_valueof "" ${var} ""]
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
index 115cb63db9ff..1bd00fc97139 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
@@ -27,11 +27,11 @@  set executable ${testfile}
 set asm_file [standard_output_file ${srcfile2}]
 
 # We need to know the size of integer type in order
 # to write some of the debugging info we'd like to generate.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.
 Dwarf::assemble $asm_file {
     declare_labels cu_label main_label int_label
@@ -79,9 +79,9 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "p aaa" "= 1"
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
index 0bd1e0d2f91b..f9cc72c71725 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
@@ -112,11 +112,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file $srcfile3] $build_options] } {
-    return -1
+    return
 }
 
 gdb_reinitialize_dir /tmp
 
 # Compilation on remote host downloads the source files to remote host, but
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
index 1210fff84712..82f4baf5bdcb 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
@@ -10,11 +10,11 @@  set executable ${testfile}
 set asm_file [standard_output_file ${srcfile2}]
 
 # We need to know the size of integer and address types in order
 # to write some of the debugging info we'd like to generate.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.
 Dwarf::assemble $asm_file {
     declare_labels cu_label cu2_label int_label int2_label
@@ -132,11 +132,11 @@  Dwarf::assemble $asm_file {
 
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # If Python testing is enabled then try printing the global and static
 # blocks for the current frame, which is in function FUNC.
 proc test_python_block_printing { func } {
@@ -151,11 +151,11 @@  proc test_python_block_printing { func } {
 	[string_to_regexp "<gdb.Block <anonymous> {$func}>"] \
 	"print global block in $func"
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "ptype inty" "type = int" "ptype in main"
 
 test_python_block_printing main
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
index 26366d73e3bf..51f26dd6d41d 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
@@ -24,11 +24,11 @@  set executable ${testfile}
 set asm_file [standard_output_file ${srcfile2}]
 
 # We need to know the size of integer types in order to write some of the
 # debugging info we'd like to generate.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.
 Dwarf::assemble $asm_file {
     declare_labels cu_label main_label int_label
@@ -67,16 +67,16 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if { [ensure_gdb_index $binfile] == -1 } {
     untested "error adding gdb index"
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
 
 runto main
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
index 1be9f30a7d99..bd8694a872d6 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
@@ -36,11 +36,11 @@  set executable ${testfile}
 set asm_file [standard_output_file ${srcfile2}]
 
 # We need to know the size of integer and address types in order
 # to write some of the debugging info we'd like to generate.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.
 Dwarf::assemble $asm_file {
     declare_labels cu_label main_label doit_label int_label
@@ -123,11 +123,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language c++"
 
 gdb_test "l imported_unit.c:1" \
diff --git a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
index 4f783d9bca0d..8932cbf51099 100644
--- a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
@@ -63,15 +63,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set lines [gdb_get_lines "info locals"]
 
 # Make sure "info locals" shows optimized out variables.
diff --git a/gdb/testsuite/gdb.dwarf2/inline.exp b/gdb/testsuite/gdb.dwarf2/inline.exp
index 11109f297ccf..138d471acfb4 100644
--- a/gdb/testsuite/gdb.dwarf2/inline.exp
+++ b/gdb/testsuite/gdb.dwarf2/inline.exp
@@ -15,11 +15,11 @@ 
 
 standard_testfile .c
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug nowarnings}]} {
-    return -1
+    return
 }
 
 set cmd "ptype main"
 
 set re \
diff --git a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
index 6a982acbdf6e..607e72bdf83a 100644
--- a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
@@ -200,11 +200,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 "${asm_file} ${srcfile}" {}]} {
-    return -1
+    return
 }
 
 # All we need to do is set a breakpoint, which causes the DWARF
 # info to be read, to demonstrate the problem.
 
diff --git a/gdb/testsuite/gdb.dwarf2/intbits.exp b/gdb/testsuite/gdb.dwarf2/intbits.exp
index 2cf96e63eaa4..46e45aeb861e 100644
--- a/gdb/testsuite/gdb.dwarf2/intbits.exp
+++ b/gdb/testsuite/gdb.dwarf2/intbits.exp
@@ -24,11 +24,11 @@  standard_testfile .c .S
 
 set executable ${testfile}
 set asm_file [standard_output_file ${srcfile2}]
 
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 # Create the DWARF.
 Dwarf::assemble ${asm_file} {
     cu {} {
@@ -194,15 +194,15 @@  Dwarf::assemble ${asm_file} {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${executable} \
 	 [list ${asm_file} ${srcfile}] {}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "print v_i16_m1" "= -1"
 gdb_test "print v_u16_1" "= true"
 gdb_test "print v_u32_m2" "= -2"
diff --git a/gdb/testsuite/gdb.dwarf2/local-var.exp b/gdb/testsuite/gdb.dwarf2/local-var.exp
index 77561a06d5a5..b3401a002531 100644
--- a/gdb/testsuite/gdb.dwarf2/local-var.exp
+++ b/gdb/testsuite/gdb.dwarf2/local-var.exp
@@ -16,11 +16,11 @@ 
 # Check that local variables do not occur in the cooked index.
 
 standard_testfile .f90
 
 if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {debug f90}] } {
-    return -1
+    return
 }
 
 # Regression test for PR32276.
 gdb_test_lines "maint print objfiles" "local var not in index" "" -re-not "local_var"
 
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index 4305026089bf..9c0c5a700c2f 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -89,11 +89,11 @@  if {[gdb_compile_shlib $libsrc $lib_so \
 #   Value returned is $1 = (B *) $hex <g_>
 # Note that this compilation is used for all GDB sessions.
 set exec_options [list debug shlib=$lib_so]
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 ${::srcfile} $exec_options]} {
-    return -1
+    return
 }
 
 ### First GDB session.
 
 with_test_prefix "first session" {
diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
index eae6600213ec..0e9a4988059d 100644
--- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
+++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
@@ -23,11 +23,11 @@  require dwarf2_support
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile debug main.c debug $srcfile nodebug]]} {
-    return -1
+    return
 }
 
 gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
 
 gdb_test_no_output "set listsize 1"
diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
index cb01fca6bdf5..bb2219412d6c 100644
--- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
+++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
@@ -53,22 +53,22 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 set have_index [exec_has_index_section $binfile]
 
 # Test that the "start" command stops in the "mymain" function.
 # This should happen because we used DW_AT_main_subprogram to tell gdb
 # that this was the real "main".
 
 if {[gdb_start_cmd] < 0} {
     fail "could not start ${testfile}"
-    return -1
+    return
 }
 
 gdb_test_multiple "" "stopped at mymain" {
     -re -wrap "Temporary breakpoint .* mymain.*" {
 	pass $gdb_test_name
diff --git a/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp b/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp
index 04494dc3889b..8b549b2d4471 100644
--- a/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp
+++ b/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp
@@ -46,11 +46,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "info line 1" \
     [string cat \
 	 "malformed line number program header," \
diff --git a/gdb/testsuite/gdb.dwarf2/mega-enum.exp b/gdb/testsuite/gdb.dwarf2/mega-enum.exp
index 3d01db7b6907..d550a2b464a4 100644
--- a/gdb/testsuite/gdb.dwarf2/mega-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/mega-enum.exp
@@ -57,11 +57,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 # The largest known Fermat prime.
 gdb_test "print/d DEI_65537" " = 65537"
 gdb_test "print (enum mega_enum) 65537" " = DEI_65537"
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index eae8723563a2..b08e6c39825d 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -21,11 +21,11 @@  require allow_cplus_tests
 
 standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 clean_restart
 
 # Be sure to set cp-abi before ${binfile} gets loaded
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index 459302a7994c..42cb93330a55 100644
--- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
@@ -77,11 +77,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug c++}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language c++"
 gdb_test "ptype the_typedef" \
     "type = int \\(S::\\*\\)\\(S \\* const, float\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/missing-line-table.exp b/gdb/testsuite/gdb.dwarf2/missing-line-table.exp
index 9f32a3663458..40e527b48448 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-line-table.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-line-table.exp
@@ -78,11 +78,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # Place a breakpoint on FUNC.  Check that the address at which the
 # breakpoint is placed lies within FUNC which is starts at address
 # START, and address END is the first address after FUNC.
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index f69ecbb71da4..aa47a704cc32 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
@@ -47,9 +47,9 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "ptype foo" "type = <unknown type .*>"
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
index 12852a4b33b8..bf9e9258c0a2 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
@@ -152,15 +152,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	[list $srcfile $asm_file] $nodebug_flags] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "ptype var1" [multi_line \
     "type = struct template_var1<int, float> \\\[with <unnamed0> = int, second = float\\\] {" \
     "    <unnamed0> me;" \
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
index 770dff4d7f2a..530e0c79b0f3 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
@@ -95,15 +95,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Use 'ptype' on two variables that are using DW_TAG_base_type types
 # with missing DW_AT_name attributes.
 gdb_test "ptype var_ptr" "type = <invalid type code $decimal> \\*" \
diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
index 52975d08a5ce..525967dbd897 100644
--- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp
+++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
@@ -139,11 +139,11 @@  Dwarf::assemble $asm_file {
 }
 
 # Build the test executable.
 if {[build_executable $testfile.exp $testfile [list $asm_file $srcfile] {}] \
 	== -1} {
-    return -1
+    return
 }
 
 # We force the DIEs above to be read in via "-readnow".
 save_vars { GDBFLAGS } {
     set GDBFLAGS "$GDBFLAGS -readnow"
diff --git a/gdb/testsuite/gdb.dwarf2/nameless-enum.exp b/gdb/testsuite/gdb.dwarf2/nameless-enum.exp
index 4dbe29b8e03b..b523ae6d6ae2 100644
--- a/gdb/testsuite/gdb.dwarf2/nameless-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/nameless-enum.exp
@@ -52,11 +52,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 # The bug was a crash, so just do anything here to verify gdb is still
 # alive.
 gdb_test "print 23" " = 23"
diff --git a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
index ae912aa4ace2..817d015a7d50 100644
--- a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
+++ b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
@@ -30,11 +30,11 @@  set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
     gnu_debugaltlink "file-not-here" "0000000000000000000000000000000000000000"
 }
 
 if { [build_executable $testfile.exp $testfile [list $srcfile $asm_file]] } {
-    return -1
+    return
 }
 
 clean_restart
 gdb_test_no_output "maint set dwarf synchronous on"
 
diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
index c0813ebf5eed..8e673bbade52 100644
--- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
@@ -196,15 +196,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Determine byte order.
 set endian [get_endianness]
 
diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
index 88a2f69689dc..e9be5b8b5558 100644
--- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
+++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
@@ -33,11 +33,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [build_executable ${testfile}.exp ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 save_vars { GDBFLAGS } {
     set GDBFLAGS "$GDBFLAGS --readnow"
     clean_restart $testfile
diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
index 4ce5751147a5..f25988fb3015 100644
--- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
+++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
@@ -21,11 +21,11 @@  set opts {}
 lappend opts debug
 lappend opts c++
 lappend opts additional_flags=-std=c++11
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
-    return -1
+    return
 }
 
 set cmd "info types -q std::nullptr_t"
 
 set re \
diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
index bcf833ca2130..119203308a75 100644
--- a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
@@ -182,14 +182,14 @@  Dwarf::assemble $asm_file {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile} ${srcfile3}" {nodebug}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "p variable_a" " = {xyz = 97 'a'}"
 gdb_test "p variable_b" " = {xyz = 98 'b'}"
diff --git a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
index 5bfd0099b114..64a3a1e393ba 100644
--- a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
@@ -86,17 +86,17 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[build_executable ${testfile}.exp ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 clean_restart ${testfile}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set cmd "print i64_noptr"
 if { [is_64_target] } {
     gdb_test $cmd \
diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
index c9fb5764c28d..94ede63f31a5 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
@@ -25,15 +25,15 @@  set csrcfile ${testfile}.c
 set opts {}
 lappend opts debug
 lappend opts nopie
 
 if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} {
-    return -1
+    return
 }
 
 if {![runto foo]} {
-    return -1
+    return
 }
 
 # Move back up to main.
 gdb_test "up" "#1  $hex in main.*" "move up a frame"
 
diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp
index 10d2f8b965ca..bcae3cfe859d 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces.exp
@@ -21,15 +21,15 @@  require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 set csrcfile ${testfile}.c
 
 if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Function f1 tests a particular gdb bug involving DW_OP_piece.
 proc pieces_test_f1 {} {
     global csrcfile
diff --git a/gdb/testsuite/gdb.dwarf2/pr10770.exp b/gdb/testsuite/gdb.dwarf2/pr10770.exp
index 6ff1639177eb..ec4e076cb8ff 100644
--- a/gdb/testsuite/gdb.dwarf2/pr10770.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr10770.exp
@@ -16,21 +16,21 @@ 
 # Test DW_OP_call_frame_cfa.
 
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return 0
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # This test also requires DWARF.
 get_debug_format
 if {![test_debug_format "DWARF \[0-9\]"]} {
-    return -1
+    return
 }
 
 gdb_test "break force_unwind" "Breakpoint .*" "set breakpoint for pr10770"
 gdb_test "cont" "Breakpoint ., force_unwind .*"
 # If we have the bug, this will hang.
diff --git a/gdb/testsuite/gdb.dwarf2/pr11465.exp b/gdb/testsuite/gdb.dwarf2/pr11465.exp
index 2ca6985fd6f0..3cf6bdb70e18 100644
--- a/gdb/testsuite/gdb.dwarf2/pr11465.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr11465.exp
@@ -25,11 +25,11 @@  if {[is_ilp32_target]} {
     set ptrbits 64
 }
 
 if  { [gdb_compile [file join $srcdir $subdir $srcfile] \
 	   $binfile object [list additional_flags=-DPTRBITS=$ptrbits]] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 # Test delayed physname computations
diff --git a/gdb/testsuite/gdb.dwarf2/pr13961.exp b/gdb/testsuite/gdb.dwarf2/pr13961.exp
index 66441e862404..46bcdd70b0e1 100644
--- a/gdb/testsuite/gdb.dwarf2/pr13961.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr13961.exp
@@ -25,11 +25,11 @@  set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 	${additional_flags}] == -1 } {
-    return -1
+    return
 }
 
 gdb_test "break -q main" "Breakpoint.*at.*"
 
 # If we get this far gdb didn't crash.
diff --git a/gdb/testsuite/gdb.dwarf2/rust-enum.exp b/gdb/testsuite/gdb.dwarf2/rust-enum.exp
index 141ec90d927e..19c9bcacff5d 100644
--- a/gdb/testsuite/gdb.dwarf2/rust-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/rust-enum.exp
@@ -109,11 +109,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language rust"
 
 gdb_test "print constant_variable" [string_to_regexp "One(65)"]
diff --git a/gdb/testsuite/gdb.dwarf2/self-spec.exp b/gdb/testsuite/gdb.dwarf2/self-spec.exp
index 398cdc1e8d2b..b51c7e41a8b0 100644
--- a/gdb/testsuite/gdb.dwarf2/self-spec.exp
+++ b/gdb/testsuite/gdb.dwarf2/self-spec.exp
@@ -51,11 +51,11 @@  Dwarf::assemble $asm_file {
 	}
     }
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}]} {
-    return -1
+    return
 }
 
 set index [have_index $binfile]
 require {string eq $index ""}
 
diff --git a/gdb/testsuite/gdb.dwarf2/shortpiece.exp b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
index 118f7f1a97cb..bb37541ff072 100644
--- a/gdb/testsuite/gdb.dwarf2/shortpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
@@ -119,11 +119,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 			  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "p s1" " = {a = 1, b = 0}"
 gdb_test "p s2" \
     "access outside bounds of object referenced via synthetic pointer"
diff --git a/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
index 29ec6b43fcc0..1ac48f5b31cd 100644
--- a/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
@@ -46,11 +46,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "print var" " = <optimized out>"
 
 # Expand all symbol tables.
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index 91a61b7f8431..90ae120b79c3 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -47,11 +47,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # gdb/18021: The test below would cause GDB to crash.
 # Depending on whether the target maps memory at address 0x1000,
 # on success this may either print something like
diff --git a/gdb/testsuite/gdb.dwarf2/struct-decl.exp b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
index 789ecb36f9be..aefa2609a8ac 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-decl.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
@@ -64,9 +64,9 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] {nodebug}]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "the_type::method" message
diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
index 1a2e696d5b69..4218dd119470 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
@@ -74,11 +74,11 @@  Dwarf::assemble $asm_file {
 
 # We're using an object instead of executable here to keep cc-with-tweaks.sh
 # from modifying it.  It also means we can set the build-id, rather than
 # having to extract it.
 if { [gdb_compile $asm_file $binfile.dwz object {nodebug}] != "" } {
-    return -1
+    return
 }
 
 set host_dwz_file [gdb_remote_download host $binfile.dwz]
 
 # Make some DWARF for the executable.
diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
index a85f615f37ee..5a3e5a77dcae 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
@@ -97,11 +97,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 set struct_s_i_re \
     [multi_line \
 	 "type = struct s {" \
@@ -112,11 +112,11 @@  set struct_s_j_re \
 	 "type = struct s {" \
 	 "    int j;" \
 	 "}"]
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "ptype struct s" $struct_s_i_re \
     "struct s with int i"
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
index 172f4bd42fc4..a4cfab746db0 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
@@ -70,9 +70,9 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 gdb_test "print rangeval" " = TWO"
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index cd3a4b85b693..71e88f433538 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange.exp
@@ -103,11 +103,11 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug c++}] } {
-    return -1
+    return
 }
 
 gdb_test_no_output "set language pascal"
 
 gdb_test "ptype TByteArray" \
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
index a05fa14b7cd7..27763beee3a8 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
@@ -98,19 +98,19 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
      [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 # The variable's location expression requires a frame,
 # so an error should be reported.
 gdb_test "print/d a" "No frame selected." "variable a can't be printed"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set var \$$regname = 2" "init reg to 2"
 
 gdb_test "print/d a" " = 2" "a == 2"
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
index 8b98e73d421c..a72cdc8f55f6 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
@@ -120,15 +120,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set var \$$regname = 2" "init reg to 2"
 gdb_test_no_output "set var exec_mask = 0" "init exec_mask to 0"
 
diff --git a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
index eea7106d7011..f5a919cb747f 100644
--- a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
@@ -71,14 +71,14 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Just a sanity check to make sure GDB slurped the symbols correctly.
 gdb_test "print apply<int>" " = {void \\(void\\)} $hex <apply<int>\\(\\)>"
diff --git a/gdb/testsuite/gdb.dwarf2/trace-crash.exp b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
index aacb56a8d3e2..2df9bfa861bb 100644
--- a/gdb/testsuite/gdb.dwarf2/trace-crash.exp
+++ b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
@@ -24,11 +24,11 @@  require is_x86_64_m64_target
 
 standard_testfile .S
 
 if {[prepare_for_testing "failed to prepare" "${testfile}" ${testfile}.S \
 	 nodebug]} {
-    return -1
+    return
 }
 
 gdb_test "trace ${testfile}.c:3" "Tracepoint $decimal .*" \
     "set tracepoint"
 
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
index afc600e2b725..00c8bd130096 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
@@ -24,23 +24,23 @@  require dwarf2_support
 if { [is_x86_like_target] } {
     set sfile ${test}.S
 } elseif { [is_x86_64_m64_target] } {
     set sfile ${test}-amd64.S
 } else {
-    return 0
+    return
 }
 
 set opts {}
 lappend opts nodebug
 lappend opts nopie
 
 if { [prepare_for_testing "failed to prepare" "${test}" ${sfile} $opts] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Initialize tests to be an empty array.
 unset -nocomplain tests
 array set tests {}
diff --git a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
index 96b621ac6e09..507e698916af 100644
--- a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
+++ b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
@@ -59,15 +59,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "break func" "Breakpoint .*" \
     "set breakpoint in func"
 gdb_continue_to_breakpoint "continue to func"
diff --git a/gdb/testsuite/gdb.dwarf2/utf-rust.exp b/gdb/testsuite/gdb.dwarf2/utf-rust.exp
index 6eb8a7a171d6..0aedd6530aad 100644
--- a/gdb/testsuite/gdb.dwarf2/utf-rust.exp
+++ b/gdb/testsuite/gdb.dwarf2/utf-rust.exp
@@ -52,15 +52,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
 	 [list $srcfile $asm_file] debug]} {
-    return -1
+    return
 }
 
 if {![runto main]} {
-    return -1
+    return
 }
 
 gdb_test "set language rust" \
     "Warning: the current language does not match this frame."
 # Get the values into history so we can use it from Rust.
diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp
index dd5f01d4a324..18f51c117f8d 100644
--- a/gdb/testsuite/gdb.dwarf2/valop.exp
+++ b/gdb/testsuite/gdb.dwarf2/valop.exp
@@ -22,15 +22,15 @@  require dwarf2_support is_x86_like_target
 
 standard_testfile .S
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile] [list {additional_flags=-nostdlib}]]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "break valop.c:19" "Breakpoint 2.*" "set breakpoint for valop"
 gdb_continue_to_breakpoint "continue to breakpoint for valop"
 
diff --git a/gdb/testsuite/gdb.dwarf2/var-access.exp b/gdb/testsuite/gdb.dwarf2/var-access.exp
index 5e240aeb7408..6719784f2302 100644
--- a/gdb/testsuite/gdb.dwarf2/var-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/var-access.exp
@@ -248,15 +248,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Determine byte order.
 set endian [get_endianness]
 
diff --git a/gdb/testsuite/gdb.dwarf2/variant.exp b/gdb/testsuite/gdb.dwarf2/variant.exp
index 2dab87211acf..7f015e9e3ae1 100644
--- a/gdb/testsuite/gdb.dwarf2/variant.exp
+++ b/gdb/testsuite/gdb.dwarf2/variant.exp
@@ -200,15 +200,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] debug] } {
-    return -1
+    return
 }
 
 if {![runto func]} {
-    return -1
+    return
 }
 
 # Get the values into history so we can use it from Rust.
 gdb_test "print (void *) buffer" "\\\$1 = .void .. $hex .buffer."
 gdb_test "print (void *) buffer2" "\\\$2 = .void .. $hex .buffer2."
diff --git a/gdb/testsuite/gdb.dwarf2/varval.exp b/gdb/testsuite/gdb.dwarf2/varval.exp
index b0735bee94ae..032e3d11c0e7 100644
--- a/gdb/testsuite/gdb.dwarf2/varval.exp
+++ b/gdb/testsuite/gdb.dwarf2/varval.exp
@@ -32,11 +32,11 @@  set asm_file [standard_output_file ${srcfile2}]
 #
 # For that, we ask GDB by debugging our varval program.
 # Any program would do, but since we already have varval
 # specifically for this testcase, might as well use that.
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 set int_size [get_sizeof "int" -1]
 # gdb always assumes references are implemented as pointers.
 set addr_size [get_sizeof "void *" -1]
 
@@ -318,20 +318,20 @@  proc setup_exec { arg_bad } {
 	return -1
     }
 }
 
 if { [setup_exec 0] == -1 } {
-    return -1
+    return
 }
 
 with_test_prefix "pre-main" {
     gdb_test "print varval3" "= \\{8\\}" ""
 }
 
 # DW_OP_GNU_variable_value implementation requires a valid frame.
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "print varval" "= 8"
 gdb_test "print varval2" "= 8"
 gdb_test "print varval3" "= \\{8\\}"
@@ -351,16 +351,16 @@  gdb_test "print structval" \
 
 gdb_test "print untypedval" \
 	 "Type of DW_OP_GNU_variable_value DIE must be an integer or pointer\\."
 
 if { [setup_exec 1] == -1 } {
-    return -1
+    return
 }
 
 # DW_OP_GNU_variable_value implementation requires a valid frame.
 if {![runto_main]} {
-    return -1
+    return
 }
 gdb_test "print badval" "value has been optimized out"
 gdb_test "print bad_die_val1" \
 	 {DWARF Error: could not find unit containing offset 0xabcdef11 \[in module .*/varval\]}
 gdb_test "print bad_die_val2" \
diff --git a/gdb/testsuite/gdb.dwarf2/void-type.exp b/gdb/testsuite/gdb.dwarf2/void-type.exp
index c3d37da56dc0..ee5d16e1ea07 100644
--- a/gdb/testsuite/gdb.dwarf2/void-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/void-type.exp
@@ -91,15 +91,15 @@  Dwarf::assemble $asm_file {
     }
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
 	  [list $srcfile $asm_file] {nodebug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Place a breakpoint in 'func' and continue to there.
 gdb_breakpoint func
 gdb_continue_to_breakpoint "func"
diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
index 7dd7afcb8a0d..c8fb0a955f81 100644
--- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
@@ -20,11 +20,11 @@  set test "watch-notconst"
 # This test can only be run on x86 targets.
 require dwarf2_support is_x86_like_target
 
 if { [prepare_for_testing "failed to prepare" "${test}" \
       {watch-notconst.c watch-notconst2.S} {nodebug}] } {
-    return -1
+    return
 }
 
 if { ![runto f] } {
     perror "Could not run to breakpoint `f'."
     return