public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix duplicates in gdb.fortran/huge.exp
@ 2024-06-20 13:36 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2024-06-20 13:36 UTC (permalink / raw)
  To: gdb-cvs

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

commit 6c58dad0ef53ff7d780c301464e77bdea038c7ec
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Jun 20 15:37:48 2024 +0200

    [gdb/testsuite] Fix duplicates in gdb.fortran/huge.exp
    
    With test-case gdb.fortran/huge.exp, on a system without fortran compiler, I
    ran into a number of duplicates:
    ...
    Running /home/vries/gdb/src/gdb/testsuite/gdb.fortran/huge.exp ...
    gdb compile failed, default_target_compile: Can't find gfortran.
    UNTESTED: gdb.fortran/huge.exp: huge.exp
      ...
    gdb compile failed, default_target_compile: Can't find gfortran.
    UNTESTED: gdb.fortran/huge.exp: huge.exp
    DUPLICATE: gdb.fortran/huge.exp: huge.exp
    UNSUPPORTED: gdb.fortran/huge.exp: require failed: expr $compilation_succeeded
    ...
    
    Fix this by wrapping the compile in a with_test_prefix, getting us instead:
    ...
    gdb compile failed, default_target_compile: Can't find gfortran.
    UNTESTED: gdb.fortran/huge.exp: CRASH_GDB=2097152: huge.exp
      ...
    gdb compile failed, default_target_compile: Can't find gfortran.
    UNTESTED: gdb.fortran/huge.exp: CRASH_GDB=16: huge.exp
    UNSUPPORTED: gdb.fortran/huge.exp: require failed: expr $compilation_succeeded
    ...
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.fortran/huge.exp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.fortran/huge.exp b/gdb/testsuite/gdb.fortran/huge.exp
index 8d2158f172b..78c1d521e2a 100644
--- a/gdb/testsuite/gdb.fortran/huge.exp
+++ b/gdb/testsuite/gdb.fortran/huge.exp
@@ -37,8 +37,10 @@ lappend opts f90
 set compilation_succeeded 0
 for { set size [expr $max] } { $size >= $min } { set size [expr $size / 2] } {
     set try_opts [concat $opts [list additional_flags=-DCRASH_GDB=$size]]
-    if { [build_executable $testfile.exp $testfile $srcfile $try_opts] == -1 } {
-	continue
+    with_test_prefix CRASH_GDB=$size {
+	if { [build_executable $testfile.exp $testfile $srcfile $try_opts] == -1 } {
+	    continue
+	}
     }
 
     set compilation_succeeded 1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-20 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-20 13:36 [binutils-gdb] [gdb/testsuite] Fix duplicates in gdb.fortran/huge.exp Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).