selftests/powerpc: Fix fpu_signal failures
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Mar 2024 10:10:35 +0000 (21:10 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Mar 2024 11:15:30 +0000 (22:15 +1100)
commit380cb2f4df78433f64847cbc655fad2650e4769c
tree7e4fe193d7fb42d51ee5b27b52ed426874024cc6
parentfad87dbd48156ab940538f052f1820f4b6ed2819
selftests/powerpc: Fix fpu_signal failures

My recent commit e5d00aaac651 ("selftests/powerpc: Check all FPRs in
fpu_preempt") inadvertently broke the fpu_signal test.

It needs to take into account that fpu_preempt now loads 32 FPRs, so
enlarge darray.

Also use the newly added randomise_darray() to properly randomise darray.

Finally the checking done in signal_fpu_sig() needs to skip checking
f30/f31, because they are used as scratch registers in check_all_fprs(),
called by preempt_fpu(), and so could hold other values when the signal
is taken.

Fixes: e5d00aaac651 ("selftests/powerpc: Check all FPRs in fpu_preempt")
Reported-by: Spoorthy <spoorthy@linux.ibm.com>
Depends-on: 2ba107f6795d ("selftests/powerpc: Generate better bit patterns for FPU tests")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240301101035.1230024-1-mpe@ellerman.id.au
tools/testing/selftests/powerpc/math/fpu_signal.c