Skip to content

selftests: riscv: vector: Fix the checks of the child's exit status

Danish Khateeb linux-kselftest linux-riscv lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2selftests: riscv: vstate_exec_nolibc: Check the return value of waitpid()tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c+4 -00 replies
2/2selftests: riscv: vector: Fix the check for children exiting with -1tools/testing/selftests/riscv/vector/v_helpers.c tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] selftests: riscv: vector: Fix the checks of the child's exit status

Two fixes for vstate_exec_nolibc, found through a kernel test robot warning [1]. Patch 1 checks the return value of waitpid(), which GCC warns about. Patch 2 fixes a check which never matches, so that a child reporting a failure no longer lets the tests pass.

Tested in QEMU (virt, rv64 with and without V) on a v7.3-rc1 defconfig kernel, running vstate_prctl as init:

- vstate_prctl passes 13/13 with and without the series.
- With the child's vstate_ctrl check forced to fail, it still passes 13/13 without patch 2, and fails the 6 affected tests with it.
- The warning is gone with GCC 14.2 and 16.2.

[1] https://lore.kernel.org/r/[email protected]/

Danish Khateeb (2):
selftests: riscv: vstate_exec_nolibc: Check the return value of
waitpid()
selftests: riscv: vector: Fix the check for children exiting with -1

 tools/testing/selftests/riscv/vector/v_helpers.c          | 2 +-
 tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

base-commit: a06776565b9e73512e880a95b66c198ae8e7e24a

Signature · 1 line
2.55.0