From: Havard Skinnemoen <hskinnemoen@google.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Tyrone Ting <kfting@nuvoton.com>,
"Daniel P. Berrange" <berrange@redhat.com>
Subject: Re: [PATCH] tests/qtest/npcm7xx_rng-test: Disable randomness tests
Date: Mon, 2 Nov 2020 08:34:05 -0800 [thread overview]
Message-ID: <CAFQmdRbEJCD3t2=6omuq3PC5N6Rzvii5Tw+K3bme76jXGOkCdA@mail.gmail.com> (raw)
In-Reply-To: <20201102152454.8287-1-peter.maydell@linaro.org>
On Mon, Nov 2, 2020 at 7:24 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> The randomness tests in the NPCM7xx RNG test fail intermittently
> but fairly frequently. On my machine running the test in a loop:
> while QTEST_QEMU_BINARY=./qemu-system-aarch64 ./tests/qtest/npcm7xx_rng-test; do true; done
>
> will fail in less than a minute with an error like:
> ERROR:../../tests/qtest/npcm7xx_rng-test.c:256:test_first_byte_runs:
> assertion failed (calc_runs_p(buf.l, sizeof(buf) * BITS_PER_BYTE) > 0.01): (0.00286205989 > 0.01)
>
> (Failures have been observed on all 4 of the randomness tests,
> not just first_byte_runs.)
>
> It's not clear why these tests are failing like this, but intermittent
> failures make CI and merge testing awkward, so disable running them
> unless a developer specifically sets QEMU_TEST_FLAKY_RNG_TESTS when
> running the test suite, until we work out the cause.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> tests/qtest/npcm7xx_rng-test.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/tests/qtest/npcm7xx_rng-test.c b/tests/qtest/npcm7xx_rng-test.c
> index da6e639bf6f..e7cde85fbbc 100644
> --- a/tests/qtest/npcm7xx_rng-test.c
> +++ b/tests/qtest/npcm7xx_rng-test.c
> @@ -265,10 +265,16 @@ int main(int argc, char **argv)
>
> qtest_add_func("npcm7xx_rng/enable_disable", test_enable_disable);
> qtest_add_func("npcm7xx_rng/rosel", test_rosel);
> - qtest_add_func("npcm7xx_rng/continuous/monobit", test_continuous_monobit);
> - qtest_add_func("npcm7xx_rng/continuous/runs", test_continuous_runs);
> - qtest_add_func("npcm7xx_rng/first_byte/monobit", test_first_byte_monobit);
> - qtest_add_func("npcm7xx_rng/first_byte/runs", test_first_byte_runs);
> + /*
> + * These tests fail intermittently; only run them on explicit
> + * request until we figure out why.
> + */
> + if (getenv("QEMU_TEST_FLAKY_RNG_TESTS")) {
> + qtest_add_func("npcm7xx_rng/continuous/monobit", test_continuous_monobit);
> + qtest_add_func("npcm7xx_rng/continuous/runs", test_continuous_runs);
> + qtest_add_func("npcm7xx_rng/first_byte/monobit", test_first_byte_monobit);
> + qtest_add_func("npcm7xx_rng/first_byte/runs", test_first_byte_runs);
> + }
Reviewed-by: Havard Skinnemoen <hskinnemoen@google.com>
Thanks!
> qtest_start("-machine npcm750-evb");
> ret = g_test_run();
> --
> 2.20.1
>
prev parent reply other threads:[~2020-11-02 16:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 15:24 [PATCH] tests/qtest/npcm7xx_rng-test: Disable randomness tests Peter Maydell
2020-11-02 15:43 ` Philippe Mathieu-Daudé
2020-11-02 16:34 ` Havard Skinnemoen [this message]
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='CAFQmdRbEJCD3t2=6omuq3PC5N6Rzvii5Tw+K3bme76jXGOkCdA@mail.gmail.com' \
--to=hskinnemoen@google.com \
--cc=berrange@redhat.com \
--cc=kfting@nuvoton.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 NNTP newsgroup(s).