]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: testsuite: Don't return value from top-level in multi-arch tests
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Wed, 29 Apr 2026 23:04:03 +0000 (20:04 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 8 May 2026 21:49:23 +0000 (21:49 +0000)
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 <tom@tromey.com>
gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp
gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
gdb/testsuite/gdb.arch/skip-prologue.exp

index 7d26244129ceeb82de388bc86597639879bd0fdc..87440a1b28e83dc1ed3d4e70940609e8ea0b53ee 100644 (file)
@@ -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
index 0846e0365d424ffa54f6d382258911878b38f094..06eb5a691bdf52b52e542a5bbeb337db06116f87 100644 (file)
@@ -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
index c805356d87465cbed2fe6b79b17b0170412cdcdb..c53f86250c8471d08b17b8e574d1e51447d4ab8b 100644 (file)
@@ -19,7 +19,7 @@ standard_testfile
 
 if { [prepare_for_testing "failed to prepare"  $testfile $srcfile \
          {nodebug}] } {
-    return -1
+    return
 }
 
 proc do_test { f } {