[binutils-gdb] GDB: testsuite: x86, amd64, i386: Don't return value from top-level (manual)

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=f6c5da4723b85481b5f65e8783eecfae63a89e93

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

    GDB: testsuite: x86, amd64, i386: Don't return value from top-level (manual)
    
    This patch manually changes the "return -1" statements that weren't
    caught by the sed command.
    
    In amd64-shadow-stack-cmds.exp the return statements have extra
    indentation due to being inside a save_vars block.
    
    In i386-bp_permanent.exp this was caused by misaligned lines, which are
    now fixed.
    
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp | 8 ++++----
 gdb/testsuite/gdb.arch/i386-bp_permanent.exp       | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp b/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp
index e4daecb590d..e67a0c2e4a1 100644
--- a/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp
+++ b/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp
@@ -44,12 +44,12 @@ save_vars { ::env(GLIBC_TUNABLES) } {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 	  {debug additional_flags="-fcf-protection=return"}] } {
-	return -1
+	return
     }
 
     clean_restart ${::testfile}
     if { ![runto_main] } {
-	return -1
+	return
     }
 
     with_test_prefix "test inferior call and continue" {
@@ -85,7 +85,7 @@ save_vars { ::env(GLIBC_TUNABLES) } {
 
     clean_restart ${::testfile}
     if { ![runto_main] } {
-	return -1
+	return
     }
 
     set call1_line [ gdb_get_line_number "break call1" ]
@@ -122,7 +122,7 @@ save_vars { ::env(GLIBC_TUNABLES) } {
 
     clean_restart ${::testfile}
     if { ![runto_main] } {
-	return -1
+	return
     }
 
     with_test_prefix "test return from past frame" {
diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
index ef4d0370de8..9805f562634 100644
--- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
+++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
@@ -40,7 +40,7 @@ clean_restart $::testfile
 #
 
 if {![runto_main]} {
-  return -1
+    return
 }
 
 set function "standard"
@@ -53,8 +53,8 @@ set retcode [gdb_test_multiple "disassemble $function" "disassemble function '$f
 }]
 
 if {$retcode != 0} {
-  fail "disassemble failed, skipping entire test."
-  return -1
+    fail "disassemble failed, skipping entire test."
+    return
 }
 
 gdb_breakpoint "*$address_bp"
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.