selftests/powerpc: Add more utility macros
authorBenjamin Gray <bgray@linux.ibm.com>
Mon, 19 Jun 2023 07:36:27 +0000 (17:36 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 19 Jun 2023 07:36:27 +0000 (17:36 +1000)
commitb9125c9aa043a7556626e1aafb3190c61c1e2b2b
treef3976015b6a3883fd64f3b17b29fdccf3e7ecb00
parent65d6c884bfbd38235659e6df193345e5ad874043
selftests/powerpc: Add more utility macros

Adds _MSG assertion variants to provide more context behind why a
failure occurred. Also include unistd.h for _exit() and stdio.h for
fprintf(), and move ARRAY_SIZE macro to utils.h.

The _MSG variants and ARRAY_SIZE will be used by the following
DEXCR selftests.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230616034846.311705-10-bgray@linux.ibm.com
tools/testing/selftests/powerpc/include/utils.h
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h