From: "Alex Bennée" <alex.bennee@linaro.org>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, Tyrone Ting <kfting@nuvoton.com>,
Hao Wu <wuhaotsh@google.com>,
qemu-arm@nongnu.org
Subject: Re: [PATCH] tests/qtest/npcm7xx_watchdog_timer: Only test the corner cases by default
Date: Mon, 15 Jan 2024 11:32:35 +0000 [thread overview]
Message-ID: <87r0iikf1o.fsf@draig.linaro.org> (raw)
In-Reply-To: <20240115070223.30178-1-thuth@redhat.com> (Thomas Huth's message of "Mon, 15 Jan 2024 08:02:23 +0100")
Thomas Huth <thuth@redhat.com> writes:
> The test_prescaler() part in the npcm7xx_watchdog_timer test is quite
> repetive, testing all possible combinations of the WTCLK and WTIS
> bitfields. Since each test spins up a new instance of QEMU, this is
> rather an expensive test, especially on loaded host systems.
I'm not against the change but I do not my home machine runs these tests
in:
1/1 qemu:qtest+qtest-arm / qtest-arm/npcm7xx_timer-test OK 0.18s 180 subtests passed
so I do wonder how the system load can cause such a dramatic increase
for a comparatively simple test.
> For the normal quick test mode, it should be sufficient to test the
> corner settings of these fields (i.e. 0 and 3), so we can speed up
> this test in the default mode quite a bit.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/qtest/npcm7xx_watchdog_timer-test.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qtest/npcm7xx_watchdog_timer-test.c b/tests/qtest/npcm7xx_watchdog_timer-test.c
> index 4773a673b2..981b853c99 100644
> --- a/tests/qtest/npcm7xx_watchdog_timer-test.c
> +++ b/tests/qtest/npcm7xx_watchdog_timer-test.c
> @@ -172,9 +172,10 @@ static void test_reset_action(gconstpointer watchdog)
> static void test_prescaler(gconstpointer watchdog)
> {
> const Watchdog *wd = watchdog;
> + int inc = g_test_quick() ? 3 : 1;
>
> - for (int wtclk = 0; wtclk < 4; ++wtclk) {
> - for (int wtis = 0; wtis < 4; ++wtis) {
> + for (int wtclk = 0; wtclk < 4; wtclk += inc) {
> + for (int wtis = 0; wtis < 4; wtis += inc) {
> QTestState *qts = qtest_init("-machine quanta-gsj");
>
> qtest_irq_intercept_in(qts, "/machine/soc/a9mpcore/gic");
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2024-01-15 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 7:02 [PATCH] tests/qtest/npcm7xx_watchdog_timer: Only test the corner cases by default Thomas Huth
2024-01-15 11:07 ` Philippe Mathieu-Daudé
2024-01-15 11:32 ` Alex Bennée [this message]
2024-01-15 11:36 ` Thomas Huth
2024-01-15 11:45 ` Alex Bennée
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=87r0iikf1o.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=kfting@nuvoton.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=wuhaotsh@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.