From: Jacob Bachmeyer <jcb62281@gmail.com>
To: "Maciej W. Rozycki" <macro@embecosm.com>
Cc: dejagnu@gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH DejaGNU 1/1] Support per-test execution timeout factor
Date: Tue, 12 Dec 2023 21:48:29 -0600 [thread overview]
Message-ID: <6579298D.1010507@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.2312111745200.5892@tpp.orcam.me.uk>
Maciej W. Rozycki wrote:
> Add support for the `test_timeout_factor' global variable letting a test
> case scale the wait timeout used for code execution. This is useful for
> particularly slow test cases for which increasing the wait timeout
> globally would be excessive.
>
> * baseboards/qemu.exp (qemu_load): Handle `test_timeout_factor'.
> * config/gdb-comm.exp (gdb_comm_load): Likewise.
> * config/gdb_stub.exp (gdb_stub_load): Likewise.
> * config/sim.exp (sim_load): Likewise.
> * config/unix.exp (unix_load): Likewise.
> * doc/dejagnu.texi (Local configuration file): Document
> `test_timeout_factor'.
> [...snip full diff...]
First, a minor technical issue: brace your expr(n) expressions like this:
set wait_timeout [expr { $wait_timeout * $test_timeout_factor }]
The Tcl expr(n) manpage recommends that style and explains a few
situations where it is actually required for non-surprising results and
that Tcl's optimizations work better if the expression to expr is
braced. All expr calls in new code in DejaGnu should have the braces.
Second, I need some more explanation how this fits together because I
have some concerns about confusion between various timeouts. In your
introduction to this patch pair, you note that the test execution
timeout and tool execution timeout are different. My main concern is
that "test_timeout_factor" (and for that matter, "test_timeout") may be
badly named, or we need a more coherent model of testing with DejaGnu.
(More precisely, we need better documentation...)
The anticipated confusion stems from the question of what exactly is the
interval of a test? In other words, what is the interval limited by
"test_timeout"? When does the clock start ticking and when does it stop
before the alarm goes off? (I have some suspicions that those answers
are annoyingly counter-intuitive, which means I will have to write more
documentation...)
Lastly, I note no objection to the dg-test-timeout-factor extension; as
far as I can tell, dg.exp is designed to be extended in that way, so
this is a supported extension point instead of an unsupportable monkeypatch.
-- Jacob
next prev parent reply other threads:[~2023-12-13 3:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 14:04 [PATCH DejaGNU/GCC 0/1] " Maciej W. Rozycki
2023-12-12 14:04 ` [PATCH DejaGNU 1/1] " Maciej W. Rozycki
2023-12-12 23:02 ` Jeff Law
2023-12-13 3:48 ` Jacob Bachmeyer [this message]
2023-12-12 14:04 ` [PATCH GCC 1/1] testsuite: Support test execution timeout factor as a keyword Maciej W. Rozycki
2023-12-12 23:03 ` Jeff Law
2024-01-03 5:15 ` [PATCH DejaGNU/GCC 0/1] Support per-test execution timeout factor Hans-Peter Nilsson
2024-01-03 16:38 ` Maciej W. Rozycki
2024-01-03 23:00 ` Richard Sandiford
2024-01-04 3:18 ` Generalizing DejaGnu timeout scaling (was: Re: [PATCH DejaGNU/GCC 0/1] Support per-test execution timeout factor) Jacob Bachmeyer
2024-01-04 4:59 ` Hans-Peter Nilsson
2024-01-05 2:27 ` Generalizing DejaGnu timeout scaling Jacob Bachmeyer
2024-01-04 4:52 ` [PATCH DejaGNU/GCC 0/1] Support per-test execution timeout factor Hans-Peter Nilsson
2024-02-01 20:18 ` Maciej W. Rozycki
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=6579298D.1010507@gmail.com \
--to=jcb62281@gmail.com \
--cc=dejagnu@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=macro@embecosm.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).