This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 8f69f27b4df boards/esp32-devkitc: Let ostest finish on the knsh
configuration.
8f69f27b4df is described below
commit 8f69f27b4dff01501080b3f3273e153db67f347c
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Aug 11 11:37:15 2026 +0200
boards/esp32-devkitc: Let ostest finish on the knsh configuration.
A full ostest run never reached the end on esp32-devkitc:knsh. It stopped
in
the barrier test:
barrier_test: ERROR thread 6 create, status=12
ostest_main: Exiting with status 256
The cause is the interaction of two settings that are each reasonable on
their
own. CONFIG_TLS_ALIGNED is set and CONFIG_TLS_LOG2_MAXSTACK is 13, so every
pthread stack must start on an 8 KiB boundary. The barrier threads take the
2 KiB default stack, so each one occupies an 8 KiB aligned slot. Eight of
them
do not fit the 96 KiB user heap of a protected build once the tests before
them
have fragmented it, and up_create_stack() fails:
up_create_stack: ERROR: Failed to allocate stack, size 2048
The flat build has the same two settings and passes, because its heap is
320 KiB against 96 KiB here.
So this lowers the barrier thread count for this configuration only. Four
threads still test a barrier, and they leave margin: six was the most that
ever started, so six would pass with none.
The user heap cannot grow far. User data has to sit in the MMU governed
window
of SRAM2, which is 128 KiB in total, and the kernel holds the first 32 KiB
of
it.
Verified on an ESP32-DevKitC V4, ESP32-D0WD-V3 revision 3.1. All four
threads
reach the barrier and ostest reports "Exiting with status 0".
Assisted-by: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Marco Casaroli <[email protected]>
---
boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig
b/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig
index 4bb681003f6..2f3a66843f4 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig
@@ -62,4 +62,5 @@ CONFIG_SYSTEM_NSH=y
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_OSTEST=y
CONFIG_TESTING_OSTEST_FPUTESTDISABLE=y
+CONFIG_TESTING_OSTEST_NBARRIER_THREADS=4
CONFIG_UART0_SERIAL_CONSOLE=y