]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Improve tm-resched-dscr
authorSam Bobroff <sam.bobroff@au1.ibm.com>
Thu, 17 Aug 2017 01:06:47 +0000 (11:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 17 Aug 2017 11:56:36 +0000 (21:56 +1000)
commit2a8131ae19a65a3ad28723e38cc476caf29867c6
treec18d89646156b9360c8fd2db362e7890799bbf23
parent3063fcf17767c10a0ec15491913ef36f07a17bb4
selftests/powerpc: Improve tm-resched-dscr

The tm-resched-dscr self test can, in some situations, run for
several minutes before being successfully interrupted by the context
switch it needs in order to perform the test. This often seems to
occur when the test is being run in a virtual machine.

Improve the test by running it under eat_cpu() to guarantee
contention for the CPU and increase the chance of a context switch.

In practice this seems to reduce the test time, in some cases, from
more than two minutes to under a second.

Also remove the "progress dots" so that if the test does run for a
long time, it doesn't produce large amounts of unnecessary output.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/tm/Makefile
tools/testing/selftests/powerpc/tm/tm-resched-dscr.c