[binutils-gdb] gas/testsuite: add runtest_file_p filtering to run_list_test and run_elf_list_test

Fangrui Song maskray@sourceware.org
Wed Feb 25 07:22:40 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6a42f410f05012644079b6cac80e89863676adc3

commit 6a42f410f05012644079b6cac80e89863676adc3
Author: Fangrui Song <maskray@sourceware.org>
Date:   Tue Feb 24 21:07:15 2026 -0800

    gas/testsuite: add runtest_file_p filtering to run_list_test and run_elf_list_test
    
    so that run_list_test and run_elf_list_test honor
    RUNTESTFLAGS="elf.exp=PATTERN" like run_dump_test.

Diff:
---
 gas/testsuite/gas/elf/elf.exp  | 5 ++++-
 gas/testsuite/lib/gas-defs.exp | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 07acb4ad514..b8c12711942 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -20,7 +20,10 @@
 
 proc run_elf_list_test { name suffix opts readelf_opts readelf_pipe } {
     global READELF
-    global srcdir subdir
+    global srcdir subdir runtests
+    if ![runtest_file_p $runtests $name] then {
+	return
+    }
     set testname "elf $name list"
     set file $srcdir/$subdir/$name
     gas_run ${name}.s "$opts -o dump.o" ">&dump.out"
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp
index 45f940fba22..531240a3e08 100644
--- a/gas/testsuite/lib/gas-defs.exp
+++ b/gas/testsuite/lib/gas-defs.exp
@@ -378,7 +378,10 @@ proc verbose_eval { expr { level 1 } } {
 # it will be used as the name of the test.
 
 proc run_list_test { name {opts {}} {testname {}} } {
-    global srcdir subdir
+    global srcdir subdir runtests
+    if ![runtest_file_p $runtests $name] then {
+	return
+    }
     if { [string length $testname] == 0 } then {
 	set testname "[file tail $subdir] $name"
     }


More information about the Binutils-cvs mailing list