]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite] Fix clean_restart <absolute filename> in gdb.compile
authorTom de Vries <tdevries@suse.de>
Wed, 3 Sep 2025 17:49:55 +0000 (19:49 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 3 Sep 2025 17:49:55 +0000 (19:49 +0200)
Fix clean_restart <absolute filename> in the test-cases in gdb.compile.

Tested on x86_64-linux, fedora rawhide.

gdb/testsuite/gdb.compile/compile-tls.exp
gdb/testsuite/gdb.compile/compile.exp

index aaa8e03b13ca90123ed54af0cf010bae1ff17fc7..e7db1da103103f69bce35ca524999e357e01b4e4 100644 (file)
@@ -26,7 +26,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 if {![runto_main]} {
    return 0
 }
index ff20b2e7c675d7e70f2b6e7ab7d6fa6059ba8e7c..eb87141824ddf355f4c6c3a7aa967f8d45ed472e 100644 (file)
@@ -378,8 +378,9 @@ if { $srcfile3 != "" } {
 
 require allow_shlib_tests
 
-set libbin [standard_output_file ${testfile}-shlib.so]
-set binfile [standard_output_file ${testfile}-shlib]
+set testfile $testfile-shlib
+set libbin [standard_output_file $testfile.so]
+set binfile [standard_output_file $testfile]
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile2} $libbin {debug}] != ""
      || [gdb_compile ${srcdir}/${subdir}/${srcfile} $binfile executable \
@@ -387,7 +388,7 @@ if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile2} $libbin {debug}] != ""
     return -1
 }
 
-clean_restart $binfile
+clean_restart $testfile
 gdb_load_shlib $libbin
 
 if ![runto_main] {