[binutils-gdb] [gdb/testsuite] Fix clean_restart <absolute filename> in gdb.arch/i386*.exp

Tom de Vries vries@sourceware.org
Thu Sep 4 14:15:46 GMT 2025


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

commit eeb28714f7d85d7b981e17dcf195c95b82274b26
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Sep 4 16:15:26 2025 +0200

    [gdb/testsuite] Fix clean_restart <absolute filename> in gdb.arch/i386*.exp
    
    Fix clean_restart <absolute filename> in gdb.arch/i386*.exp.
    
    Tested on x86_64-linux, with target board unix/-m32 and gcc 15.
    
    The only unsupported test-case is gdb.arch/i386-avx512.exp, which isn't
    changed by this commit.

Diff:
---
 gdb/testsuite/gdb.arch/i386-avx.exp                         | 4 ++--
 gdb/testsuite/gdb.arch/i386-bp_permanent.exp                | 2 +-
 gdb/testsuite/gdb.arch/i386-byte.exp                        | 2 +-
 gdb/testsuite/gdb.arch/i386-dr3-watch.exp                   | 2 +-
 gdb/testsuite/gdb.arch/i386-gnu-cfi.exp                     | 2 +-
 gdb/testsuite/gdb.arch/i386-permbkpt.exp                    | 2 +-
 gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp | 2 +-
 gdb/testsuite/gdb.arch/i386-prologue.exp                    | 2 +-
 gdb/testsuite/gdb.arch/i386-signal.exp                      | 2 +-
 gdb/testsuite/gdb.arch/i386-size-overlap.exp                | 2 +-
 gdb/testsuite/gdb.arch/i386-size.exp                        | 2 +-
 gdb/testsuite/gdb.arch/i386-sse.exp                         | 2 +-
 gdb/testsuite/gdb.arch/i386-unwind.exp                      | 2 +-
 gdb/testsuite/gdb.arch/i386-word.exp                        | 2 +-
 14 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp
index 8f07a3d4bea..ba41a8c2071 100644
--- a/gdb/testsuite/gdb.arch/i386-avx.exp
+++ b/gdb/testsuite/gdb.arch/i386-avx.exp
@@ -42,7 +42,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
     return
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 if {![runto_main]} {
     return 0
@@ -93,7 +93,7 @@ with_test_prefix "force-disable xml descriptions" {
 
 	save_vars { GDBFLAGS } {
 	    append GDBFLAGS " -ex \"set remote target-features-packet off\""
-	    clean_restart ${binfile}
+	    clean_restart ${::testfile}
 	}
 
 	if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
index 1d3713f65f1..6eb9ee61deb 100644
--- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
+++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp
@@ -33,7 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
 }
 
 
-clean_restart $binfile
+clean_restart $::testfile
 
 #
 # Run to `main' where we begin our tests.
diff --git a/gdb/testsuite/gdb.arch/i386-byte.exp b/gdb/testsuite/gdb.arch/i386-byte.exp
index dcbcb40d787..1eff9774ae4 100644
--- a/gdb/testsuite/gdb.arch/i386-byte.exp
+++ b/gdb/testsuite/gdb.arch/i386-byte.exp
@@ -28,7 +28,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
     return
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 if {![runto_main]} {
     return 0
diff --git a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp
index 4fe260887f7..11b477378d4 100644
--- a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp
+++ b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp
@@ -23,7 +23,7 @@ require {is_any_target "i?86-*-*" "x86_64-*-*"}
 
 standard_testfile
 
-if [prepare_for_testing "failed to prepare" ${binfile} ${srcfile} {debug $additional_flags}] {
+if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug $additional_flags}] {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
index b51f0345409..c446faec777 100644
--- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
+++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
@@ -40,7 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfilec} ${srcdir}/${subdir}/${srcfile
 
 # Get things started.
 
-clean_restart $binfile
+clean_restart $::testfile
 
 # We should stop in abort(3).
 
diff --git a/gdb/testsuite/gdb.arch/i386-permbkpt.exp b/gdb/testsuite/gdb.arch/i386-permbkpt.exp
index b979d6ebca8..1118cb45ce4 100644
--- a/gdb/testsuite/gdb.arch/i386-permbkpt.exp
+++ b/gdb/testsuite/gdb.arch/i386-permbkpt.exp
@@ -30,7 +30,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 gdb_test "break -q main" "" "first permanent break"
 gdb_test "break -q main" "" "second permanent break"
diff --git a/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp b/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp
index 06285ce8521..b289b848277 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue-skip-cf-protection.exp
@@ -58,7 +58,7 @@ with_test_prefix "skip-cf-protection" {
 	return
     }
 
-    clean_restart ${binfile}
+    clean_restart ${::testfile}
 
     test_run
 }
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index 72246f45751..bfab6d1c167 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -53,7 +53,7 @@ proc skip_breakpoint { msg } {
 }
 
 
-clean_restart $binfile
+clean_restart $::testfile
 
 #
 # Run to `main' where we begin our tests.
diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp
index 30f212b6401..80d1827b95b 100644
--- a/gdb/testsuite/gdb.arch/i386-signal.exp
+++ b/gdb/testsuite/gdb.arch/i386-signal.exp
@@ -30,7 +30,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
     return -1
 }
 
-clean_restart $binfile
+clean_restart $::testfile
 
 runto func
 gdb_test "backtrace 10" \
diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
index ca8383d21ef..db8867325e2 100644
--- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp
+++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
@@ -30,7 +30,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
     return -1
 }
 
-clean_restart $binfile
+clean_restart $::testfile
 
 # We use gdb_run_cmd so this stands a chance to work for remote
 # targets too.
diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp
index b08182f7e94..997e6290f67 100644
--- a/gdb/testsuite/gdb.arch/i386-size.exp
+++ b/gdb/testsuite/gdb.arch/i386-size.exp
@@ -35,7 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
     return -1
 }
 
-clean_restart $binfile
+clean_restart $::testfile
 
 # We use gdb_run_cmd so this stands a chance to work for remote
 # targets too.
diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp
index f0aa5ec5339..154f5ea53cd 100644
--- a/gdb/testsuite/gdb.arch/i386-sse.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse.exp
@@ -40,7 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
     return
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 if {![runto_main]} {
     return 0
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
index 99acfe9dd69..76f0a78d326 100644
--- a/gdb/testsuite/gdb.arch/i386-unwind.exp
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -33,7 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
     return -1
 }
 
-clean_restart $binfile
+clean_restart $::testfile
 
 # Testcase for backtrace/1435.
 
diff --git a/gdb/testsuite/gdb.arch/i386-word.exp b/gdb/testsuite/gdb.arch/i386-word.exp
index 0da49c0f543..ed02d279a82 100644
--- a/gdb/testsuite/gdb.arch/i386-word.exp
+++ b/gdb/testsuite/gdb.arch/i386-word.exp
@@ -28,7 +28,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
     return
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 if {![runto_main]} {
     return 0


More information about the Gdb-cvs mailing list