From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 11/36] GDB: testsuite: Don't return -1 from top-level in tests of various arches
Date: Mon, 27 Apr 2026 03:34:35 -0300 [thread overview]
Message-ID: <20260427063500.3847618-12-thiago.bauermann@linaro.org> (raw)
In-Reply-To: <20260427063500.3847618-1-thiago.bauermann@linaro.org>
This patch contains fixes for alpha, arc, avr, hppa and sh architectures.
Some changes are the result of running:
$ sed -i 's/^ return -1/ return/' *.exp
inside gdb/testsuite/gdb.arch and some are manual changes.
---
gdb/testsuite/gdb.arch/alpha-step.exp | 4 ++--
gdb/testsuite/gdb.arch/arc-analyze-prologue.exp | 2 +-
gdb/testsuite/gdb.arch/arc-dbnz.exp | 2 +-
gdb/testsuite/gdb.arch/arc-decode-insn.exp | 2 +-
gdb/testsuite/gdb.arch/avr-flash-qualifier.exp | 10 +++++-----
gdb/testsuite/gdb.arch/gdb1291.exp | 4 ++--
gdb/testsuite/gdb.arch/gdb1431.exp | 4 ++--
gdb/testsuite/gdb.arch/gdb1558.exp | 2 +-
gdb/testsuite/gdb.arch/pa-nullify.exp | 8 ++++----
9 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/alpha-step.exp b/gdb/testsuite/gdb.arch/alpha-step.exp
index a15f86ea6567..9d94daa0e64b 100644
--- a/gdb/testsuite/gdb.arch/alpha-step.exp
+++ b/gdb/testsuite/gdb.arch/alpha-step.exp
@@ -22,7 +22,7 @@ set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
unsupported "failed to compile"
- return -1
+ return
}
clean_restart
@@ -33,7 +33,7 @@ proc test_stepi {function } {
# of the previous tests, this makes sure that it doesn't affect
# this series of tests.
if {![runto_main]} {
- return 0
+ return
}
# Insert a breakpoint on the FP branch instruction inside FUNCTION.
diff --git a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
index 01699016dd67..fe6db11472cc 100644
--- a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
+++ b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
@@ -26,7 +26,7 @@ standard_testfile .S
set options {}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile $options] } {
- return -1
+ return
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/arc-dbnz.exp b/gdb/testsuite/gdb.arch/arc-dbnz.exp
index ce93a6202933..e50bf7a4b187 100644
--- a/gdb/testsuite/gdb.arch/arc-dbnz.exp
+++ b/gdb/testsuite/gdb.arch/arc-dbnz.exp
@@ -34,7 +34,7 @@ require {istarget "arc*-*-*"}
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/arc-decode-insn.exp b/gdb/testsuite/gdb.arch/arc-decode-insn.exp
index 0a7582d03a2a..c23204aa1660 100644
--- a/gdb/testsuite/gdb.arch/arc-decode-insn.exp
+++ b/gdb/testsuite/gdb.arch/arc-decode-insn.exp
@@ -36,7 +36,7 @@ require {istarget "arc*-*-*"}
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp b/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp
index a62e629f9209..e9a523a5d05a 100644
--- a/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp
+++ b/gdb/testsuite/gdb.arch/avr-flash-qualifier.exp
@@ -22,18 +22,18 @@ require {istarget "avr*"}
# The __flash qualifier was added in GCC 4.7.
if {[test_compiler_info {gcc-[0-4]-[0-6]}]} {
- verbose "Skipping ${gdb_test_file_name}."
- return
+ verbose "Skipping ${gdb_test_file_name}."
+ return
}
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto [gdb_get_line_number "break here."]]} {
- untested "could not run to \"break here.\""
- return -1
+ untested "could not run to \"break here.\""
+ return
}
gdb_test "print pointer_to_flash" \
diff --git a/gdb/testsuite/gdb.arch/gdb1291.exp b/gdb/testsuite/gdb.arch/gdb1291.exp
index 82f9d52e08ba..ba4b88d75112 100644
--- a/gdb/testsuite/gdb.arch/gdb1291.exp
+++ b/gdb/testsuite/gdb.arch/gdb1291.exp
@@ -30,7 +30,7 @@ set srcfile ${testfile}.s
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
@@ -41,7 +41,7 @@ gdb_load $binfile
#
if {![runto_main]} {
- return 0
+ return
}
gdb_test "b sub1" "Breakpoint 2.*" "set breakpoint"
diff --git a/gdb/testsuite/gdb.arch/gdb1431.exp b/gdb/testsuite/gdb.arch/gdb1431.exp
index 89952275d193..aedf66183186 100644
--- a/gdb/testsuite/gdb.arch/gdb1431.exp
+++ b/gdb/testsuite/gdb.arch/gdb1431.exp
@@ -32,7 +32,7 @@ set srcfile ${testfile}.s
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
@@ -43,7 +43,7 @@ gdb_load $binfile
#
if {![runto_main]} {
- return 0
+ return
}
gdb_test "advance sub1" "hello world\r\n$hex in sub1 \\(\\)" "get to sub1"
diff --git a/gdb/testsuite/gdb.arch/gdb1558.exp b/gdb/testsuite/gdb.arch/gdb1558.exp
index 5fbf86f5889a..7a3f44756452 100644
--- a/gdb/testsuite/gdb.arch/gdb1558.exp
+++ b/gdb/testsuite/gdb.arch/gdb1558.exp
@@ -29,7 +29,7 @@ set binfile ${objdir}/${subdir}/${testfile}
# Note we have to compile WITH optimization and WITHOUT debugging information to expose the bug.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-O2"}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
diff --git a/gdb/testsuite/gdb.arch/pa-nullify.exp b/gdb/testsuite/gdb.arch/pa-nullify.exp
index 1606d44afbf1..e527fe0955d8 100644
--- a/gdb/testsuite/gdb.arch/pa-nullify.exp
+++ b/gdb/testsuite/gdb.arch/pa-nullify.exp
@@ -37,7 +37,7 @@ set gcorefile ${objdir}/${subdir}/${testfile}.gcore
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
unsupported "failed to compile"
- return -1
+ return
}
clean_restart
@@ -87,7 +87,7 @@ proc get_addr_of_sym { sym } {
}
if {![runto_main]} {
- return 0
+ return
}
set foo [get_addr_of_sym "foo"]
@@ -123,7 +123,7 @@ proc test_core_bt { test } {
set test "core at last insn in foo"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "*$foo_last"
gdb_test "continue" "Breakpoint \[0-9\]*,.* in foo.*" "$test: continue to breakpoint"
@@ -133,7 +133,7 @@ if {[gen_core $test]} {
set test "core at nullified insn"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "*$foo_last"
gdb_test "continue" "Breakpoint \[0-9\]*,.* in foo.*" "$test: continue to breakpoint"
next prev parent reply other threads:[~2026-04-27 6:41 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 6:34 [PATCH 00/36] GDB: testsuite: Fix top-level returns Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 01/36] GDB: testsuite: aarch64, arm: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 02/36] GDB: testsuite: aarch64, arm: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 03/36] GDB: testsuite: intel: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-28 15:54 ` Schimpe, Christina
2026-04-28 16:42 ` Schimpe, Christina
2026-04-27 6:34 ` [PATCH 04/36] GDB: testsuite: intel: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-28 16:39 ` Schimpe, Christina
2026-04-28 21:48 ` Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 05/36] GDB: testsuite: powerpc: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 06/36] GDB: testsuite: powerpc: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 07/36] GDB: testsuite: riscv: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 08/36] GDB: testsuite: riscv: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 09/36] GDB: testsuite: s390: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 10/36] GDB: testsuite: sparc: " Thiago Jung Bauermann
2026-04-27 6:34 ` Thiago Jung Bauermann [this message]
2026-04-27 6:34 ` [PATCH 12/36] GDB: testsuite: Don't return -1 from top-level in multi-arch tests Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 13/36] GDB: testsuite: base: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 14/36] GDB: testsuite: base: Don't return 0 " Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 15/36] GDB: testsuite: base: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 16/36] GDB: testsuite: C++: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 17/36] GDB: testsuite: C++: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 18/36] GDB: testsuite: DWARF: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 19/36] GDB: testsuite: DWARF: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 20/36] GDB: testsuite: GDB: Don't return -1 from top-level Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 21/36] GDB: testsuite: Guile: " Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 22/36] GDB: testsuite: Python: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 23/36] GDB: testsuite: Python: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 24/36] GDB: testsuite: linespec: Don't return -1 from top-level Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 25/36] GDB: testsuite: MI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 26/36] GDB: testsuite: MI: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 27/36] GDB: testsuite: reverse: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 28/36] GDB: testsuite: reverse: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 29/36] GDB: testsuite: server: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 30/36] GDB: testsuite: server: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 31/36] GDB: testsuite: threads: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 32/36] GDB: testsuite: threads: Don't return 0 " Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 33/36] GDB: testsuite: threads: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 34/36] GDB: testsuite: TUI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27 6:34 ` [PATCH 35/36] GDB: testsuite: TUI: Don't return 0 from top-level (manual) Thiago Jung Bauermann
2026-04-27 6:35 ` [PATCH 36/36] GDB: testsuite: XML: Don't return -1 nor 0 from top-level Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260427063500.3847618-12-thiago.bauermann@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox