Skip to content

testing/ostest: Check the interrupt stack of each CPU. - #3982

Merged
acassis merged 1 commit into
apache:masterfrom
casaroli:apps-intstack-test-up
Nov 6, 2026
Merged

acassis merged 1 commit into
apache:masterfrom
casaroli:apps-intstack-test-up

Conversation

@casaroli

@casaroli casaroli commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

With CONFIG_STACK_COLORATION, ostest now checks the interrupt stack of each CPU: the CPU takes an interrupt, then up_check_intstack() must show some use and some color left. A stack with no color reports that all of it is used.

Impact

ostest only, in flat SMP builds with CONFIG_STACK_COLORATION. Boards with rp23xx SMP and this option need apache/nuttx#21463, which colors the stack there.

Testing

master apache/nuttx#21463
RP2350, pimoroni-pico-2-plus:smp, on the board assert: CPU 0 used 2048 of 2048 CPU 0 used 152, CPU 1 used 144, ostest status 0
qemu-armv7a:smp, 4 CPUs, QEMU used 488, 264, 264, 264 of 2048, ostest status 0 the same

On master, QEMU, ostest status 0: qemu-armv8a:nsh_smp, 2 CPUs, used 880 and 560 of 8192; rv-virt:smp, 8 CPUs, used 220 of 2048 on each (up_check_intstack() of RISC-V does not use its CPU argument).

tools/checkpatch.sh -c -u -m -g passes.

With CONFIG_STACK_COLORATION, each CPU takes an interrupt, then
up_check_intstack() must show some use and some color left.  A CPU whose
stack was never colored reports that all of it is used.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
@casaroli
casaroli marked this pull request as ready for review November 6, 2026 11:53
@acassis
acassis merged commit b3d9d96 into apache:master Nov 6, 2026
51 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.

4 participants