Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Jan Vrany <jan@vrany.io>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: use with_timeout_factor in 2 more tests
Date: Mon, 5 Oct 2026 10:03:02 -0400	[thread overview]
Message-ID: <4da1ade7-98ec-4d80-94a3-079fe0bb72b4@simark.ca> (raw)
In-Reply-To: <20261005095158.1186551-1-jan@vrany.io>

On 10/5/26 5:52 AM, Jan Vrany wrote:
> 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.

I'd be curious to know which tests in those files exactly, see if we can
improve either the test or GDB.

> 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.

I would suggest do the re-indent.  I find readability of current code
more important than hypothetic git-blamability.  Plus, I believe that
anyone doing any serious git-blaming should use a better tool than plain
bit-blame, allowing to easily jump over uninteresting commits (for
instance, I use "tig blame" and jumping over an uninteresting commit is
one keystroke).

> ---
>  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
>  }

I would suggest getting rid of this special "mips*tx39-*" case.

LGTM with those fixed.

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon

  reply	other threads:[~2026-10-05 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  9:52 Jan Vrany
2026-10-05 14:03 ` Simon Marchi [this message]
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=4da1ade7-98ec-4d80-94a3-079fe0bb72b4@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=jan@vrany.io \
    /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