public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: Bertrand Drouvot <[email protected]>
Cc: [email protected]
Subject: Re: meson: Adjust test timeout for Valgrind builds
Date: Mon, 6 Apr 2026 09:25:46 -0400
Message-ID: <qqd4723zxp6rfi3c7apyi6vzffijrvaajyhoppd7q2ns3kz45u@duxmofii2f4n> (raw)
In-Reply-To: <ac/[email protected]>
References: <ac/[email protected]>

Hi,

On 2026-04-03 14:53:15 +0000, Bertrand Drouvot wrote:
> When building with -DUSE_VALGRIND, tests run significantly slower due
> to Valgrind's instrumentation overhead, causing the default 1000s test's timeout
> to be exceeded. Example when running the regress test suite:
> 
> "
> $ meson test -C build -q --print-errorlogs --setup running --suite regress-running
> regress-running - postgresql:regress-running/regress time out (After 1000 seconds)
> 
> Summary of Failures:
> 
> 1/1 regress-running - postgresql:regress-running/regress TIMEOUT        1000.01s
> 
> Ok:                0
> Fail:              0
> Timeout:           1
> "
> 
> PFA a patch that detects Valgrind builds using a compiler check, which correctly
> handles USE_VALGRIND being passed via -Dc_args, CPPFLAGS or CFLAGS and increases
> the test timeout to 10000s in that case.
> 
> I don't have a strong opinion on the new value. In practice, the regress
> suite runs in about 30 seconds without Valgrind and in about 46 minutes with
> Valgrind on my setup. Note that the timeout is per test, not for the entire
> suite so that 10000s looks large enough (I tested to run the entire suite with
> the patch and it did not produce any timeout).
> 
> Another option could be to disable the timeout on a Valgrind build (set timeout
> to 0) but then a test could block forever.
> 
> Note that there are no changes needed for autoconf as it does not set a timeout
> for the tests.

The usual way to deal with that is to pass --timeout-multiplier=100 or
something like that to meson test.

Greetings,

Andres





view thread (4+ messages)  latest in thread

reply

Reply instructions:

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

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: meson: Adjust test timeout for Valgrind builds
  In-Reply-To: <qqd4723zxp6rfi3c7apyi6vzffijrvaajyhoppd7q2ns3kz45u@duxmofii2f4n>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox