Repository navigation
Conversation
Add a test of the stop and the continue of a child: SIGCHLD with CLD_STOPPED and CLD_CONTINUED, SA_NOCLDSTOP and SA_NOCLDWAIT, waitpid() with WUNTRACED and WCONTINUED and the WIFSTOPPED(), WSTOPSIG() and WIFCONTINUED() status, waitid() with WSTOPPED, WCONTINUED and WNOWAIT, waitpid(0), waitpid(-pgid) and waitid(P_PGID), and SIGKILL to a stopped child. The children are the test program again, started with posix_spawn(), so the test runs in a flat build without fork(). Each wait fails after 5 seconds (alarm()), so a missing report gives FAIL, not a hang. The waitpid(0) case needs CONFIG_SCHED_PROCESS_GROUPS and prints SKIP without it. The program prints one line per check and returns 1 if a check fails. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
xiaoxiang781216
approved these changes
Nov 17, 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.
depends-on: apache/nuttx/pull/21929
depends-on: apache/nuttx/pull/21898
Summary
Add
testing/sched/waitstop, a test of stopped and continued children (apache/nuttx#21929).The test checks
SIGCHLDwithCLD_STOPPEDandCLD_CONTINUED(si_status,si_pid),SA_NOCLDSTOPandSA_NOCLDWAIT,waitpid()withWUNTRACEDandWCONTINUEDand theWIFSTOPPED(),WSTOPSIG()andWIFCONTINUED()status,waitid()withWSTOPPED,WCONTINUED,WNOWAITand a missing event option (EINVAL),waitpid(0),waitpid(-pgid)andwaitid(P_PGID), andSIGKILLto a stopped child.The children are the test program again, started with
posix_spawn(), so the test runs in a flat build withoutfork(). Each wait fails after 5 seconds (alarm()), so a missing report gives FAIL, not a hang. Thewaitpid(0)case needsCONFIG_SCHED_PROCESS_GROUPSand prints SKIP without it. The program prints one line per check and returns 1 if a check fails.The nuttx PR contains the commits of apache/nuttx#21904, which needs apache/nuttx#21898 (the two
depends-onlines).Impact
A new test program, default n. Its Kconfig option depends on
SCHED_CHILD_STATUS,SCHED_WAITPID,SIG_SIGSTOP_ACTION,ENABLE_ALL_SIGNALS,LIBC_EXECFUNCSand notDISABLE_POSIX_TIMERS, so no configuration builds it until it is enabled. No other app changes.Testing
CONFIG_SCHED_PROCESS_GROUPS=y, test compiled against the exportSIG_DEFAULT,SCHED_PROCESS_GROUPSSIG_DEFAULT, no process groupsSIG_DEFAULT,SCHED_PROCESS_GROUPSostest exits with status 0 in the flat runs.
tools/checkpatch.sh -c -u -m -gpasses on the commit.