Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Vrany <jan@vrany.io>
To: gdb-patches@sourceware.org
Cc: Jan Vrany <jan@vrany.io>
Subject: [PATCH] gdb/testsuite: use with_timeout_factor in 2 more tests
Date: Mon, 05 Oct 2026 09:52:05 +0000	[thread overview]
Message-ID: <20261005095158.1186551-1-jan@vrany.io> (raw)

When running tests on some really slow targets, I got timeout in
gdb.base/funcargs.exp and gdb.base/completion.exp. The usual remedy I
use is to set timeout to higher value in site.exp.

However this does not help in case of aforementioned tests because they
set timeout to fixed value, 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.

Since with_timeout_factor wraps large chunks of code, I decided not
to reformat (indent) it to make the patch easier to read and to
avoid "noise" when git-blaming.
---
 gdb/testsuite/gdb.base/completion.exp |  6 +++++-
 gdb/testsuite/gdb.base/funcargs.exp   | 11 +++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 44cf649d5b6..f145f084999 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -61,7 +61,8 @@ if {![runto_main]} {
     return
 }
 
-set timeout 30
+with_timeout_factor 3 {
+
 gdb_test_no_output "set max-completions unlimited"
 
 gdb_test_no_output "complete print values\[0\].x." \
@@ -995,3 +996,6 @@ foreach_with_prefix spc { " " "" } {
 	    }
     }
 }
+
+# end of with_timeout_factor
+}
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index fdfdf07b78c..dd3240ba5e0 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -1031,13 +1031,15 @@ proc_with_prefix stepping_over_trampolines { } {
     }
 }
 
-set prev_timeout $timeout
+
 if {[istarget "mips*tx39-*"]} {
-    set timeout 300
+    set timeout_factor 30
 } else {
-    set timeout 60
+    set timeout_factor 6
 }
 
+with_timeout_factor $timeout_factor {
+
 # Determine expected output for unsigned long variables,
 # the output varies with sizeof (unsigned long).
 
@@ -1104,4 +1106,5 @@ call_after_alloca
 localvars_in_indirect_call
 stepping_over_trampolines
 
-set timeout $prev_timeout
+# end of with_timeout_factor
+}
-- 
2.53.0



             reply	other threads:[~2026-10-05  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  9:52 Jan Vrany [this message]
2026-10-05 14:03 ` Simon Marchi
2026-10-06 10:28   ` Jan Vrany

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261005095158.1186551-1-jan@vrany.io \
    --to=jan@vrany.io \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox