[PATCH] docs: Document TIMEOUT_MULTIPLIER for raising test timeouts

Peter Maydell posted 1 patch 3 weeks, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260427161132.1463385-1-peter.maydell@linaro.org
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
docs/devel/testing/main.rst | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
[PATCH] docs: Document TIMEOUT_MULTIPLIER for raising test timeouts
Posted by Peter Maydell 3 weeks, 6 days ago
Our test infrastructure allows you to set the TIMEOUT_MULTIPLIER
environment variable to raise the test timeouts if you're building
for a slow environment.  (scripts/mtest2make.py reads it and sets the
meson test -t argument accordingly.)

Document this so it's not a secret feature only known to a select
few.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 docs/devel/testing/main.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst
index 0662766b5c..b01a374865 100644
--- a/docs/devel/testing/main.rst
+++ b/docs/devel/testing/main.rst
@@ -52,6 +52,21 @@ Before running tests, it is best to build QEMU programs first. Some tests
 expect the executables to exist and will fail with obscure messages if they
 cannot find them.
 
+The timeouts for QEMU tests are set conservatively so you should not
+in general find that tests time out. However, if you are running on a
+particularly slow host or with a slow configuration (such as a build
+with the clang address-sanitizer enabled) you can globally raise all
+the timeouts, by setting the ``TIMEOUT_MULTIPLIER`` environment
+variable. For instance:
+
+.. code::
+
+ TIMEOUT_MULTIPLIER=3 make check
+
+will run with all the default timeouts multiplied by three. You can
+also disable timeouts entirely by setting the environment variable to
+``0``.
+
 .. _unit-tests:
 
 Unit tests
@@ -959,6 +974,9 @@ Python. You can run the functional tests simply by executing:
 
 See :ref:`checkfunctional-ref` for more details.
 
+The harness for the functional tests also honours the
+``TIMEOUT_MULTIPLIER`` environment variable.
+
 .. _checktcg-ref:
 
 Testing with "make check-tcg"
-- 
2.43.0
Re: [PATCH] docs: Document TIMEOUT_MULTIPLIER for raising test timeouts
Posted by Pierrick Bouvier 3 weeks, 6 days ago
On 4/27/2026 9:11 AM, Peter Maydell wrote:
> Our test infrastructure allows you to set the TIMEOUT_MULTIPLIER
> environment variable to raise the test timeouts if you're building
> for a slow environment.  (scripts/mtest2make.py reads it and sets the
> meson test -t argument accordingly.)
> 
> Document this so it's not a secret feature only known to a select
> few.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  docs/devel/testing/main.rst | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>