selftests/powerpc: Fix error handling in FPU/VMX preemption tests
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Nov 2023 13:27:44 +0000 (00:27 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Dec 2023 02:29:08 +0000 (13:29 +1100)
commit9dbd5927408c4a0707de73ae9dd9306b184e8fee
treeae259a850e994194772bf29254444986ca283a1d
parent402928b58ec62b42b11992a7b51ff2f56ed65a18
selftests/powerpc: Fix error handling in FPU/VMX preemption tests

The FPU & VMX preemption tests do not check for errors returned by the
low-level asm routines, preempt_fpu() / preempt_vsx() respectively.
That means any register corruption detected by the asm routines does not
result in a test failure.

Fix it by returning the return value of the asm routines from the
pthread child routines.

Fixes: e5ab8be68e44 ("selftests/powerpc: Test preservation of FPU and VMX regs across preemption")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231128132748.1990179-1-mpe@ellerman.id.au
tools/testing/selftests/powerpc/math/fpu_preempt.c
tools/testing/selftests/powerpc/math/vmx_preempt.c