[binutils-gdb] GDB: testsuite: riscv: Don't return value from top-level (sed)

Thiago Bauermann via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d398db7219e33d43374bd0fa3505d5605a5f5d3d

commit d398db7219e33d43374bd0fa3505d5605a5f5d3d
Author: Thiago Jung Bauermann <[email protected]>
Date:   Wed Apr 29 20:03:58 2026 -0300

    GDB: testsuite: riscv: Don't return value from top-level (sed)
    
    This patch is purely the result of running:
    
    $ sed -i 's/^    return -1/    return/' riscv*.exp*
    
    and
    
    $ sed -i 's/^    return 0/    return/' riscv*.exp*
    
    inside gdb/testsuite/gdb.arch.
    
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 gdb/testsuite/gdb.arch/riscv-bp-infcall.exp                   | 2 +-
 gdb/testsuite/gdb.arch/riscv-info-fcsr.exp                    | 2 +-
 gdb/testsuite/gdb.arch/riscv-reg-aliases.exp                  | 2 +-
 gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp                   | 8 ++++----
 gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp  | 4 ++--
 gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp | 4 ++--
 gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp    | 4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp b/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp
index adb937e9fea..7d5e27debda 100644
--- a/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp
+++ b/gdb/testsuite/gdb.arch/riscv-bp-infcall.exp
@@ -21,7 +21,7 @@ require {istarget "riscv*-*-*"}
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp b/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
index 5d252beca30..930f1b24c4e 100644
--- a/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
+++ b/gdb/testsuite/gdb.arch/riscv-info-fcsr.exp
@@ -21,7 +21,7 @@ require {istarget "riscv*-*-*"} allow_float_test
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/riscv-reg-aliases.exp b/gdb/testsuite/gdb.arch/riscv-reg-aliases.exp
index eb1caf87922..998f4f485d3 100644
--- a/gdb/testsuite/gdb.arch/riscv-reg-aliases.exp
+++ b/gdb/testsuite/gdb.arch/riscv-reg-aliases.exp
@@ -18,7 +18,7 @@ require {istarget "riscv*-*-*"}
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp b/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp
index 707777cb0df..10415fccd04 100644
--- a/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp
+++ b/gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp
@@ -24,11 +24,11 @@ standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 	  {debug quiet}] } {
     unsupported "failed to compile"
-    return -1
+    return
 }
 
 if { ![runto_main] } {
-    return -1
+    return
 }
 
 # First, figure out if we are 32-bit or 64-bit.
@@ -40,7 +40,7 @@ gdb_assert { $xlen != 0 && $flen != 0 } "read xlen and flen"
 # We only handle 32-bit or 64-bit x-registers.
 if { $xlen != 4 && $xlen != 8 } {
     unsupported "unknown x-register size"
-    return -1
+    return
 }
 
 # If FLEN is 1 then the target doesn't have floating point support
@@ -49,7 +49,7 @@ if { $xlen != 4 && $xlen != 8 } {
 # files.
 if { $flen != 1 && $flen != $xlen } {
     unsupport "unknown xlen/flen combination"
-    return -1
+    return
 }
 
 if { $xlen == 4 } {
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp
index c175f0934b3..495a720ba7c 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp
@@ -23,11 +23,11 @@ standard_testfile .c -foo.s
 
 if {[prepare_for_testing "failed to prepare" $testfile \
 			 "$srcfile $srcfile2"  nodebug]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint "bar"
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
index dff317bd615..b665dd4f404 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
@@ -22,11 +22,11 @@ standard_testfile riscv64-unwind-prologue-with-ld-lw.c \
 		  riscv64-unwind-prologue-with-ld-lw-foo.s
 if {[prepare_for_testing "failed to prepare" $testfile \
 			 "$srcfile $srcfile2"  nodebug]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint "bar"
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
index 2afe1723a6e..e0f66ac7f9e 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
@@ -21,12 +21,12 @@ require {istarget "riscv64-*-*"}
 standard_testfile .c .s
 if {[prepare_for_testing "failed to prepare" $testfile \
 			 "$srcfile $srcfile2"  nodebug]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
     fail "can't run to main"
-    return 0
+    return
 }
 
 gdb_breakpoint "bar"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.