casaroli opened a new pull request, #4042: URL: https://github.com/apache/nuttx-apps/pull/4042
depends-on: apache/nuttx/pull/21796 ## Summary A test for apache/nuttx#21796: the memory of an ended process must come back, also with SMP when the CPUs that ran the process then run only the idle task. testing/sched/exitmem: `exitmem` forks children one after the other. Each child takes a part of the free memory (40 % by default, less when its heap is smaller), writes every page and ends. After each `waitpid()` the free memory (`sysconf(_SC_AVPHYS_PAGES)`) must come back within 3 s. A child that cannot take its memory is a failure too. With SMP, each child runs on another CPU than the parent, and a thread of the child runs on a third CPU first. Usage: `exitmem [rounds [percent]]` (defaults: 8 rounds, 40 %). apache/nuttx#21796 adds its documentation page (`Documentation/applications/testing/exitmem`). ## Impact New test only. `CONFIG_TESTING_EXITMEM` is default n and depends on `ARCH_HAVE_FORK` (kernel builds). No defconfig enables it, so no CI build changes. ## Testing qemu-armv8a:knsh (kernel build, arm64, HVF) and rv-virt:ksmp64 (kernel build, riscv64, TCG), make: | | nuttx master 7f4629ca01a | with apache/nuttx#21796 | |---|---|---| | qemu-armv8a:knsh, 4 CPUs | FAIL: free 9060 KiB before the first child, 5340 KiB after it; the next `fork()` calls fail with `ENOMEM` | PASS, 8 rounds | | rv-virt:ksmp64, 4 CPUs | FAIL: free 4924 KiB before the first child, 2404 KiB after it; the next `fork()` calls fail with `ENOMEM` | PASS, 8 rounds | | qemu-armv8a:knsh, 1 CPU | PASS | PASS | Builds with `EXTRAFLAGS="-Wno-cpp -Werror"` through the apps import of qemu-armv8a:knsh: OK, no warning. `tools/checkpatch.sh -c -u -m -g` passes. Not run: CMake builds, x86_64. -- 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]
