[binutils-gdb] GDB: testsuite: Don't return value from top-level in multi-arch tests

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=6ad4b01d8ea3bf4e74b7b0cdd31c8fe55401a639

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

    GDB: testsuite: Don't return value from top-level in multi-arch tests
    
    Oddly enough, there are multi-arch arch tests.  This patch contains
    fixes for them.
    
    Some changes are the result of running:
    
    $ sed -i 's/^    return -1/    return/' *.exp
    
    inside gdb/testsuite/gdb.arch and the others are manual changes.
    
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp |  6 +++---
 gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp    | 14 +++++++-------
 gdb/testsuite/gdb.arch/skip-prologue.exp        |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp b/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
index 7d26244129c..87440a1b28e 100644
--- a/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
+++ b/gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
@@ -23,11 +23,11 @@ set additional_flags [gdb_target_symbol_prefix_flags]
 
 if {[prepare_for_testing "failed to prepare" $executable $srcfile \
 	 [list debug $additional_flags]]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Read function name from testcases[N].
@@ -49,7 +49,7 @@ proc read_testcase { n } {
 set n_testcases [get_integer_valueof "n_testcases" 0]
 if { ${n_testcases} == 0 } {
     untested "no instruction relocation to test"
-    return 1
+    return
 }
 
 # Set a fast tracepoint on each set_point${i} symbol.  There is one for
diff --git a/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp b/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
index 0846e0365d4..06eb5a691bd 100644
--- a/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
+++ b/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
@@ -21,16 +21,16 @@ set additional_flags [gdb_target_symbol_prefix_flags]
 
 if {[prepare_for_testing "failed to prepare" $testfile-no-ipa $srcfile \
 	 [list debug $additional_flags]]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 if {![gdb_target_supports_trace]} {
     unsupported "target does not support trace"
-    return -1
+    return
 }
 
 require allow_in_proc_agent
@@ -43,20 +43,20 @@ set libipa [get_in_proc_agent]
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable [list debug $additional_flags shlib=$libipa] ] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 clean_restart $testfile
 set remote_libipa [gdb_load_shlib $libipa]
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_reinitialize_dir $srcdir/$subdir
 
 if { [gdb_test "info sharedlibrary" ".*[file tail $libipa].*" "IPA loaded"] != 0 } {
     untested "could not find IPA lib loaded"
-    return 1
+    return
 }
 
 # Read function name from testcases[N].
@@ -79,7 +79,7 @@ set n_testcases [gdb_readexpr "n_testcases"]
 
 if { ${n_testcases} == 0 } {
     untested "no instruction relocation to test"
-    return 1
+    return
 }
 
 # Set a fast tracepoint on each set_point${i} symbol.  There is one for
diff --git a/gdb/testsuite/gdb.arch/skip-prologue.exp b/gdb/testsuite/gdb.arch/skip-prologue.exp
index c805356d874..c53f86250c8 100644
--- a/gdb/testsuite/gdb.arch/skip-prologue.exp
+++ b/gdb/testsuite/gdb.arch/skip-prologue.exp
@@ -19,7 +19,7 @@ standard_testfile
 
 if { [prepare_for_testing "failed to prepare"  $testfile $srcfile \
 	  {nodebug}] } {
-    return -1
+    return
 }
 
 proc do_test { f } {
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.