From f40cd30a38beb295c914d8195ff544e3964ab7dd Mon Sep 17 00:00:00 2001 From: Jan Vrany Date: Thu, 11 Dec 2025 16:21:51 +0000 Subject: [PATCH] gdb/testsuite: use with_timeout_factor in huge.exp testcases I occasionally run GDB testsuite on sluggish targets that need higher timeout. The usual remedy I use is to set timeout to higher value in site.exp. This does not help with gdb.fortran/huge.exp, gdb.base/huge.exp and gdb.ada/huge.exp, which set the timeout to fixed value of 30, regardless of whether the timeout has been increased or not, causing them to fail on some of my machines. This commit fixes the problem by using with_timeout_factor. Approved-By: Tom Tromey --- gdb/testsuite/gdb.ada/huge.exp | 4 +--- gdb/testsuite/gdb.base/huge.exp | 4 +--- gdb/testsuite/gdb.fortran/huge.exp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/gdb.ada/huge.exp b/gdb/testsuite/gdb.ada/huge.exp index 7bf70037f38..2d956fd25aa 100644 --- a/gdb/testsuite/gdb.ada/huge.exp +++ b/gdb/testsuite/gdb.ada/huge.exp @@ -51,9 +51,7 @@ require {expr {$compilation_succeeded}} foreach_with_prefix varname {Arr Packed_Arr} { clean_restart ${testfile} - save_vars { timeout } { - set timeout 30 - + with_timeout_factor 3 { if {![runto "foo"]} { return } diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp index 4d164661608..df5ff13e408 100644 --- a/gdb/testsuite/gdb.base/huge.exp +++ b/gdb/testsuite/gdb.base/huge.exp @@ -44,9 +44,7 @@ require {expr {$compilation_succeeded}} # Start with a fresh gdb. clean_restart $testfile -save_vars { timeout } { - set timeout 30 - +with_timeout_factor 3 { if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.fortran/huge.exp b/gdb/testsuite/gdb.fortran/huge.exp index 03ebdaac4bd..8a1b78eb421 100644 --- a/gdb/testsuite/gdb.fortran/huge.exp +++ b/gdb/testsuite/gdb.fortran/huge.exp @@ -51,9 +51,7 @@ require {expr {$compilation_succeeded}} # Start with a fresh gdb. clean_restart ${::testfile} -save_vars { timeout } { - set timeout 30 - +with_timeout_factor 3 { if {![fortran_runto_main]} { return -1 } -- 2.47.3