From d795abeb03ce755485147cff4ad8b28c8fe6e58a Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Mon, 8 May 2023 12:31:30 +0200 Subject: [PATCH 1/2] newlib: move test to pytest --- components/newlib/test/CMakeLists.txt | 4 - .../newlib/test_apps/main/CMakeLists.txt | 7 - .../newlib/test_apps/main/test_newlib_main.c | 19 --- .../test_apps/{ => newlib}/CMakeLists.txt | 0 .../newlib/test_apps/{ => newlib}/README.md | 0 .../test_apps/newlib/main/CMakeLists.txt | 13 ++ .../test_apps/newlib/main/test_app_main.c | 47 +++++++ .../newlib/main}/test_atomic.c | 4 +- .../test_apps/{ => newlib}/main/test_file.c | 20 +-- .../newlib/main}/test_locks.c | 2 +- .../test_apps/{ => newlib}/main/test_misc.c | 33 +---- .../newlib/main}/test_newlib.c | 2 +- .../newlib/main}/test_setjmp.c | 5 +- .../newlib/main}/test_shared_stack_printf.c | 2 +- .../{ => newlib}/main/test_stdatomic.c | 125 ++---------------- .../newlib/main}/test_time.c | 14 +- .../newlib/test_apps/newlib/pytest_newlib.py | 22 +++ .../test_apps/newlib/sdkconfig.ci.default | 0 .../test_apps/newlib/sdkconfig.ci.psram_esp32 | 12 ++ .../newlib/sdkconfig.ci.release_esp32 | 4 + .../newlib/sdkconfig.ci.release_esp32c2 | 10 ++ .../newlib/sdkconfig.ci.single_core_esp32 | 4 + .../newlib/sdkconfig.ci.single_core_esp32s2 | 4 + .../test_apps/newlib/sdkconfig.defaults | 6 + components/newlib/test_apps/pytest_newlib.py | 11 -- .../newlib/test_apps/sdkconfig.defaults | 5 - 26 files changed, 159 insertions(+), 216 deletions(-) delete mode 100644 components/newlib/test/CMakeLists.txt delete mode 100644 components/newlib/test_apps/main/CMakeLists.txt delete mode 100644 components/newlib/test_apps/main/test_newlib_main.c rename components/newlib/test_apps/{ => newlib}/CMakeLists.txt (100%) rename components/newlib/test_apps/{ => newlib}/README.md (100%) create mode 100644 components/newlib/test_apps/newlib/main/CMakeLists.txt create mode 100644 components/newlib/test_apps/newlib/main/test_app_main.c rename components/newlib/{test => test_apps/newlib/main}/test_atomic.c (95%) rename components/newlib/test_apps/{ => newlib}/main/test_file.c (89%) rename components/newlib/{test => test_apps/newlib/main}/test_locks.c (97%) rename components/newlib/test_apps/{ => newlib}/main/test_misc.c (76%) rename components/newlib/{test => test_apps/newlib/main}/test_newlib.c (99%) rename components/newlib/{test => test_apps/newlib/main}/test_setjmp.c (84%) rename components/newlib/{test => test_apps/newlib/main}/test_shared_stack_printf.c (97%) rename components/newlib/test_apps/{ => newlib}/main/test_stdatomic.c (76%) rename components/newlib/{test => test_apps/newlib/main}/test_time.c (97%) create mode 100644 components/newlib/test_apps/newlib/pytest_newlib.py create mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.default create mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 create mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32 create mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32c2 create mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32 create mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 create mode 100644 components/newlib/test_apps/newlib/sdkconfig.defaults delete mode 100644 components/newlib/test_apps/pytest_newlib.py delete mode 100644 components/newlib/test_apps/sdkconfig.defaults diff --git a/components/newlib/test/CMakeLists.txt b/components/newlib/test/CMakeLists.txt deleted file mode 100644 index 12b5a18f5d..0000000000 --- a/components/newlib/test/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -idf_component_register(SRC_DIRS "." - PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock test_utils driver esp_timer spi_flash) -target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") diff --git a/components/newlib/test_apps/main/CMakeLists.txt b/components/newlib/test_apps/main/CMakeLists.txt deleted file mode 100644 index f59015d02c..0000000000 --- a/components/newlib/test_apps/main/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -idf_component_register(SRCS - "test_newlib_main.c" - "test_stdatomic.c" - "test_misc.c" - "test_file.c" - REQUIRES pthread test_utils - PRIV_REQUIRES unity vfs) diff --git a/components/newlib/test_apps/main/test_newlib_main.c b/components/newlib/test_apps/main/test_newlib_main.c deleted file mode 100644 index a18a88d85a..0000000000 --- a/components/newlib/test_apps/main/test_newlib_main.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 - */ -#include "unity.h" -#include "unity_fixture.h" - -static void run_all_tests(void) -{ - RUN_TEST_GROUP(stdatomic); - RUN_TEST_GROUP(misc); - RUN_TEST_GROUP(file); -} - -void app_main(void) -{ - UNITY_MAIN_FUNC(run_all_tests); -} diff --git a/components/newlib/test_apps/CMakeLists.txt b/components/newlib/test_apps/newlib/CMakeLists.txt similarity index 100% rename from components/newlib/test_apps/CMakeLists.txt rename to components/newlib/test_apps/newlib/CMakeLists.txt diff --git a/components/newlib/test_apps/README.md b/components/newlib/test_apps/newlib/README.md similarity index 100% rename from components/newlib/test_apps/README.md rename to components/newlib/test_apps/newlib/README.md diff --git a/components/newlib/test_apps/newlib/main/CMakeLists.txt b/components/newlib/test_apps/newlib/main/CMakeLists.txt new file mode 100644 index 0000000000..f59798a87a --- /dev/null +++ b/components/newlib/test_apps/newlib/main/CMakeLists.txt @@ -0,0 +1,13 @@ +idf_component_register(SRCS + "test_app_main.c" + "test_atomic.c" + "test_file.c" + "test_locks.c" + "test_misc.c" + "test_newlib.c" + "test_setjmp.c" + "test_shared_stack_printf.c" + "test_stdatomic.c" + "test_time.c" + PRIV_REQUIRES unity vfs cmock driver esp_timer spi_flash test_utils pthread esp_psram + WHOLE_ARCHIVE) diff --git a/components/newlib/test_apps/newlib/main/test_app_main.c b/components/newlib/test_apps/newlib/main/test_app_main.c new file mode 100644 index 0000000000..a1a484df85 --- /dev/null +++ b/components/newlib/test_apps/newlib/main/test_app_main.c @@ -0,0 +1,47 @@ +/* + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ + +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "unity.h" +#include "unity_test_runner.h" +#include "esp_heap_caps.h" +#include "test_utils.h" + +#define TEST_MEMORY_LEAK_THRESHOLD (-350) + +static size_t before_free_8bit; +static size_t before_free_32bit; + +static void check_leak(size_t before_free, size_t after_free, const char *type) +{ + ssize_t delta = after_free - before_free; + printf("MALLOC_CAP_%s: Before %u bytes free, After %u bytes free (delta %d)\n", type, before_free, after_free, delta); + TEST_ASSERT_MESSAGE(delta >= TEST_MEMORY_LEAK_THRESHOLD, "memory leak"); +} + +void setUp(void) +{ + before_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT); + before_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT); +} + +void tearDown(void) +{ + // Add a short delay of 10ms to allow the idle task to free an remaining memory + vTaskDelay(pdMS_TO_TICKS(10)); + size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT); + size_t after_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT); + check_leak(before_free_8bit, after_free_8bit, "8BIT"); + check_leak(before_free_32bit, after_free_32bit, "32BIT"); +} + +void app_main(void) +{ + // Raise priority to main task as some tests depend on the test task being at priority UNITY_FREERTOS_PRIORITY + vTaskPrioritySet(NULL, UNITY_FREERTOS_PRIORITY); + unity_run_menu(); +} diff --git a/components/newlib/test/test_atomic.c b/components/newlib/test_apps/newlib/main/test_atomic.c similarity index 95% rename from components/newlib/test/test_atomic.c rename to components/newlib/test_apps/newlib/main/test_atomic.c index 3c85756b54..5f6b56b8ab 100644 --- a/components/newlib/test/test_atomic.c +++ b/components/newlib/test_apps/newlib/main/test_atomic.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -56,7 +56,7 @@ static void test_flow(const char* name, test_f func) sorted_array_insert(t_flight_sorted, &t_flight_num, t_op); } for (int i = 0; i < TEST_TIMES; i++) { - ESP_LOGI(TAG, "%s: %d ops", name, t_flight_sorted[i]-s_t_ref); + ESP_LOGI(TAG, "%s: %" PRIu32 " ops", name, t_flight_sorted[i]-s_t_ref); } } diff --git a/components/newlib/test_apps/main/test_file.c b/components/newlib/test_apps/newlib/main/test_file.c similarity index 89% rename from components/newlib/test_apps/main/test_file.c rename to components/newlib/test_apps/newlib/main/test_file.c index e25df6b11a..a7f5cab625 100644 --- a/components/newlib/test_apps/main/test_file.c +++ b/components/newlib/test_apps/newlib/main/test_file.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -10,17 +10,6 @@ #include #include "esp_vfs.h" #include "unity.h" -#include "unity_fixture.h" - -TEST_GROUP(file); - -TEST_SETUP(file) -{ -} - -TEST_TEAR_DOWN(file) -{ -} /* This test checks that st_blksize value set in struct stat correctly affects the * FILE structure: @@ -53,7 +42,7 @@ static ssize_t blksize_test_write(void* ctx, int fd, const void * data, size_t s return size; } -TEST(file, blksize) +TEST_CASE("file - blksize", "[newlib_file]") { FILE* f; blksize_test_ctx_t ctx = {}; @@ -87,8 +76,3 @@ TEST(file, blksize) TEST_ESP_OK(esp_vfs_unregister("/test")); } - -TEST_GROUP_RUNNER(file) -{ - RUN_TEST_CASE(file, blksize) -} diff --git a/components/newlib/test/test_locks.c b/components/newlib/test_apps/newlib/main/test_locks.c similarity index 97% rename from components/newlib/test/test_locks.c rename to components/newlib/test_apps/newlib/main/test_locks.c index af1cfb301a..d8acce4b23 100644 --- a/components/newlib/test/test_locks.c +++ b/components/newlib/test_apps/newlib/main/test_locks.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ diff --git a/components/newlib/test_apps/main/test_misc.c b/components/newlib/test_apps/newlib/main/test_misc.c similarity index 76% rename from components/newlib/test_apps/main/test_misc.c rename to components/newlib/test_apps/newlib/main/test_misc.c index 0935855fe8..98fe6dcae3 100644 --- a/components/newlib/test_apps/main/test_misc.c +++ b/components/newlib/test_apps/newlib/main/test_misc.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -13,27 +13,11 @@ #include #include #include "unity.h" -#include "unity_fixture.h" -// unity_fixture_malloc_overrides.h defines 'free' as 'unity_free', -// which can only handle pointers allocated with 'unity_malloc'. -// This test allocates memory via 'posix_memalign' so calling 'free' -// for these pointers causes the heap guards check to fail. -#undef free -TEST_GROUP(misc); - -TEST_SETUP(misc) +TEST_CASE("misc - posix_memalign", "[newlib_misc]") { -} - -TEST_TEAR_DOWN(misc) -{ -} - -TEST(misc, posix_memalign) -{ - void* outptr; + void* outptr = NULL; int ret; ret = posix_memalign(&outptr, 4, 0); @@ -59,12 +43,12 @@ TEST(misc, posix_memalign) free(outptr); } -TEST(misc, sysconf) +TEST_CASE("misc - sysconf", "[newlib_misc]") { TEST_ASSERT_NOT_EQUAL(-1, sysconf(_SC_NPROCESSORS_ONLN)); } -TEST(misc, realpath) +TEST_CASE("misc - realpath", "[newlib_misc]") { char out[PATH_MAX]; @@ -86,10 +70,3 @@ TEST(misc, realpath) TEST_ASSERT_EQUAL_STRING("/abc/def", out_new); free(out_new); } - -TEST_GROUP_RUNNER(misc) -{ - RUN_TEST_CASE(misc, posix_memalign) - RUN_TEST_CASE(misc, sysconf) - RUN_TEST_CASE(misc, realpath) -} diff --git a/components/newlib/test/test_newlib.c b/components/newlib/test_apps/newlib/main/test_newlib.c similarity index 99% rename from components/newlib/test/test_newlib.c rename to components/newlib/test_apps/newlib/main/test_newlib.c index d6d9ddbf90..b28c0de2d7 100644 --- a/components/newlib/test/test_newlib.c +++ b/components/newlib/test_apps/newlib/main/test_newlib.c @@ -62,7 +62,7 @@ TEST_CASE("test sscanf function", "[newlib]") TEST_ASSERT_EQUAL(42, fourty_two); TEST_ASSERT_EQUAL(2147483647, int_max); TEST_ASSERT_EQUAL_UINT32(2147483648UL, int_max_plus_one); - TEST_ASSERT_EQUAL(0x40010000, iram_ptr); + TEST_ASSERT_EQUAL(0x40010000, (UNITY_UINT32)iram_ptr); TEST_ASSERT_EQUAL(0x40020000, irom_ptr); TEST_ASSERT_EQUAL('Q', department); TEST_ASSERT_TRUE(1.0f / inv_fine_structure_constant > 136 && 1.0f / inv_fine_structure_constant < 138); diff --git a/components/newlib/test/test_setjmp.c b/components/newlib/test_apps/newlib/main/test_setjmp.c similarity index 84% rename from components/newlib/test/test_setjmp.c rename to components/newlib/test_apps/newlib/main/test_setjmp.c index 9adf7a33f9..7e96fc64c1 100644 --- a/components/newlib/test/test_setjmp.c +++ b/components/newlib/test_apps/newlib/main/test_setjmp.c @@ -1,10 +1,11 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ #include #include +#include #include "unity.h" #include "esp_system.h" @@ -17,7 +18,7 @@ typedef struct { static __attribute__((noreturn)) void inner(setjmp_test_ctx_t *ctx) { - printf("inner, retval=0x%x\n", ctx->retval); + printf("inner, retval=0x%" PRIx32 "\n", ctx->retval); ctx->inner_called = true; longjmp(ctx->jmp_env, ctx->retval); TEST_FAIL_MESSAGE("Should not reach here"); diff --git a/components/newlib/test/test_shared_stack_printf.c b/components/newlib/test_apps/newlib/main/test_shared_stack_printf.c similarity index 97% rename from components/newlib/test/test_shared_stack_printf.c rename to components/newlib/test_apps/newlib/main/test_shared_stack_printf.c index 69a63bb7cb..2f40c0dbe8 100644 --- a/components/newlib/test/test_shared_stack_printf.c +++ b/components/newlib/test_apps/newlib/main/test_shared_stack_printf.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ diff --git a/components/newlib/test_apps/main/test_stdatomic.c b/components/newlib/test_apps/newlib/main/test_stdatomic.c similarity index 76% rename from components/newlib/test_apps/main/test_stdatomic.c rename to components/newlib/test_apps/newlib/main/test_stdatomic.c index aa4c2a8361..b41d36ac5c 100644 --- a/components/newlib/test_apps/main/test_stdatomic.c +++ b/components/newlib/test_apps/newlib/main/test_stdatomic.c @@ -13,7 +13,6 @@ #include "esp_pthread.h" #include "freertos/portmacro.h" #include "unity.h" -#include "unity_fixture.h" /* non-static to prevent optimization */ atomic_ullong g_atomic64; @@ -22,17 +21,7 @@ atomic_ushort g_atomic16; atomic_uchar g_atomic8; -TEST_GROUP(stdatomic); - -TEST_SETUP(stdatomic) -{ -} - -TEST_TEAR_DOWN(stdatomic) -{ -} - -TEST(stdatomic, test_64bit_atomics_fetch_op) +TEST_CASE("stdatomic - test_64bit_atomics", "[newlib_stdatomic]") { unsigned long long x64 = 0; g_atomic64 = 0; // calls atomic_store @@ -53,7 +42,7 @@ TEST(stdatomic, test_64bit_atomics_fetch_op) #endif } -TEST(stdatomic, test_32bit_atomics_fetch_op) +TEST_CASE("stdatomic - test_32bit_atomics", "[newlib_stdatomic]") { unsigned int x32 = 0; g_atomic32 = 0; @@ -74,7 +63,7 @@ TEST(stdatomic, test_32bit_atomics_fetch_op) #endif } -TEST(stdatomic, test_16bit_atomics_fetch_op) +TEST_CASE("stdatomic - test_16bit_atomics", "[newlib_stdatomic]") { unsigned int x16 = 0; g_atomic16 = 0; @@ -95,7 +84,7 @@ TEST(stdatomic, test_16bit_atomics_fetch_op) #endif } -TEST(stdatomic, test_8bit_atomics_fetch_op) +TEST_CASE("stdatomic - test_8bit_atomics", "[newlib_stdatomic]") { unsigned int x8 = 0; g_atomic8 = 0; @@ -117,7 +106,7 @@ TEST(stdatomic, test_8bit_atomics_fetch_op) } #ifndef __clang__ -TEST(stdatomic, test_64bit_atomics_op_fetch) +TEST_CASE("stdatomic - test_64bit_atomics", "[newlib_stdatomic]") { unsigned long long x64 = 0; g_atomic64 = 0; // calls atomic_store @@ -133,7 +122,7 @@ TEST(stdatomic, test_64bit_atomics_op_fetch) TEST_ASSERT_EQUAL_HEX64(0xDDDDDDDDDDDDDDDDULL, g_atomic64); // calls atomic_load } -TEST(stdatomic, test_32bit_atomics_op_fetch) +TEST_CASE("stdatomic - test_32bit_atomics", "[newlib_stdatomic]") { unsigned int x32 = 0; g_atomic32 = 0; @@ -149,7 +138,7 @@ TEST(stdatomic, test_32bit_atomics_op_fetch) TEST_ASSERT_EQUAL_HEX32(0xDDDDDDDDU, g_atomic32); } -TEST(stdatomic, test_16bit_atomics_op_fetch) +TEST_CASE("stdatomic - test_16bit_atomics", "[newlib_stdatomic]") { unsigned int x16 = 0; g_atomic16 = 0; @@ -165,7 +154,7 @@ TEST(stdatomic, test_16bit_atomics_op_fetch) TEST_ASSERT_EQUAL_HEX16(0xDDDD, g_atomic16); } -TEST(stdatomic, test_8bit_atomics_op_fetch) +TEST_CASE("stdatomic - test_8bit_atomics", "[newlib_stdatomic]") { unsigned int x8 = 0; g_atomic8 = 0; @@ -184,7 +173,7 @@ TEST(stdatomic, test_8bit_atomics_op_fetch) #endif // #ifndef __clang__ -#define TEST_EXCLUSION(n) TEST(stdatomic, test_ ## n ## bit_exclusion) \ +#define TEST_EXCLUSION(n) TEST_CASE("stdatomic - test_" #n "bit_exclusion", "[newlib_stdatomic]") \ { \ g_atomic ## n = 0; \ pthread_t thread1; \ @@ -242,7 +231,7 @@ static void *test_thread_##NAME (void *arg) \ return NULL; \ } \ \ -TEST(stdatomic, test_ ##NAME) \ +TEST_CASE("stdatomic - test_" #NAME, "[newlib_stdatomic]") \ { \ pthread_t thread_id1; \ pthread_t thread_id2; \ @@ -330,97 +319,3 @@ TEST_RACE_OPERATION (long_double_preinc, long double, ++, , 0, (2*ITER_COUNT)) TEST_RACE_OPERATION (complex_long_double_sub, _Complex long double, , -= 1, 0, -(2*ITER_COUNT)) TEST_RACE_OPERATION (long_double_postdec, long double, , --, 0, -(2*ITER_COUNT)) TEST_RACE_OPERATION (long_double_predec, long double, --, , 0, -(2*ITER_COUNT)) - - -TEST_GROUP_RUNNER(stdatomic) -{ - RUN_TEST_CASE(stdatomic, test_64bit_atomics_fetch_op) - RUN_TEST_CASE(stdatomic, test_32bit_atomics_fetch_op) - RUN_TEST_CASE(stdatomic, test_16bit_atomics_fetch_op) - RUN_TEST_CASE(stdatomic, test_8bit_atomics_fetch_op) - -#ifndef __clang__ - RUN_TEST_CASE(stdatomic, test_64bit_atomics_op_fetch) - RUN_TEST_CASE(stdatomic, test_32bit_atomics_op_fetch) - RUN_TEST_CASE(stdatomic, test_16bit_atomics_op_fetch) - RUN_TEST_CASE(stdatomic, test_8bit_atomics_op_fetch) -#endif - - RUN_TEST_CASE(stdatomic, test_64bit_exclusion) - RUN_TEST_CASE(stdatomic, test_32bit_exclusion) - RUN_TEST_CASE(stdatomic, test_16bit_exclusion) - RUN_TEST_CASE(stdatomic, test_8bit_exclusion) - - RUN_TEST_CASE(stdatomic, test_uint8_add) - RUN_TEST_CASE(stdatomic, test_uint8_add_3); - RUN_TEST_CASE(stdatomic, test_uint8_postinc); - RUN_TEST_CASE(stdatomic, test_uint8_preinc); - RUN_TEST_CASE(stdatomic, test_uint8_sub); - RUN_TEST_CASE(stdatomic, test_uint8_sub_3); - RUN_TEST_CASE(stdatomic, test_uint8_postdec); - RUN_TEST_CASE(stdatomic, test_uint8_predec); - RUN_TEST_CASE(stdatomic, test_uint8_mul); - - RUN_TEST_CASE(stdatomic, test_uint16_add); - RUN_TEST_CASE(stdatomic, test_uint16_add_3); - RUN_TEST_CASE(stdatomic, test_uint16_postinc); - RUN_TEST_CASE(stdatomic, test_uint16_preinc); - RUN_TEST_CASE(stdatomic, test_uint16_sub); - RUN_TEST_CASE(stdatomic, test_uint16_sub_3); - RUN_TEST_CASE(stdatomic, test_uint16_postdec); - RUN_TEST_CASE(stdatomic, test_uint16_predec); - RUN_TEST_CASE(stdatomic, test_uint16_mul); - - RUN_TEST_CASE(stdatomic, test_uint32_add); - RUN_TEST_CASE(stdatomic, test_uint32_add_3); - RUN_TEST_CASE(stdatomic, test_uint32_postinc); - RUN_TEST_CASE(stdatomic, test_uint32_preinc); - RUN_TEST_CASE(stdatomic, test_uint32_sub); - RUN_TEST_CASE(stdatomic, test_uint32_sub_3); - RUN_TEST_CASE(stdatomic, test_uint32_postdec); - RUN_TEST_CASE(stdatomic, test_uint32_predec); - RUN_TEST_CASE(stdatomic, test_uint32_mul); - - RUN_TEST_CASE(stdatomic, test_uint64_add); - RUN_TEST_CASE(stdatomic, test_uint64_add_3); - RUN_TEST_CASE(stdatomic, test_uint64_add_neg); - RUN_TEST_CASE(stdatomic, test_uint64_sub); - RUN_TEST_CASE(stdatomic, test_uint64_sub_3); - RUN_TEST_CASE(stdatomic, test_uint64_sub_neg); - RUN_TEST_CASE(stdatomic, test_uint64_postinc); - RUN_TEST_CASE(stdatomic, test_uint64_postinc_neg); - RUN_TEST_CASE(stdatomic, test_uint64_preinc); - RUN_TEST_CASE(stdatomic, test_uint64_preinc_neg); - RUN_TEST_CASE(stdatomic, test_uint64_postdec); - RUN_TEST_CASE(stdatomic, test_uint64_postdec_neg); - RUN_TEST_CASE(stdatomic, test_uint64_predec); - RUN_TEST_CASE(stdatomic, test_uint64_predec_neg); - RUN_TEST_CASE(stdatomic, test_uint64_mul); - - RUN_TEST_CASE(stdatomic, test_float_add); - RUN_TEST_CASE(stdatomic, test_complex_float_add); - RUN_TEST_CASE(stdatomic, test_float_postinc); - RUN_TEST_CASE(stdatomic, test_float_preinc); - RUN_TEST_CASE(stdatomic, test_float_sub); - RUN_TEST_CASE(stdatomic, test_complex_float_sub); - RUN_TEST_CASE(stdatomic, test_float_postdec); - RUN_TEST_CASE(stdatomic, test_float_predec); - - RUN_TEST_CASE(stdatomic, test_double_add); - RUN_TEST_CASE(stdatomic, test_complex_double_add); - RUN_TEST_CASE(stdatomic, test_double_postinc); - RUN_TEST_CASE(stdatomic, test_double_preinc); - RUN_TEST_CASE(stdatomic, test_double_sub); - RUN_TEST_CASE(stdatomic, test_complex_double_sub); - RUN_TEST_CASE(stdatomic, test_double_postdec); - RUN_TEST_CASE(stdatomic, test_double_predec); - - RUN_TEST_CASE(stdatomic, test_long_double_add); - RUN_TEST_CASE(stdatomic, test_complex_long_double_add); - RUN_TEST_CASE(stdatomic, test_long_double_postinc); - RUN_TEST_CASE(stdatomic, test_long_double_preinc); - RUN_TEST_CASE(stdatomic, test_long_double_sub); - RUN_TEST_CASE(stdatomic, test_complex_long_double_sub); - RUN_TEST_CASE(stdatomic, test_long_double_postdec); - RUN_TEST_CASE(stdatomic, test_long_double_predec); -} diff --git a/components/newlib/test/test_time.c b/components/newlib/test_apps/newlib/main/test_time.c similarity index 97% rename from components/newlib/test/test_time.c rename to components/newlib/test_apps/newlib/main/test_time.c index 6ba8a7998a..1c2ca098ff 100644 --- a/components/newlib/test/test_time.c +++ b/components/newlib/test_apps/newlib/main/test_time.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -164,6 +164,7 @@ TEST_CASE("test adjtime function", "[newlib]") TEST_ASSERT_EQUAL(adjtime(NULL, &tv_outdelta), 0); TEST_ASSERT_EQUAL(tv_outdelta.tv_sec, 0); // the correction will be equal to (1_000_000us >> 6) = 15_625 us. + TEST_ASSERT_TRUE(1000000L - tv_outdelta.tv_usec >= 15600); TEST_ASSERT_TRUE(1000000L - tv_outdelta.tv_usec <= 15650); } @@ -367,7 +368,7 @@ void test_posix_timers_clock (void) #ifdef CONFIG_RTC_CLK_SRC_EXT_CRYS printf("External (crystal) Frequency = %d Hz\n", rtc_clk_slow_freq_get_hz()); #else - printf("Internal Frequency = %d Hz\n", rtc_clk_slow_freq_get_hz()); + printf("Internal Frequency = %" PRIu32 " Hz\n", rtc_clk_slow_freq_get_hz()); #endif TEST_ASSERT(clock_settime(CLOCK_REALTIME, NULL) == -1); @@ -468,6 +469,9 @@ TEST_CASE("test time_t wide 64 bits", "[newlib]") ESP_LOGI("TAG", "sizeof(time_t): %d (%d-bit)", sizeof(time_t), sizeof(time_t)*8); TEST_ASSERT_EQUAL(8, sizeof(time_t)); + // mktime takes current timezone into account, this test assumes it's UTC+0 + setenv("TZ", "UTC+0", 1); + tzset(); struct tm tm = {4, 14, 3, 19, 0, 138, 0, 0, 0}; struct timeval timestamp = { mktime(&tm), 0 }; #if !CONFIG_NEWLIB_NANO_FORMAT @@ -488,6 +492,9 @@ TEST_CASE("test time functions wide 64 bits", "[newlib]") static char origin_buffer[32]; char strftime_buf[64]; + // mktime takes current timezone into account, this test assumes it's UTC+0 + setenv("TZ", "UTC+0", 1); + tzset(); int year = 2018; struct tm tm = {0, 14, 3, 19, 0, year - 1900, 0, 0, 0}; time_t t = mktime(&tm); @@ -542,6 +549,8 @@ TEST_CASE("test time functions wide 64 bits", "[newlib]") #endif // !_USE_LONG_TIME_T +// IDF-6962 following test cases don't pass on C2 +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if defined( CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER ) && defined( CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER ) extern int64_t s_microseconds_offset; @@ -642,3 +651,4 @@ TEST_CASE_MULTIPLE_STAGES("Timestamp after abort is correct in case RTC & High-r TEST_CASE_MULTIPLE_STAGES("Timestamp after restart is correct in case RTC & High-res timer have + big error", "[newlib][reset=SW_CPU_RESET]", set_timestamp2, check_time); TEST_CASE_MULTIPLE_STAGES("Timestamp after restart is correct in case RTC & High-res timer have - big error", "[newlib][reset=SW_CPU_RESET]", set_timestamp3, check_time); #endif // CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER && CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER +#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/newlib/test_apps/newlib/pytest_newlib.py b/components/newlib/test_apps/newlib/pytest_newlib.py new file mode 100644 index 0000000000..dab6899ade --- /dev/null +++ b/components/newlib/test_apps/newlib/pytest_newlib.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: CC0-1.0 + +import pytest +from pytest_embedded import Dut + + +@pytest.mark.generic +@pytest.mark.parametrize( + 'config', + [ + pytest.param('default', marks=[pytest.mark.supported_targets]), + pytest.param('single_core_esp32', marks=[pytest.mark.esp32]), + pytest.param('single_core_esp32s2', marks=[pytest.mark.esp32s2]), + pytest.param('psram_esp32', marks=[pytest.mark.esp32]), + pytest.param('release_esp32', marks=[pytest.mark.esp32]), + pytest.param('release_esp32c2', marks=[pytest.mark.esp32c2]), + ], + indirect=True +) +def test_newlib(dut: Dut) -> None: + dut.run_all_single_board_cases() diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.default b/components/newlib/test_apps/newlib/sdkconfig.ci.default new file mode 100644 index 0000000000..e69de29bb2 diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 b/components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 new file mode 100644 index 0000000000..e53effec70 --- /dev/null +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 @@ -0,0 +1,12 @@ +CONFIG_IDF_TARGET="esp32" +CONFIG_SPIRAM=y + +# moved from old psram config +CONFIG_ESP_INT_WDT_TIMEOUT_MS=800 +CONFIG_SPIRAM_OCCUPY_NO_HOST=y +CONFIG_ESP_WIFI_RX_IRAM_OPT=n +CONFIG_ESP_WIFI_IRAM_OPT=n +# Disable encrypted flash reads/writes to save IRAM in this build configuration +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=n +CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY=y +CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32 b/components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32 new file mode 100644 index 0000000000..2968835e3b --- /dev/null +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32" +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32c2 b/components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32c2 new file mode 100644 index 0000000000..5cf6db1b44 --- /dev/null +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.release_esp32c2 @@ -0,0 +1,10 @@ +CONFIG_IDF_TARGET="esp32c2" +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y + +# C2 specific moved from old C2 default config +CONFIG_NEWLIB_TIME_SYSCALL_USE_NONE=n +CONFIG_NEWLIB_TIME_SYSCALL_USE_HRT=y +CONFIG_NEWLIB_TIME_SYSCALL_USE_RTC=n +CONFIG_NEWLIB_TIME_SYSCALL_USE_RTC_HRT=n diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32 b/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32 new file mode 100644 index 0000000000..b7381e9523 --- /dev/null +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32" +CONFIG_FREERTOS_UNICORE=y +# IDF-6964 test nano format in this configuration (current tests are not passing, so keep disabled for now) +CONFIG_NEWLIB_NANO_FORMAT=n diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 b/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 new file mode 100644 index 0000000000..00ca80c09c --- /dev/null +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32s2" +CONFIG_FREERTOS_UNICORE=y +# IDF-6964 test nano format in this configuration (current tests are not passing, so keep disabled for now) +CONFIG_NEWLIB_NANO_FORMAT=n diff --git a/components/newlib/test_apps/newlib/sdkconfig.defaults b/components/newlib/test_apps/newlib/sdkconfig.defaults new file mode 100644 index 0000000000..38decc1431 --- /dev/null +++ b/components/newlib/test_apps/newlib/sdkconfig.defaults @@ -0,0 +1,6 @@ +# certain 64-bit related asserts need this option to be enabled in unity in order to work correctly +CONFIG_UNITY_ENABLE_64BIT=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_ESP_TASK_WDT_INIT=n +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y diff --git a/components/newlib/test_apps/pytest_newlib.py b/components/newlib/test_apps/pytest_newlib.py deleted file mode 100644 index 0ad1a8bf81..0000000000 --- a/components/newlib/test_apps/pytest_newlib.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: CC0-1.0 - -import pytest -from pytest_embedded import Dut - - -@pytest.mark.supported_targets -@pytest.mark.generic -def test_newlib(dut: Dut) -> None: - dut.expect_unity_test_output() diff --git a/components/newlib/test_apps/sdkconfig.defaults b/components/newlib/test_apps/sdkconfig.defaults deleted file mode 100644 index 6881a9742e..0000000000 --- a/components/newlib/test_apps/sdkconfig.defaults +++ /dev/null @@ -1,5 +0,0 @@ -CONFIG_UNITY_ENABLE_FIXTURE=y -CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=n -CONFIG_UNITY_ENABLE_64BIT=y -CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=n -CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=n From 6b0d93efd42f6ddafa8a023369d02c05f5d9952f Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Tue, 9 May 2023 10:24:43 +0800 Subject: [PATCH 2/2] ci: misc fixes for newlib test app Enabled additional tests for C2, added config for testing with newlib nano as well as cleaned up old configs --- .../test_apps/newlib/main/test_newlib.c | 38 +++++++++++-------- .../newlib/test_apps/newlib/main/test_time.c | 10 ++--- .../newlib/test_apps/newlib/pytest_newlib.py | 2 +- .../test_apps/newlib/sdkconfig.ci.default | 2 + .../test_apps/newlib/sdkconfig.ci.options | 2 + .../test_apps/newlib/sdkconfig.ci.psram_esp32 | 10 ----- .../newlib/sdkconfig.ci.single_core_esp32s2 | 4 -- 7 files changed, 33 insertions(+), 35 deletions(-) create mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.options delete mode 100644 components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 diff --git a/components/newlib/test_apps/newlib/main/test_newlib.c b/components/newlib/test_apps/newlib/main/test_newlib.c index b28c0de2d7..741af5c34c 100644 --- a/components/newlib/test_apps/newlib/main/test_newlib.c +++ b/components/newlib/test_apps/newlib/main/test_newlib.c @@ -123,43 +123,51 @@ TEST_CASE("test asctime", "[newlib]") TEST_ASSERT_EQUAL_STRING(buf, time_str); } -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2) static bool fn_in_rom(void *fn) { const int fnaddr = (int)fn; return (fnaddr >= SOC_IROM_MASK_LOW && fnaddr < SOC_IROM_MASK_HIGH); } +/* Older chips have newlib nano in rom as well, but this is not linked in due to us now using 64 bit time_t + and the ROM code was compiled for 32 bit. + */ +#define PRINTF_NANO_IN_ROM (CONFIG_NEWLIB_NANO_FORMAT && (CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32H2)) +#define SSCANF_NANO_IN_ROM (CONFIG_NEWLIB_NANO_FORMAT && CONFIG_IDF_TARGET_ESP32C2) TEST_CASE("check if ROM or Flash is used for functions", "[newlib]") { -#if CONFIG_NEWLIB_NANO_FORMAT || ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT +#if PRINTF_NANO_IN_ROM || (ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT && !CONFIG_NEWLIB_NANO_FORMAT) TEST_ASSERT(fn_in_rom(vfprintf)); #else TEST_ASSERT_FALSE(fn_in_rom(vfprintf)); -#endif // CONFIG_NEWLIB_NANO_FORMAT || ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT +#endif // PRINTF_NANO_IN_ROM || (ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT && !CONFIG_NEWLIB_NANO_FORMAT) -#if (CONFIG_NEWLIB_NANO_FORMAT && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2)) || ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT +#if SSCANF_NANO_IN_ROM || (ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT && !CONFIG_NEWLIB_NANO_FORMAT) TEST_ASSERT(fn_in_rom(sscanf)); #else TEST_ASSERT_FALSE(fn_in_rom(sscanf)); -#endif // (CONFIG_NEWLIB_NANO_FORMAT && CONFIG_IDF_TARGET_x) || ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT +#endif // SSCANF_NANO_IN_ROM || (ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT && !CONFIG_NEWLIB_NANO_FORMAT) -#if defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_SPIRAM) - TEST_ASSERT(fn_in_rom(atoi)); - TEST_ASSERT(fn_in_rom(strtol)); -#elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) \ - || defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32C6) - /* S3 and C3 always use these from ROM */ - TEST_ASSERT(fn_in_rom(atoi)); - TEST_ASSERT(fn_in_rom(strtol)); +#if defined(CONFIG_IDF_TARGET_ESP32) + +#if defined(CONFIG_SPIRAM_CACHE_WORKAROUND) + TEST_ASSERT_FALSE(fn_in_rom(atoi)); + TEST_ASSERT_FALSE(fn_in_rom(strtol)); #else + TEST_ASSERT(fn_in_rom(atoi)); + TEST_ASSERT(fn_in_rom(strtol)); +#endif //CONFIG_SPIRAM_CACHE_WORKAROUND + +#elif CONFIG_IDF_TARGET_ESP32S2 /* S2 do not have these in ROM */ TEST_ASSERT_FALSE(fn_in_rom(atoi)); TEST_ASSERT_FALSE(fn_in_rom(strtol)); -#endif // defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_SPIRAM) +#else + TEST_ASSERT(fn_in_rom(atoi)); + TEST_ASSERT(fn_in_rom(strtol)); +#endif // defined(CONFIG_IDF_TARGET_ESP32) } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2) #ifndef CONFIG_NEWLIB_NANO_FORMAT TEST_CASE("test 64bit int formats", "[newlib]") diff --git a/components/newlib/test_apps/newlib/main/test_time.c b/components/newlib/test_apps/newlib/main/test_time.c index 1c2ca098ff..b1fe10bea8 100644 --- a/components/newlib/test_apps/newlib/main/test_time.c +++ b/components/newlib/test_apps/newlib/main/test_time.c @@ -549,16 +549,14 @@ TEST_CASE("test time functions wide 64 bits", "[newlib]") #endif // !_USE_LONG_TIME_T -// IDF-6962 following test cases don't pass on C2 -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if defined( CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER ) && defined( CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER ) extern int64_t s_microseconds_offset; static const uint64_t s_start_timestamp = 1606838354; -static RTC_NOINIT_ATTR uint64_t s_saved_time; -static RTC_NOINIT_ATTR uint64_t s_time_in_reboot; +static __NOINIT_ATTR uint64_t s_saved_time; +static __NOINIT_ATTR uint64_t s_time_in_reboot; typedef enum { TYPE_REBOOT_ABORT = 0, @@ -579,6 +577,9 @@ static void print_counters(void) static void set_initial_condition(type_reboot_t type_reboot, int error_time) { + s_saved_time = 0; + s_time_in_reboot = 0; + print_counters(); struct timeval tv = { .tv_sec = s_start_timestamp, .tv_usec = 0, }; @@ -651,4 +652,3 @@ TEST_CASE_MULTIPLE_STAGES("Timestamp after abort is correct in case RTC & High-r TEST_CASE_MULTIPLE_STAGES("Timestamp after restart is correct in case RTC & High-res timer have + big error", "[newlib][reset=SW_CPU_RESET]", set_timestamp2, check_time); TEST_CASE_MULTIPLE_STAGES("Timestamp after restart is correct in case RTC & High-res timer have - big error", "[newlib][reset=SW_CPU_RESET]", set_timestamp3, check_time); #endif // CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER && CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER -#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/newlib/test_apps/newlib/pytest_newlib.py b/components/newlib/test_apps/newlib/pytest_newlib.py index dab6899ade..5fd6c062c5 100644 --- a/components/newlib/test_apps/newlib/pytest_newlib.py +++ b/components/newlib/test_apps/newlib/pytest_newlib.py @@ -10,8 +10,8 @@ from pytest_embedded import Dut 'config', [ pytest.param('default', marks=[pytest.mark.supported_targets]), + pytest.param('options', marks=[pytest.mark.supported_targets]), pytest.param('single_core_esp32', marks=[pytest.mark.esp32]), - pytest.param('single_core_esp32s2', marks=[pytest.mark.esp32s2]), pytest.param('psram_esp32', marks=[pytest.mark.esp32]), pytest.param('release_esp32', marks=[pytest.mark.esp32]), pytest.param('release_esp32c2', marks=[pytest.mark.esp32c2]), diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.default b/components/newlib/test_apps/newlib/sdkconfig.ci.default index e69de29bb2..21dc4813e2 100644 --- a/components/newlib/test_apps/newlib/sdkconfig.ci.default +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.default @@ -0,0 +1,2 @@ +# Test all chips with nano off, nano on is tested in options config +CONFIG_NEWLIB_NANO_FORMAT=n diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.options b/components/newlib/test_apps/newlib/sdkconfig.ci.options new file mode 100644 index 0000000000..caf70fc890 --- /dev/null +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.options @@ -0,0 +1,2 @@ +# Test with misc newlib config options turned on +CONFIG_NEWLIB_NANO_FORMAT=y diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 b/components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 index e53effec70..e712a20a6c 100644 --- a/components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 +++ b/components/newlib/test_apps/newlib/sdkconfig.ci.psram_esp32 @@ -1,12 +1,2 @@ CONFIG_IDF_TARGET="esp32" CONFIG_SPIRAM=y - -# moved from old psram config -CONFIG_ESP_INT_WDT_TIMEOUT_MS=800 -CONFIG_SPIRAM_OCCUPY_NO_HOST=y -CONFIG_ESP_WIFI_RX_IRAM_OPT=n -CONFIG_ESP_WIFI_IRAM_OPT=n -# Disable encrypted flash reads/writes to save IRAM in this build configuration -CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=n -CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY=y -CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y diff --git a/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 b/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 deleted file mode 100644 index 00ca80c09c..0000000000 --- a/components/newlib/test_apps/newlib/sdkconfig.ci.single_core_esp32s2 +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_IDF_TARGET="esp32s2" -CONFIG_FREERTOS_UNICORE=y -# IDF-6964 test nano format in this configuration (current tests are not passing, so keep disabled for now) -CONFIG_NEWLIB_NANO_FORMAT=n