From: Tom de Vries Date: Wed, 3 Sep 2025 14:43:34 +0000 (+0200) Subject: [gdb/testsuite] Fix clean_restart in gdb.fortran X-Git-Tag: gdb-17-branchpoint~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=683076ce0d01837df2b85dd1c2a36652522f244f;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix clean_restart in gdb.fortran Fix clean_restart in the test-cases in gdb.fortran. Tested on x86_64-linux, with gcc 14. --- diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp index b1e3dad01bb..f0b649b73ef 100644 --- a/gdb/testsuite/gdb.fortran/array-slices.exp +++ b/gdb/testsuite/gdb.fortran/array-slices.exp @@ -56,7 +56,7 @@ proc array_slice_to_var { slice_str } { proc run_test { repack } { global binfile gdb_prompt - clean_restart ${binfile} + clean_restart ${::testfile} if ![fortran_runto_main] { return -1 diff --git a/gdb/testsuite/gdb.fortran/call-no-debug.exp b/gdb/testsuite/gdb.fortran/call-no-debug.exp index 1b158c42ca3..75298cccb8d 100644 --- a/gdb/testsuite/gdb.fortran/call-no-debug.exp +++ b/gdb/testsuite/gdb.fortran/call-no-debug.exp @@ -22,7 +22,7 @@ standard_testfile call-no-debug-prog.f90 call-no-debug-func.f90 load_lib fortran.exp if {[prepare_for_testing_full "failed to prepare" \ - [list ${binfile} [list debug f90] \ + [list $testfile [list debug f90] \ $srcfile [list debug f90] \ $srcfile2 [list nodebug f90]]]} { return -1 diff --git a/gdb/testsuite/gdb.fortran/huge.exp b/gdb/testsuite/gdb.fortran/huge.exp index 35bc6c8fbfa..47bac7805ad 100644 --- a/gdb/testsuite/gdb.fortran/huge.exp +++ b/gdb/testsuite/gdb.fortran/huge.exp @@ -49,7 +49,7 @@ for { set size [expr $max] } { $size >= $min } { set size [expr $size / 2] } { require {expr $compilation_succeeded} # Start with a fresh gdb. -clean_restart ${binfile} +clean_restart ${::testfile} save_vars { timeout } { set timeout 30 diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp index ac8f742bd6a..b59fb2c10ab 100644 --- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp +++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp @@ -28,7 +28,7 @@ require allow_fortran_tests standard_testfile mixed-lang-stack.c mixed-lang-stack.cpp mixed-lang-stack.f90 if {[prepare_for_testing_full "failed to prepare" \ - [list ${binfile} {debug f90 additional_flags=-lstdc++} \ + [list $testfile {debug f90 additional_flags=-lstdc++} \ $srcfile {debug} \ $srcfile2 {debug c++ additional_flags=-std=c++11} \ $srcfile3 {debug f90}]]} { @@ -43,7 +43,7 @@ proc run_tests { lang } { with_test_prefix "lang=${lang}" { global binfile hex have_index - clean_restart ${binfile} + clean_restart ${::testfile} if ![runto_main] { return -1