This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 71561d29795901da23ccf34ca4c1ff7db3a851c3 Author: ouyangxiangzhen <[email protected]> AuthorDate: Tue Jan 27 17:49:19 2026 +0800 testing/ostest: run spinlock_test only in flat mode. Since the kernel spinlocks can only work in flat mode, this commit allowed spinlock_test only in flat mode. Signed-off-by: ouyangxiangzhen <[email protected]> --- testing/ostest/CMakeLists.txt | 4 ++-- testing/ostest/Makefile | 4 ++-- testing/ostest/ostest_main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/ostest/CMakeLists.txt b/testing/ostest/CMakeLists.txt index 35b0c5596..a8a2ca921 100644 --- a/testing/ostest/CMakeLists.txt +++ b/testing/ostest/CMakeLists.txt @@ -22,7 +22,7 @@ if(CONFIG_TESTING_OSTEST) - set(SRCS getopt.c libc_memmem.c restart.c sighelper.c spinlock.c) + set(SRCS getopt.c libc_memmem.c restart.c sighelper.c) if(CONFIG_ENABLE_ALL_SIGNALS) list(APPEND SRCS sighand.c signest.c) @@ -162,7 +162,7 @@ if(CONFIG_TESTING_OSTEST) endif() if(CONFIG_BUILD_FLAT) - list(APPEND SRCS wdog.c) + list(APPEND SRCS wdog.c spinlock.c) endif() set(OSTEST_SRCS ostest_main.c ${SRCS}) diff --git a/testing/ostest/Makefile b/testing/ostest/Makefile index b8be63a62..817fcdb51 100644 --- a/testing/ostest/Makefile +++ b/testing/ostest/Makefile @@ -31,7 +31,7 @@ MODULE = $(CONFIG_TESTING_OSTEST) # NuttX OS Test -CSRCS = getopt.c libc_memmem.c restart.c sighelper.c spinlock.c +CSRCS = getopt.c libc_memmem.c restart.c sighelper.c ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y) CSRCS += sighand.c signest.c @@ -167,7 +167,7 @@ endif endif ifeq ($(CONFIG_BUILD_FLAT),y) -CSRCS += wdog.c +CSRCS += wdog.c spinlock.c endif include $(APPDIR)/Application.mk diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c index 58ccc87fb..8247b4788 100644 --- a/testing/ostest/ostest_main.c +++ b/testing/ostest/ostest_main.c @@ -547,11 +547,11 @@ static int user_main(int argc, char *argv[]) #endif #endif +#ifdef CONFIG_BUILD_FLAT printf("\nuser_main: spinlock test\n"); spinlock_test(); check_test_memory_usage(); -#ifdef CONFIG_BUILD_FLAT printf("\nuser_main: wdog test\n"); wdog_test(); check_test_memory_usage();
