[PATCH 0/3] tests/qtest: npcm7xx test fixes

Havard Skinnemoen via posted 3 patches 3 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201103011457.2959989-1-hskinnemoen@google.com
Maintainers: Tyrone Ting <kfting@nuvoton.com>, Paolo Bonzini <pbonzini@redhat.com>, Havard Skinnemoen <hskinnemoen@google.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>
tests/qtest/npcm7xx_gpio-test.c           |  1 -
tests/qtest/npcm7xx_rng-test.c            | 15 +++++++++++++--
tests/qtest/npcm7xx_timer-test.c          |  1 -
tests/qtest/npcm7xx_watchdog_timer-test.c |  1 -
4 files changed, 13 insertions(+), 5 deletions(-)
[PATCH 0/3] tests/qtest: npcm7xx test fixes
Posted by Havard Skinnemoen via 3 years, 6 months ago
This series contains a fix for the randomness calculation in npcm7xx_rng-test.
It also makes test failures fatal. The last patch would have dumped the random
data to stderr if the randomness test fails, except now that failures are
fatal, it never actually gets a chance to do that.

It may not make sense to apply all three, but I'd definitely take (1), and I'll
leave it up to you whether to apply (2), (3) or both.

Havard Skinnemoen (3):
  tests/qtest/npcm7xx_rng-test: count runs properly
  tests/qtest/npcm7xx: Don't call g_test_set_nonfatal_assertions
  tests/qtest/npcm7xx_rng-test: dump random data on failure

 tests/qtest/npcm7xx_gpio-test.c           |  1 -
 tests/qtest/npcm7xx_rng-test.c            | 15 +++++++++++++--
 tests/qtest/npcm7xx_timer-test.c          |  1 -
 tests/qtest/npcm7xx_watchdog_timer-test.c |  1 -
 4 files changed, 13 insertions(+), 5 deletions(-)

-- 
2.29.1.341.ge80a0c044ae-goog


Re: [PATCH 0/3] tests/qtest: npcm7xx test fixes
Posted by Philippe Mathieu-Daudé 3 years, 6 months ago
Cc'ing Daniel (patches 1-3) & Marc-André (2).

On 11/3/20 2:14 AM, Havard Skinnemoen via wrote:
> This series contains a fix for the randomness calculation in npcm7xx_rng-test.
> It also makes test failures fatal. The last patch would have dumped the random
> data to stderr if the randomness test fails, except now that failures are
> fatal, it never actually gets a chance to do that.
> 
> It may not make sense to apply all three, but I'd definitely take (1), and I'll
> leave it up to you whether to apply (2), (3) or both.
> 
> Havard Skinnemoen (3):
>   tests/qtest/npcm7xx_rng-test: count runs properly
>   tests/qtest/npcm7xx: Don't call g_test_set_nonfatal_assertions
>   tests/qtest/npcm7xx_rng-test: dump random data on failure
> 
>  tests/qtest/npcm7xx_gpio-test.c           |  1 -
>  tests/qtest/npcm7xx_rng-test.c            | 15 +++++++++++++--
>  tests/qtest/npcm7xx_timer-test.c          |  1 -
>  tests/qtest/npcm7xx_watchdog_timer-test.c |  1 -
>  4 files changed, 13 insertions(+), 5 deletions(-)
> 


Re: [PATCH 0/3] tests/qtest: npcm7xx test fixes
Posted by Peter Maydell 3 years, 5 months ago
On Tue, 3 Nov 2020 at 01:52, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> Cc'ing Daniel (patches 1-3) & Marc-André (2).
>
> On 11/3/20 2:14 AM, Havard Skinnemoen via wrote:
> > This series contains a fix for the randomness calculation in npcm7xx_rng-test.
> > It also makes test failures fatal. The last patch would have dumped the random
> > data to stderr if the randomness test fails, except now that failures are
> > fatal, it never actually gets a chance to do that.
> >
> > It may not make sense to apply all three, but I'd definitely take (1), and I'll
> > leave it up to you whether to apply (2), (3) or both.
> >
> > Havard Skinnemoen (3):
> >   tests/qtest/npcm7xx_rng-test: count runs properly
> >   tests/qtest/npcm7xx: Don't call g_test_set_nonfatal_assertions
> >   tests/qtest/npcm7xx_rng-test: dump random data on failure

I've applied patch 1 to target-arm.next but will wait to see
if anybody has an opinion about patches 2 and 3.

thanks
-- PMM

Re: [PATCH 0/3] tests/qtest: npcm7xx test fixes
Posted by Peter Maydell 3 years, 5 months ago
On Tue, 10 Nov 2020 at 10:48, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 3 Nov 2020 at 01:52, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >
> > Cc'ing Daniel (patches 1-3) & Marc-André (2).
> >
> > On 11/3/20 2:14 AM, Havard Skinnemoen via wrote:
> > > This series contains a fix for the randomness calculation in npcm7xx_rng-test.
> > > It also makes test failures fatal. The last patch would have dumped the random
> > > data to stderr if the randomness test fails, except now that failures are
> > > fatal, it never actually gets a chance to do that.
> > >
> > > It may not make sense to apply all three, but I'd definitely take (1), and I'll
> > > leave it up to you whether to apply (2), (3) or both.
> > >
> > > Havard Skinnemoen (3):
> > >   tests/qtest/npcm7xx_rng-test: count runs properly
> > >   tests/qtest/npcm7xx: Don't call g_test_set_nonfatal_assertions
> > >   tests/qtest/npcm7xx_rng-test: dump random data on failure
>
> I've applied patch 1 to target-arm.next but will wait to see
> if anybody has an opinion about patches 2 and 3.

Had a brief conversation on IRC with Dan about this. The nicest
thing to do seems to be to call g_test_set_nonfatal_assertions()
somewhere more generic, but just at the moment there isn't a
place for that. So for the moment I'm going to take patch 3,
and we'll leave the g_test_set_nonfatal_assertions in the npcm7xx
tests; as and when we make that setting more generally we can
remove these specific calls.

thanks
-- PMM