[binutils-gdb] GDB: testsuite: aarch64, arm: 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=c41e0c44e7de94c1d27ef740eae03b878574d45e

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

    GDB: testsuite: aarch64, arm: 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 aarch64-prologue.exp and arm-cmse-sgstubs.exp, this was caused by a
    misaligned line, which is now fixed.
    
    In aarch64-mte.exp, aarch64-non-address-bits.exp,
    arm-pthread_cond_timedwait-bt.exp and thumb2-it.exp this is because the
    return statements have extra indentation due to being inside
    with_test_prefix, save_vars or gdb_test_multiple blocks.
    
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 gdb/testsuite/gdb.arch/aarch64-mte.exp                   | 6 +++---
 gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp      | 2 +-
 gdb/testsuite/gdb.arch/aarch64-prologue.exp              | 2 +-
 gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp              | 2 +-
 gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp | 2 +-
 gdb/testsuite/gdb.arch/thumb2-it.exp                     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/aarch64-mte.exp b/gdb/testsuite/gdb.arch/aarch64-mte.exp
index 4826041e330..72d4bba7253 100644
--- a/gdb/testsuite/gdb.arch/aarch64-mte.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-mte.exp
@@ -278,7 +278,7 @@ with_test_prefix "print command" {
 
     if {$ltag == -1} {
 	unresolved "unexpected tag value"
-	return -1
+	return
     }
 
     set atag [expr {($ltag + 1) % 16}]
@@ -335,14 +335,14 @@ gdb_test "continue" \
 # Restart to execute the async tag fault test.
 with_test_prefix "async" {
     if {![runto_main]} {
-	return -1
+	return
     }
 
     gdb_breakpoint "access_memory"
 
     if {[gdb_continue "access_memory"]} {
 	fail "could not run to tagged memory test function"
-	return -1
+	return
     }
 
     # Force a tag fault.
diff --git a/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp b/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp
index 8066b2035e1..595dcb4f2ce 100644
--- a/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp
@@ -56,7 +56,7 @@ gdb_test_multiple "ptype \$pauth_cmask" "fetch PAC cmask" {
     }
     -re ".*$gdb_prompt $" {
 	fail $gdb_test_name
-	return 1
+	return
     }
 }
 
diff --git a/gdb/testsuite/gdb.arch/aarch64-prologue.exp b/gdb/testsuite/gdb.arch/aarch64-prologue.exp
index c6fe2e262a5..509fd31e8b4 100644
--- a/gdb/testsuite/gdb.arch/aarch64-prologue.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-prologue.exp
@@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
 }
 
 if {![runto_main]} {
-   return -1
+    return
 }
 
 # Ensure gdb can break at excessiveprologue then continue.
diff --git a/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp b/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp
index c2ecaffd1d2..188ee1a913c 100644
--- a/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp
+++ b/gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp
@@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile ]} {
 }
 
 if {![runto_main]} {
-   return -1
+    return
 }
 
 gdb_test "si" "0x.*" "branch to func from main"
diff --git a/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp
index 85ca6e78210..02ae7009517 100644
--- a/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp
+++ b/gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp
@@ -34,7 +34,7 @@ if { [build_executable "failed to prepare" ${testfile} ${srcfile} \
 save_vars { GDBFLAGS } {
     append GDBFLAGS " --readnever"
     if { [clean_restart $testfile] == -1 } {
-	return -1
+	return
     }
 }
 
diff --git a/gdb/testsuite/gdb.arch/thumb2-it.exp b/gdb/testsuite/gdb.arch/thumb2-it.exp
index 0c9246b2131..9ffcc6e1e3b 100644
--- a/gdb/testsuite/gdb.arch/thumb2-it.exp
+++ b/gdb/testsuite/gdb.arch/thumb2-it.exp
@@ -35,7 +35,7 @@ gdb_test_multiple "list" "list main" {
     -re ".*@ No Thumb-2.*$gdb_prompt $" {
 	pass "list main"
 	untested "skipping tests due to lack of Thumb-2"
-	return -1
+	return
     }
     -re ".*@ Thumb-2 OK.*$gdb_prompt $" {
 	pass "list main"
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.