Skip to content

tests: handle ENOSYS in multiplexing syscall tests#4425

Merged
karelzak merged 1 commit into
util-linux:masterfrom
karelzak:PR/lsfd-mkfds-enosys
Jun 16, 2026
Merged

tests: handle ENOSYS in multiplexing syscall tests#4425
karelzak merged 1 commit into
util-linux:masterfrom
karelzak:PR/lsfd-mkfds-enosys

Conversation

@karelzak

Copy link
Copy Markdown
Collaborator

Summary

  • On ppc64le, __NR_select is defined at compile time but the kernel returns
    ENOSYS at runtime, causing the lsfd/mkfds-multiplexing test to fail due to
    a race between the helper process dying and the bash script checking its state
  • Exit with EXIT_ENOSYS (23) from both DEFUN_WAIT_EVENT_SELECT and
    DEFUN_WAIT_EVENT_POLL macros when the multiplexer syscall returns ENOSYS
  • Check the coproc exit code in the bash test and skip the subtest cleanly

On ppc64le, __NR_select is defined at compile time, so test_mkfds -W
lists "select" as available. However, the kernel returns ENOSYS at
runtime. The helper process prints its PID, then calls select() which
fails immediately with ENOSYS. This creates a race where the bash
script's kill -0 liveness check can succeed while the process is
still dying, causing lsfd to run against a dead process and produce
wrong output.

Exit with EXIT_ENOSYS (23) instead of EXIT_FAILURE when the
multiplexer syscall returns ENOSYS. This applies to both
DEFUN_WAIT_EVENT_SELECT and DEFUN_WAIT_EVENT_POLL macros.

In the bash test, check the wait exit code for 23 after the coproc
finishes and skip the subtest cleanly.

Signed-off-by: Karel Zak <kzak@redhat.com>
@karelzak karelzak merged commit 398ad5d into util-linux:master Jun 16, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant