Repository navigation
testing/ostest: Add a test of the signal mask of ppoll() and epoll_pwait(). - #4073
Merged
Merged
Conversation
xiaoxiang781216
previously approved these changes
Nov 17, 2026
acassis
previously approved these changes
Nov 18, 2026
casaroli
marked this pull request as ready for review
November 18, 2026 15:00
…ait(). The thread blocks SIGUSR1 and unblocks it only in the mask of ppoll(), pselect() or epoll_pwait(). A SIGUSR1 that is pending before the call, or that comes during the wait, must run the handler before the call gives EINTR. After the call, SIGUSR1 must be blocked again. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
casaroli
dismissed stale reviews from acassis and xiaoxiang781216
via
November 18, 2026 16:38
aefb1e8
casaroli
force-pushed
the
fb-epoll-pwait-signal-test-up
branch
from
November 18, 2026 16:38
d582c4e to
aefb1e8
Compare
xiaoxiang781216
approved these changes
Nov 19, 2026
acassis
approved these changes
Nov 19, 2026
acassis
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
pwait_test()to ostest. The thread blocksSIGUSR1and unblocks it only in the mask ofppoll(),pselect()orepoll_pwait(). For each call there are two cases:SIGUSR1is pending before the call, and another thread sendsSIGUSR1during the wait. The call must returnEINTRafter the handler ran once, andSIGUSR1must be blocked again after the call.The calls wait with no descriptor (an empty fd set, an empty epoll set), so the test needs no pipe and no other driver.
Impact
ostest only. The test is built with
CONFIG_ENABLE_ALL_SIGNALS(it usessigaction()) and pthreads. On a correct kernel it adds about 0.3 s to ostest.On master,
epoll_pwait()fails the test (apache/nuttx#21943 fixes it), so this PR must merge after that one.ppoll()andpselect()pass on master.Testing
QEMU with HVF on an Apple Mac (arm64),
qemu-armv8a:knsh(kernel build) andqemu-armv8a:nsh(flat build).nuttx master, knsh:
nuttx master, nsh:
With apache/nuttx#21943:
pwait_test: PASSandostest_main: Exiting with status 0on knsh and nsh.Also built in
rv-virt:knsh64,rv-virt:knsh,rv-virt:nsh64,lm3s6965-ek:qemu-protected,lm3s6965-ek:qemu-kostestandlm3s6965-ek:qemu-flat.tools/checkpatch.sh -c -u -m -gpasses.