]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.arch/aarch64*.exp
authorTom de Vries <tdevries@suse.de>
Thu, 4 Sep 2025 14:15:26 +0000 (16:15 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 4 Sep 2025 14:15:26 +0000 (16:15 +0200)
Fix clean_restart <absolute filename> in gdb.arch/aarch64*.exp.

Tested on aarch64-linux, M1 system.

There's a large number (44) of unsupported, for the following reasons:
- allow_aarch64_gcs_tests
- allow_aarch64_mops_tests
- allow_aarch64_sve_tests / target does not support SVE
- memory tagging unsupported

Consequently, we mostly use the simple substitution:
...
clean_restart $binfile
->
clean_restart
gdb_load $binfile
...

gdb/testsuite/gdb.arch/aarch64-gcs-core.exp
gdb/testsuite/gdb.arch/aarch64-gcs-return.exp
gdb/testsuite/gdb.arch/aarch64-gcs.exp
gdb/testsuite/gdb.arch/aarch64-mte-core.exp
gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.exp
gdb/testsuite/gdb.arch/aarch64-sme-core.exp.tcl
gdb/testsuite/lib/gdb.exp

index 2261ac88354d62d323d4629e17e101485396e079..9c4b7d5570c04a421ef5f8041b5dfd06e7f61f33 100644 (file)
@@ -61,7 +61,8 @@ if {!$core_generated} {
 }
 
 if {$core_generated} {
-    clean_restart $binfile
+    clean_restart
+    gdb_load $binfile
 
     with_test_prefix "OS corefile" {
        # Read GCSPR value from saved output of the test program.
@@ -78,7 +79,8 @@ if ![gcore_cmd_available] {
     return
 }
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 if ![runto $linespec] {
     return
@@ -105,7 +107,8 @@ set gcore_generated [gdb_gcore_cmd "$gcore_filename" "generate gcore file"]
 
 gdb_assert { $gcore_generated } "gcore corefile created"
 if {$gcore_generated} {
-    clean_restart $binfile
+    clean_restart
+    gdb_load $binfile
 
     with_test_prefix "gcore corefile" {
        check_core_file $gcore_filename $gcspr_in_gcore
index 1d1c2376e456967e3e04a4ee7f27b9ea8db5b585..6f695da50fb006434226b4922c18af70e1e58245 100644 (file)
@@ -37,7 +37,8 @@ if ![runto ${begin_line}] {
 
 proc restart_and_run_infcall_call2 {} {
     global binfile call2_line
-    clean_restart ${binfile}
+    clean_restart
+    gdb_load $binfile
     if ![runto_main] {
        return
     }
@@ -79,7 +80,8 @@ with_test_prefix "test return 'above' an inferior call" {
     gdb_continue_to_end
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 if ![runto ${begin_line}] {
     return
 }
@@ -110,7 +112,8 @@ with_test_prefix "test return from current frame" {
     gdb_continue_to_end
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 if ![runto_main] {
     return
 }
index ad73b41324061236b6e24b23ced70a1865f7e335..b09e010459a2aa9246ce7ab46d4c764fb141785e 100644 (file)
@@ -78,7 +78,8 @@ gdb_test "print \$gcspr == \$gcspr_in_main - 16" ". = 1" \
     "test value of gcspr when GCS SIGSEGV happens"
 
 # Test writing to GCSPR.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 if ![runto normal_function0] {
     return
 }
index fdaa06181389dbca8e8c0618fdabfa480ea8ba02..7da836eba249269b31ea6c05f5aa9bb50bd0b1f4 100644 (file)
@@ -145,7 +145,8 @@ proc test_mode { mode } {
     # both correctly.
 
     if {$gcore_generated} {
-       clean_restart ${binfile}
+       clean_restart
+       gdb_load $binfile
        with_test_prefix "gcore corefile" {
            test_mte_core_file $gcore_filename $mode
        }
@@ -154,7 +155,8 @@ proc test_mode { mode } {
     }
 
     if {$core_generated} {
-       clean_restart ${binfile}
+       clean_restart
+       gdb_load $binfile
        with_test_prefix "native corefile" {
            test_mte_core_file $core_filename $mode
        }
index 7ce1fdf38629afc06c9a32ea6b30b0058511cf90..e835ddf2c5a01efbf2f048cd6bfd205a765c7562 100644 (file)
@@ -29,7 +29,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart $testfile
 
 if {![runto_main]} {
     return
index 44d0808c97ed4836af145418049046e9f871eed8..64cfd54c868d228f935d2a3ff9e8b37a525a8f9a 100644 (file)
@@ -91,7 +91,8 @@ proc generate_sme_core_files { executable binfile id state vl svl} {
     # and the native one generated by the Linux Kernel.  Make sure GDB can read
     # both correctly.
     if {$gcore_generated} {
-       clean_restart ${binfile}
+       clean_restart
+       gdb_load $binfile
        gdb_test_no_output "set print repeats 1" \
            "adjust repeat count post-crash gcore"
 
@@ -103,7 +104,8 @@ proc generate_sme_core_files { executable binfile id state vl svl} {
     }
 
     if {$core_generated} {
-       clean_restart ${binfile}
+       clean_restart
+       gdb_load $binfile
 
        gdb_test_no_output "set print repeats 1" \
            "adjust repeat count post-crash native core"
index 1652a76b9bfb3b3037f7210276b96f54c7db5304..5ba1c9059d03e8a3ae5cd7d9127faadd95e9b17b 100644 (file)
@@ -4994,7 +4994,8 @@ gdb_caching_proc allow_aarch64_sve_tests {} {
     }
 
     # Compilation succeeded so now run it via gdb.
-    clean_restart $obj
+    clean_restart
+    gdb_load $obj
     gdb_run_cmd
     gdb_expect {
         -re ".*Illegal instruction.*${gdb_prompt} $" {
@@ -5367,7 +5368,8 @@ gdb_caching_proc allow_aarch64_gcs_tests {} {
 
     # Compilation succeeded so now run it via gdb.
     set allow_gcs_tests 0
-    clean_restart $obj
+    clean_restart
+    gdb_load $obj
     gdb_run_cmd
     gdb_expect {
        -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {