]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: use with_timeout_factor in huge.exp testcases
authorJan Vrany <jan.vrany@labware.com>
Thu, 11 Dec 2025 16:21:51 +0000 (16:21 +0000)
committerJan Vrany <jan.vrany@labware.com>
Thu, 11 Dec 2025 16:21:51 +0000 (16:21 +0000)
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 <tom@tromey.com>
gdb/testsuite/gdb.ada/huge.exp
gdb/testsuite/gdb.base/huge.exp
gdb/testsuite/gdb.fortran/huge.exp

index 7bf70037f385212a13ee1dfc631e61217bb32a7c..2d956fd25aa06cd78c23daa0968f44c25e09b47c 100644 (file)
@@ -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
        }
index 4d16466160830c59a20bc82667ab80788367ef11..df5ff13e408c077a9293b667dd13e6b5d0b11258 100644 (file)
@@ -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
     }
index 03ebdaac4bd34940e9c18f2d4276520a506089a1..8a1b78eb4215a5eda48722b22b27c22fb351002f 100644 (file)
@@ -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
     }