RISC-V: selftests: Convert hwprobe test to kselftest API
authorAndrew Jones <ajones@ventanamicro.com>
Mon, 18 Sep 2023 13:15:24 +0000 (15:15 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 21 Sep 2023 11:22:27 +0000 (04:22 -0700)
commit2f248e0f8a6aa7199f435d77d94b53cf647e7d7b
tree3ee2c6ce007644104de65b8c9a19dd2fa091603f
parentfc9fdf2c5ab71e27e64b9e14606b677cc2e45884
RISC-V: selftests: Convert hwprobe test to kselftest API

Returning (exiting with) negative exit codes isn't user friendly,
because the user must output the exit code with the shell, convert it
from its unsigned 8-bit value back to the negative value, and then
look up where that comes from in the code (which may be multiple
places). Use the kselftests TAP interface, instead.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20230918131518.56803-13-ajones@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
tools/testing/selftests/riscv/hwprobe/hwprobe.c