]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: testsuite: aarch64, arm: Don't return value from top-level (sed)
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Wed, 29 Apr 2026 23:03:52 +0000 (20:03 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 8 May 2026 21:49:23 +0000 (21:49 +0000)
This patch is purely the result of running:

$ sed -i 's/^    return -1/    return/' \
      aarch64-*.exp* arm-*.exp* thumb*.exp* iwmmxt-regs.exp pr25124.exp

and

$ sed -i 's/^    return 0/    return/' \
      aarch64-*.exp* arm-*.exp* thumb*.exp* iwmmxt-regs.exp pr25124.exp

inside gdb/testsuite/gdb.arch.

I didn't include changes made to return statements inside procedures.

Approved-By: Tom Tromey <tom@tromey.com>
32 files changed:
gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp
gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp
gdb/testsuite/gdb.arch/aarch64-fp.exp
gdb/testsuite/gdb.arch/aarch64-fpmr-core.exp
gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.exp
gdb/testsuite/gdb.arch/aarch64-fpmr.exp
gdb/testsuite/gdb.arch/aarch64-frameptr-vecreg-unwind.exp
gdb/testsuite/gdb.arch/aarch64-mops-single-step.exp
gdb/testsuite/gdb.arch/aarch64-mops-watchpoint.exp
gdb/testsuite/gdb.arch/aarch64-mte.exp
gdb/testsuite/gdb.arch/aarch64-non-address-bits.exp
gdb/testsuite/gdb.arch/aarch64-pauth.exp
gdb/testsuite/gdb.arch/aarch64-prologue.exp
gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.exp
gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
gdb/testsuite/gdb.arch/aarch64-sme-sanity.exp
gdb/testsuite/gdb.arch/aarch64-tagged-pointer.exp
gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp
gdb/testsuite/gdb.arch/aarch64-w-registers.exp
gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp
gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp
gdb/testsuite/gdb.arch/arm-disp-step.exp
gdb/testsuite/gdb.arch/arm-neon.exp
gdb/testsuite/gdb.arch/arm-pseudo-unwind-legacy.exp
gdb/testsuite/gdb.arch/arm-pseudo-unwind.exp
gdb/testsuite/gdb.arch/arm-single-step-kernel-helper.exp
gdb/testsuite/gdb.arch/iwmmxt-regs.exp
gdb/testsuite/gdb.arch/pr25124.exp
gdb/testsuite/gdb.arch/thumb-bx-pc.exp
gdb/testsuite/gdb.arch/thumb-prologue.exp
gdb/testsuite/gdb.arch/thumb-singlestep.exp
gdb/testsuite/gdb.arch/thumb2-it.exp

index 269e32cecc74e18c46ab5c2efc97cb40e935c039..38c83d67dc44e671dc8feb9bd7c1559be9f30767 100644 (file)
@@ -22,11 +22,11 @@ require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "[gdb_get_line_number "ldxr"]" \
index f3abd842d0eac916369c4737097f55b733083a60..b23d36b8e2bb1e98739e5bd7225856f38c184b00 100644 (file)
@@ -22,11 +22,11 @@ require is_aarch64_target
 
 standard_testfile
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Number of expected SIGTRAP's to get.  This needs to be kept in sync
index e2e3777a72894a4fe666ee0fb9ca1a7facb8addb..7d8c323ba2a466de4941a7c0a8077f88e9a778ea 100644 (file)
@@ -22,11 +22,11 @@ require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set endianness [get_endianness]
index dea9f82bd4a1baa4862e6390e340c37bc7cea8e2..81ebd4892aa9a842c45157b758292ab44b42aa68 100644 (file)
@@ -42,13 +42,13 @@ require allow_aarch64_fpmr_tests
 
 standard_testfile
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 set binfile [standard_output_file ${testfile}]
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set crash_breakpoint "crash point"
index d0c23ca2861a178798408edbf612ec69e306e201..19c28c70c50d41828871112fbd401b92a3b88e23 100644 (file)
@@ -22,11 +22,11 @@ require allow_aarch64_fpmr_tests
 
 standard_testfile
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set reg_main_value "0x3fff7fc049"
index bbaf2bf3eed93cf65edc664ddf3788515d94df7b..72fd977fc6736d6f12f97105cd32dc7102748dfe 100644 (file)
@@ -20,11 +20,11 @@ require allow_aarch64_fpmr_tests
 
 standard_testfile
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_multiple "info register \$fpmr" "Test FPMR SRC1 E5M2" {
index 784868651b8df9a75f99e19cf20b2c2e55ba88d5..29c44a657adb4247aef13baa549ad6cd70b1f0a3 100644 (file)
@@ -19,7 +19,7 @@ standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
        "${srcfile}" {debug}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
index 3671d3fdaa35fce9574098588f24bd8bed587dc4..b489723b986909fd4b3d38575e9e38d57bcc7571 100644 (file)
@@ -22,7 +22,7 @@ require allow_aarch64_mops_tests
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
          [list debug additional_flags=-march=armv9.3-a]] } {
-    return -1
+    return
 }
 
 # If the inferior is rescheduled to another CPU while a main or epilogue
@@ -72,7 +72,7 @@ proc step_through_sequence { prefix } {
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint ${srcfile}:[gdb_get_line_number "Break memset"]
index da80fa2fe8ed68589915f9026004b2c2784e95e7..35d15d2588a0d042741f92f4600bdce14f449444 100644 (file)
@@ -24,12 +24,12 @@ standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
          [list debug additional_flags=-march=armv9.3-a]] } {
-    return -1
+    return
 }
 
 set linespec ${srcfile}:[gdb_get_line_number "Break here"]
 if {![runto ${linespec}]} {
-    return -1
+    return
 }
 
 gdb_test "watch -location a\[28\]" \
index 4da3810957390ab578d3a6ce6c96eb3534fdd96b..4826041e330aa1ed0c8d88e436d2dcb35a71c800 100644 (file)
@@ -47,24 +47,24 @@ require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Targets that don't support memory tagging should not execute the
 # runtime memory tagging tests.
 if {![supports_memtag]} {
     unsupported "memory tagging unsupported"
-    return -1
+    return
 }
 
 gdb_breakpoint "access_memory"
 
 if {[gdb_continue "access_memory"]} {
-    return -1
+    return
 }
 
 # Fetch a known pointer to an area mapped with PROT_MTE.
@@ -73,7 +73,7 @@ set tagged_ptr_addr [get_hexadecimal_valueof $tagged_ptr_symbol -1]
 
 if {$tagged_ptr_addr == -1} {
     unresolved "unexpected pointer or tag value"
-    return -1
+    return
 }
 
 # Fetch a known pointer to an area not mapped with PROT_MTE.
@@ -82,7 +82,7 @@ set untagged_ptr_addr [get_hexadecimal_valueof $untagged_ptr_symbol -1]
 
 if {$untagged_ptr_addr == -1} {
     unresolved "unexpected pointer or tag value"
-    return -1
+    return
 }
 
 with_test_prefix "literals" {
index 2f90b518fcb6877b9e45a3871ba773f7d8afda1a..8066b2035e1b94b91514ad0c767eb2adfb5db139 100644 (file)
@@ -23,11 +23,11 @@ require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # We need to iterate over two distinct ranges, separated by a single bit.
index e89ec701342a5bd7972056c593628de2b72129bc..6f363097f030b86c786ab3f23d703ee4066ffaed 100644 (file)
@@ -42,11 +42,11 @@ foreach pauth_flag "-mbranch-protection=pac-ret+leaf -msign-return-address=all"
 
 # If we couldn't compile, just bail out.
 if {!$compilation_ok} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint [ gdb_get_line_number "break here" ]
index 98583e84aa9f09802409e3d5abf2dfa18cd1556f..c6fe2e262a5e6446b577f38b80f237fb24a200a1 100644 (file)
@@ -19,7 +19,7 @@ require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
index f2bf2236a9b1a0c45d15de57b061d800151910f0..d43ab468cabece4f8158590e002a5fc39976c183 100644 (file)
@@ -26,7 +26,7 @@ standard_testfile aarch64-pseudo-unwind.c aarch64-pseudo-unwind-asm.S
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
        "${srcfile} ${srcfile2}" {debug}] } {
-    return -1
+    return
 }
 
 clean_restart $testfile
index aff80020cd33dc862eed792865ebed78a5e9305a..740b807e70781314f2c606d6ebe4f70b32ab0534 100644 (file)
@@ -29,11 +29,11 @@ if { ![allow_aarch64_sve_tests] } {
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${compile_flags}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set endianness [get_endianness]
index f3ded57969d2df0dae1a316ab2de49b0cea15e0d..c0c4af53a4f9973e04c29bfaf80f9ffc5c95e38d 100644 (file)
@@ -47,11 +47,11 @@ require !gdb_protocol_is_remote
 set compile_flags {"debug" "macros" "additional_flags=-march=armv8.5-a+sve"}
 standard_testfile
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${compile_flags}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Adjust the repeat count for the test.
index 21242a698cc1867eef347a72600e0984c0f5bf28..12cede6e2eb2b168407fb5d5a57de438ffc9c80c 100644 (file)
@@ -19,11 +19,11 @@ require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "breakpoint here"]
index 7ee2eec43b81c57e9ef27fcb1ea693cc106e0a17..e08b4d1f90ee7ba497d20d89d0c57ebdcec4fe1c 100644 (file)
@@ -22,11 +22,11 @@ require is_aarch64_target
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 proc test_reg_vals {} {
index 31de299c7f16eb13ec7d3ee83b79e25778f70b84..c2685b302012682a9adcc234270c69de59350e8c 100644 (file)
@@ -20,12 +20,12 @@ require is_aarch64_target
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
     untested "could not run to main"
-    return -1
+    return
 }
 
 array set w_values {
index c0516313ee306919cc886827502fc91a18bb7188..703d5d66f4e15a3904dcdeae6a4d28d37bfdb295 100644 (file)
@@ -24,11 +24,11 @@ standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     [list debug text_segment=0xb0000000]] } {
-    return -1
+    return
 }
 
 if { ![runto_main] } {
-    return -1
+    return
 }
 
 gdb_test "next" "${::decimal}\\s+return 0;"
index cb6d9e60b0bfd0e4370710b9507fbfaf111cfcbb..c2ecaffd1d2c702b29e32ea2f68c5781785535a3 100644 (file)
@@ -19,7 +19,7 @@ require {istarget "arm*-*-*"}
 
 standard_testfile
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile ]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
index 8bf9da42a59d1aed867106e989960927df5d74c3..d68c7c85e27997de6341e1c9a4615346a0dc9813 100644 (file)
@@ -22,7 +22,7 @@ require is_aarch32_target
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
-    return -1
+    return
 }
 
 
@@ -407,7 +407,7 @@ proc test_add_rn_pc {} {
 gdb_test_no_output "set displaced-stepping off"
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test_no_output "set displaced-stepping on"
index e15c04420c72e94621c6097214d0ed139ffbc3db..3ef346150d650b1447ea5ab32d59861a3420ac60 100644 (file)
@@ -22,11 +22,11 @@ require allow_float_test
 standard_testfile
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug quiet}] } {
     unsupported "ARM NEON is not supported"
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Test passing vectors in function argument in the inferior call.
index bdfe665ee70b69ab6a25d800dbc64af0698e357f..06a9ba3a74ed43638195845e338e906d06d57e85 100644 (file)
@@ -31,7 +31,7 @@ standard_testfile arm-pseudo-unwind-legacy.c arm-pseudo-unwind-legacy-asm.S
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
        "${srcfile} ${srcfile2}" {debug additional_flags=-marm}] } {
-    return -1
+    return
 }
 
 clean_restart $testfile
index af637d639757b5555a82e87268ca4e09ef446ef1..d2d65f792d59bd08f4a004024ee90f511d7eee0f 100644 (file)
@@ -26,7 +26,7 @@ standard_testfile arm-pseudo-unwind.c arm-pseudo-unwind-asm.S
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
        "${srcfile} ${srcfile2}" {debug additional_flags=-marm}] } {
-    return -1
+    return
 }
 
 clean_restart $testfile
index 78d7c2fbb3af509651a8eaecc7f530ecc7155010..be1e123d265e31290c86c8181a957294a9ca0c30 100644 (file)
@@ -19,11 +19,11 @@ standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
     [list debug]] } {
-    return -1
+    return
 }
 
 if { ![runto_main] } {
-    return -1
+    return
 }
 
 # Initialize kernel_user_helper_version.
@@ -43,7 +43,7 @@ gdb_test_multiple "p kernel_user_helper_version" \
 
 if { !$kernel_helper_supported } {
     unsupported "kernel doesn't have helpers"
-    return 0
+    return
 }
 
 # Get the instruction branching to kernel helper, they can be
index 6c1848593b2182b00e55e794f70c75d118de77d6..5317c9bfae352a7b999bd4a6af4499f6a70fb3bb 100644 (file)
@@ -38,7 +38,7 @@ gdb_load ${binfile}
 #
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Set all the registers to arbitrary values.
index 6086790bc568e7fd2fed3c26f1b08c09da790f98..b543812a50a48e72b00005d9a3c41aedb0595c73 100644 (file)
@@ -22,7 +22,7 @@ standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 clean_restart $testfile
index 3a86ea2e292210dc7f1b3ba2387f27780f635142..29dbfb348931d205e465e2aa6f9ebf10cce17fe6 100644 (file)
@@ -22,11 +22,11 @@ set srcfile ${testfile}.S
 set opts {}
 
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "stepi" "$hex in main \\(\\)" "stepi for bx pc"
index ccf7a235cd732dd820e1399486aa5a86094d7c90..d0eb17927746f89d977a7ded36da967658719707 100644 (file)
@@ -23,7 +23,7 @@ standard_testfile
 # fragments.
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-mthumb"}] != "" } {
     untested "ARM prologue tests"
-    return -1
+    return
 }
 
 
@@ -34,7 +34,7 @@ clean_restart $testfile
 #
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Testcase for TPCS prologue.
index 53fce5770a94cdb1d3b99046d5f1a805898dbaff..cb9f77f4ee76281d8fa007cc929fc9365dd824ce 100644 (file)
@@ -22,11 +22,11 @@ set srcfile ${testfile}.S
 
 set additional_flags "additional_flags=-mthumb"
 if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} [list debug $additional_flags]]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # GDB doesn't skip prologue for asm files, so do one single step to
index d100a34acc1c8e3b5c88068f04a7391c9c2f710c..0c9246b2131e0928a86360fb06251df84625ae3f 100644 (file)
@@ -21,13 +21,13 @@ standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Make sure that the compiler options allow Thumb-2.