selftests/powerpc/dscr: Add lockstep test cases to DSCR explicit tests
authorBenjamin Gray <bgray@linux.ibm.com>
Thu, 6 Apr 2023 04:33:17 +0000 (14:33 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2023 03:21:45 +0000 (13:21 +1000)
commitfda8158870063b99b88a0904bbb95188973b4297
tree6bfe5e4fe8f2f170f2842cc7e2c2dec15aeacd42
parent6ff4dc25483f3f49d1db48af28d4c485fc77bd21
selftests/powerpc/dscr: Add lockstep test cases to DSCR explicit tests

Add new cases to the relevant tests that use explicitly synchronized
threads to test the behaviour across context switches with less
randomness. By locking the participants to the same CPU we guarantee a
context switch occurs each time they make progress, which is a likely
failure point if the kernel is not tracking the thread local DSCR
correctly.

The random case is left in to keep exercising potential edge cases.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230406043320.125138-5-bgray@linux.ibm.com
tools/testing/selftests/powerpc/dscr/Makefile
tools/testing/selftests/powerpc/dscr/dscr_default_test.c
tools/testing/selftests/powerpc/dscr/dscr_explicit_test.c