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-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a2c68962 testing/ostest: Fix undefined CONFIG_ARCH_INTERRUPTSTACK in 
intstack test
9a2c68962 is described below

commit 9a2c68962dce505291f12740c2244f673ac16b23
Author: Marco Casaroli <[email protected]>
AuthorDate: Sat Nov 28 08:22:50 2026 +0100

    testing/ostest: Fix undefined CONFIG_ARCH_INTERRUPTSTACK in intstack test
    
    The interrupt stack test guard uses CONFIG_ARCH_INTERRUPTSTACK in an
    #if expression without defined().  A configuration with SMP and
    STACK_COLORATION but without an interrupt stack, such as sim:smp, does
    not define this option.  The build then fails with -Werror=undef:
    
      intstack.c:38:41: error: "CONFIG_ARCH_INTERRUPTSTACK" is not defined,
      evaluates to 0 [-Werror=undef]
    
    Test defined(CONFIG_ARCH_INTERRUPTSTACK) before the comparison, in
    intstack.c and in the matching guard in ostest_main.c.  The test stays
    disabled when the option is absent, as the comparison already meant.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 testing/ostest/intstack.c    | 3 ++-
 testing/ostest/ostest_main.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/testing/ostest/intstack.c b/testing/ostest/intstack.c
index 2233f6dd0..d596306e6 100644
--- a/testing/ostest/intstack.c
+++ b/testing/ostest/intstack.c
@@ -35,7 +35,8 @@
 #include "ostest.h"
 
 #if defined(CONFIG_SMP) && defined(CONFIG_BUILD_FLAT) && \
-    defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
+    defined(CONFIG_STACK_COLORATION) && \
+    defined(CONFIG_ARCH_INTERRUPTSTACK) && CONFIG_ARCH_INTERRUPTSTACK > 3
 
 /****************************************************************************
  * Private Functions
diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c
index 27f47e98a..65ae93700 100644
--- a/testing/ostest/ostest_main.c
+++ b/testing/ostest/ostest_main.c
@@ -719,7 +719,8 @@ static int user_main(int argc, char *argv[])
 #endif
 
 #if defined(CONFIG_SMP) && defined(CONFIG_BUILD_FLAT) && \
-    defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
+    defined(CONFIG_STACK_COLORATION) && \
+    defined(CONFIG_ARCH_INTERRUPTSTACK) && CONFIG_ARCH_INTERRUPTSTACK > 3
       printf("\nuser_main: interrupt stack test\n");
       intstack_test();
 #endif

Reply via email to