Skip to content

testing/ostest: Do not expect a blocked SIGKILL or SIGSTOP in sighand. - #4181

Merged
acassis merged 2 commits into
apache:masterfrom
casaroli:ostest-sighand-up
Nov 27, 2026
Merged

acassis merged 2 commits into
apache:masterfrom
casaroli:ostest-sighand-up

Conversation

@casaroli

Copy link
Copy Markdown
Contributor

Summary

wakeup_action() in testing/ostest/sighand.c checks that the signal mask in the handler is the full set (sigfillset()), SIGKILL and SIGSTOP included. POSIX says that SIGKILL and SIGSTOP cannot be blocked, so they are not part of the mask of a handler.

This PR:

  • adds the blank line after a declaration in waiter_main() that nxstyle asks for (no code change; the CI checks the whole file).
  • leaves SIGKILL and SIGSTOP out of both sets before the compare. The case then checks the mask of a handler as POSIX defines it.

Impact

Test only. The other signals are compared as before.

Testing

Host: macOS arm64 (Arm GNU 13.2.Rel1, QEMU 11.1 TCG, cortex-a53). NuttX master 0c45a2fc48b, nuttx-apps master c621be6. Builds with -Werror.

ostest on qemu-armv8a:nsh (flat) and qemu-armv8a:knsh (kernel, ostest from /system/bin), before and after this PR: ostest_main: Exiting with status 0, no assertion.

Builds with -Werror in the CI image: rv-virt:nsh64 and rv-virt:knsh64 with ostest, qemu-armv8a:nsh. 0 warnings (rv-virt has the RWX segment linker warning of master).

tools/checkpatch.sh -c -u -m -g: pass.

nxstyle reports a missing blank line after the declaration of error in
waiter_main().  Add it.  No functional change.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
wakeup_action() checked that the signal mask in the handler is the full
set, SIGKILL and SIGSTOP included.  POSIX says that SIGKILL and SIGSTOP
cannot be blocked, so they are not part of the mask of a handler.

Leave SIGKILL and SIGSTOP out of both sets before the compare.  The case
then checks the mask of a handler as POSIX defines it.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
@acassis
acassis merged commit ecabd4a into apache:master Nov 27, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants