[binutils-gdb] testsuites: prune checking gas for CFI / SFrame

Jan Beulich via Binutils-cvs <[email protected]>
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1d26dd821773b17d5f01f7cb2d26d5c6069376e2

commit 1d26dd821773b17d5f01f7cb2d26d5c6069376e2
Author: Jan Beulich <[email protected]>
Date:   Fri Mar 13 10:31:58 2026 +0100

    testsuites: prune checking gas for CFI / SFrame
    
    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.

Diff:
---
 binutils/testsuite/lib/binutils-common.exp | 12 ++++++++++--
 ld/testsuite/lib/ld-lib.exp                | 11 ++++++++---
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 2dafd14e3ee..5026c0c0a9a 100644
--- 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
 }
 
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index f2053fd0f62..1fd4692c2c0 100644
--- 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
 }
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.