casaroli opened a new pull request, #4068: URL: https://github.com/apache/nuttx-apps/pull/4068
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 `SIGCHLD` with `CLD_STOPPED` and `CLD_CONTINUED` (`si_status`, `si_pid`), `SA_NOCLDSTOP` and `SA_NOCLDWAIT`, `waitpid()` with `WUNTRACED` and `WCONTINUED` and the `WIFSTOPPED()`, `WSTOPSIG()` and `WIFCONTINUED()` status, `waitid()` with `WSTOPPED`, `WCONTINUED`, `WNOWAIT` and a missing event option (`EINVAL`), `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. The nuttx PR contains the commits of apache/nuttx#21904, which needs apache/nuttx#21898 (the two `depends-on` lines). ## Impact A new test program, default n. Its Kconfig option depends on `SCHED_CHILD_STATUS`, `SCHED_WAITPID`, `SIG_SIGSTOP_ACTION`, `ENABLE_ALL_SIGNALS`, `LIBC_EXECFUNCS` and not `DISABLE_POSIX_TIMERS`, so no configuration builds it until it is enabled. No other app changes. ## Testing | Configuration | nuttx with #21904 only | nuttx with the nuttx PR | |---|---|---| | qemu-armv8a:knsh (kernel, QEMU with HVF), `CONFIG_SCHED_PROCESS_GROUPS=y`, test compiled against the export | 24 FAIL | 31 PASS | | qemu-armv8a:nsh (flat, Make build) + `SIG_DEFAULT`, `SCHED_PROCESS_GROUPS` | 24 FAIL | 31 PASS | | qemu-armv8a:nsh (flat) + `SIG_DEFAULT`, no process groups | - | 29 PASS, 1 SKIP | | rv-virt:pnsh64 (protected, rv64) + `SIG_DEFAULT`, `SCHED_PROCESS_GROUPS` | - | builds | ostest exits with status 0 in the flat runs. `tools/checkpatch.sh -c -u -m -g` passes on the commit. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
