From 39b0423e7aad1a769b4bf7a7c32717579ff6f1d6 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 27 Apr 2021 20:19:49 +0300 Subject: [PATCH] tests: lib: mem_alloc: Fix up conditions for "no_mem" testcases These should run for minlibc configured with CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=0. In all other cases normal testsuite should run. How preprocessor #if's were put previously, some configurations, e.g. prj_newlib.conf, had the testsuite completely skipped. Signed-off-by: Paul Sokolovsky --- tests/lib/mem_alloc/src/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/lib/mem_alloc/src/main.c b/tests/lib/mem_alloc/src/main.c index 130c7a89d1c..7d48444c263 100644 --- a/tests/lib/mem_alloc/src/main.c +++ b/tests/lib/mem_alloc/src/main.c @@ -345,14 +345,12 @@ __no_optimization void test_memalloc_max(void) void test_main(void) { -#if (CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE == 0) -#ifndef CONFIG_NEWLIB_LIBC +#if defined(CONFIG_MINIMAL_LIBC) && CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE == 0 ztest_test_suite(test_c_lib_dynamic_memalloc, ztest_user_unit_test(test_no_mem_malloc), ztest_user_unit_test(test_no_mem_realloc) ); ztest_run_test_suite(test_c_lib_dynamic_memalloc); -#endif #else ztest_test_suite(test_c_lib_dynamic_memalloc, ztest_user_unit_test(test_malloc_align),