[PATCH 2/4] testsuites: prune checking gas for CFI / SFrame

Jan Beulich jbeulich@suse.com
Tue Mar 3 15:44:22 GMT 2026


Both leave the generated assembler file around. Maybe that's okay-ish
when left in tmpdir/, but the main directories really shouldn't be
cluttered. The file actually doesn't even need putting there when not
working with a remote host.

The SFrame test additionally leaves an a.out file in the main directory,
then the assembler output isn't really of interest anyway.

--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -492,10 +492,14 @@ proc gas_sframe_check {} {
     puts $as_fh "\t.cfi_startproc"
     puts $as_fh "\t.cfi_endproc"
     close $as_fh
-    remote_download host $as_file
+    if [is_remote host] {
+        set src [remote_download host $as_file]
+    } else {
+        set src $as_file
+    }
     verbose -log "Checking SFrame support in AS:"
 
-    set status [remote_exec host "$AS $ASFLAGS --gsframe $as_file"]
+    set status [remote_exec host "$AS $ASFLAGS --gsframe -o /dev/null $src"]
 
     if { [lindex $status 0] != 0 } then {
 	verbose -log "SFrame not supported in AS"
@@ -504,6 +508,10 @@ proc gas_sframe_check {} {
 	verbose -log "SFrame supported in AS"
 	set check_as_sframe_result 1
     }
+
+    remote_file host delete $src
+    file delete $as_file
+
     return $check_as_sframe_result
 }
 
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1513,10 +1513,15 @@ proc check_as_cfi { } {
     puts $as_fh "\t.cfi_startproc"
     puts $as_fh "\t.cfi_endproc"
     close $as_fh
-    remote_download host $as_file
+    if [is_remote host] {
+        set src [remote_download host $as_file]
+    } else {
+        set src $as_file
+    }
     verbose -log "Checking CFI support:"
-    set success [ld_assemble $as $as_file "/dev/null"]
-    #remote_file host delete $as_file
+    set success [ld_assemble $as $src "/dev/null"]
+    remote_file host delete $src
+    file delete $as_file
     set check_as_cfi_result $success
     return $success
 }



More information about the Binutils mailing list