Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 06/36] GDB: testsuite: powerpc: Don't return -1 from top-level (manual)
Date: Mon, 27 Apr 2026 03:34:30 -0300	[thread overview]
Message-ID: <20260427063500.3847618-7-thiago.bauermann@linaro.org> (raw)
In-Reply-To: <20260427063500.3847618-1-thiago.bauermann@linaro.org>

This patch manually changes most "return -1" statements that weren't
caught by the sed command.

These return statements fall into one of these criteria:

- misaligned line, which is then fixed by this patch;
- procedure whose callers don't use the return value;

There were also a few top-level "return 0" fixed opportunistically.
---
 gdb/testsuite/gdb.arch/altivec-abi.exp              | 4 ++--
 gdb/testsuite/gdb.arch/altivec-regs.exp             | 6 +++---
 gdb/testsuite/gdb.arch/e500-abi.exp                 | 6 +++---
 gdb/testsuite/gdb.arch/e500-regs.exp                | 8 ++++----
 gdb/testsuite/gdb.arch/powerpc-d128-regs.exp        | 4 ++--
 gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp   | 4 ++--
 gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp        | 2 +-
 gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp | 4 ++--
 gdb/testsuite/gdb.arch/vsx-regs.exp                 | 8 ++++----
 gdb/testsuite/gdb.arch/vsx-vsr-float28.exp          | 6 +++---
 10 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp
index f7bea3de4ced..1c2da2791083 100644
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -33,7 +33,7 @@ proc altivec_abi_tests { extra_flags force_abi } {
 
     if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
 	untested "failed to compile"
-	return -1
+	return
     }
 
     if { "$force_abi" == "auto" } {
@@ -52,7 +52,7 @@ proc altivec_abi_tests { extra_flags force_abi } {
 
     # Run to `main' where we begin our tests.
     if {![runto_main]} {
-	return -1
+	return
     }
 
     gdb_test "set print frame-arguments all"
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 55d245d92981..04dc342de6d4 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -36,8 +36,8 @@ if {[test_compiler_info gcc*]} {
 }
 
 if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
-     untested "failed to compile"
-     return -1
+    untested "failed to compile"
+    return
 }
 
 gdb_start
@@ -49,7 +49,7 @@ gdb_load ${binfile}
 #
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "start here"]
diff --git a/gdb/testsuite/gdb.arch/e500-abi.exp b/gdb/testsuite/gdb.arch/e500-abi.exp
index 1c074f10aa7e..e0223fd67888 100644
--- a/gdb/testsuite/gdb.arch/e500-abi.exp
+++ b/gdb/testsuite/gdb.arch/e500-abi.exp
@@ -29,8 +29,8 @@ set binfile ${objdir}/${subdir}/${testfile}
 set src1 ${srcdir}/${subdir}/${testfile}.c
 
 if  { [gdb_compile ${src1} ${binfile} executable {debug nowarnings}] != "" } {
-     untested "failed to compile"
-     return -1
+    untested "failed to compile"
+    return
 }
 
 gdb_start
@@ -42,7 +42,7 @@ gdb_load ${binfile}
 #
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test "b marker" "Breakpoint 2 at.*file.*e500-abi.c, line ${::decimal}." "break marker"
diff --git a/gdb/testsuite/gdb.arch/e500-regs.exp b/gdb/testsuite/gdb.arch/e500-regs.exp
index 2dc1ade4b448..03d6f42b5332 100644
--- a/gdb/testsuite/gdb.arch/e500-regs.exp
+++ b/gdb/testsuite/gdb.arch/e500-regs.exp
@@ -28,8 +28,8 @@ set binfile ${objdir}/${subdir}/${testfile}
 set src1 ${srcdir}/${subdir}/${testfile}.c
 
 if  { [gdb_compile ${src1} ${binfile} executable {debug nowarnings}] != "" } {
-     untested "failed to compile"
-     return -1
+    untested "failed to compile"
+    return
 }
 
 gdb_start
@@ -41,7 +41,7 @@ gdb_load ${binfile}
 #
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # set all the registers integer portions to 1
@@ -139,7 +139,7 @@ gdb_expect_list "info vector" ".*$gdb_prompt $" {
 clean_restart
 gdb_load $binfile
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test "break vector_fun" \
diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
index 10c77ef29489..7043fac5e568 100644
--- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
@@ -25,8 +25,8 @@ require {istarget "powerpc64*-*"}
 standard_testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
-     untested "failed to compile"
-     return -1
+    untested "failed to compile"
+    return
 }
 
 clean_restart $::testfile
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
index 1f41f3aaaa3f..3899121f9341 100644
--- a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
@@ -29,8 +29,8 @@ if {[gdb_compile \
 clean_restart $testfile
 
 if {![runto bar]} {
-  untested "could not run to bar"
-  return -1
+    untested "could not run to bar"
+    return
 }
 
 gdb_test "bt" \
diff --git a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
index 56854c75394d..2bd631429c0a 100644
--- a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp
@@ -33,7 +33,7 @@ proc do_test { displaced } {
     global decimal hex
 
     if {![runto_main]} {
-	return -1
+	return
     }
 
     gdb_test_no_output "set displaced-stepping $displaced"
diff --git a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp
index db8c7582d0c3..7f7c9a01fc9c 100644
--- a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp
@@ -38,7 +38,7 @@ proc do_test { displaced } {
     global gdb_prompt inferior_exited_re srcfile srcfile2
 
     if {![runto_main]} {
-	return -1
+	return
     }
 
     gdb_test_no_output "set displaced-stepping $displaced"
@@ -49,7 +49,7 @@ proc do_test { displaced } {
     gdb_test_multiple "continue" "Continue until lbarx/stbcx start breakpoint" {
       -re "$inferior_exited_re with code 01.\[\r\n\]+$gdb_prompt $" {
 	unsupported "POWER8/ISA 2.07 atomic instructions not supported."
-	return -1
+	return
       }
       -re "Continuing.*Breakpoint $decimal.*$gdb_prompt $" {
 	pass "continue until test_atomic_sequences function"
diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp
index 2c31935135da..87f749f93b12 100644
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp
@@ -34,8 +34,8 @@ if {[test_compiler_info gcc*]} {
 }
 
 if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
-     untested "failed to compile"
-     return -1
+    untested "failed to compile"
+    return
 }
 
 gdb_start
@@ -45,7 +45,7 @@ gdb_load ${binfile}
 # Run to `main' where we begin our tests.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set endianness [get_endianness]
@@ -181,7 +181,7 @@ for {set i 0} {$i < 32} {incr i 1} {
 # Test reading the core file.
 
 if {!$core_supported} {
-  return -1
+    return
 }
 
 clean_restart
diff --git a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp
index ad6050bd4c8c..436076f10038 100644
--- a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp
+++ b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp
@@ -33,8 +33,8 @@ if {[test_compiler_info gcc*]} {
 }
 
 if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
-     untested "failed to compile"
-     return -1
+    untested "failed to compile"
+    return
 }
 
 gdb_start
@@ -44,7 +44,7 @@ gdb_load ${binfile}
 # Run to `main' where we begin our tests.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set endianness [get_endianness]

  parent reply	other threads:[~2026-04-27  6:38 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 ` Thiago Jung Bauermann [this message]
2026-04-27  6:34 ` [PATCH 07/36] GDB: testsuite: riscv: " Thiago Jung Bauermann
2026-04-27  6:34 ` [PATCH 08/36] GDB: testsuite: riscv: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-27  6:34 ` [PATCH 09/36] GDB: testsuite: s390: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27  6:34 ` [PATCH 10/36] GDB: testsuite: sparc: " Thiago Jung Bauermann
2026-04-27  6:34 ` [PATCH 11/36] GDB: testsuite: Don't return -1 from top-level in tests of various arches Thiago Jung Bauermann
2026-04-27  6:34 ` [PATCH 12/36] GDB: testsuite: Don't return -1 from top-level in multi-arch tests Thiago Jung Bauermann
2026-04-27  6:34 ` [PATCH 13/36] GDB: testsuite: base: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-27  6:34 ` [PATCH 14/36] GDB: testsuite: base: Don't return 0 " Thiago Jung Bauermann
2026-04-27  6:34 ` [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-7-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