From 4175dd7a56178221b811c7285c289d159eaf447f Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Mon, 2 Jan 2023 12:04:04 +0100 Subject: [PATCH] newlib: Update the esp32c2 config default to avoid RTC related test to not run on esp32c2 Set CONFIG_NEWLIB_TIME_SYSCALL_USE_HRT to enable to force CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER to disable and hence prevent the following tests from being executed: - Timestamp after abort is correct in case RTC & High-res timer have + big error - Timestamp after restart is correct in case RTC & High-res timer have + big error - Timestamp after restart is correct in case RTC & High-res timer have - big error --- components/newlib/test/test_time.c | 3 --- tools/unit-test-app/configs/default_2_c2 | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/newlib/test/test_time.c b/components/newlib/test/test_time.c index a72ffbe6d7..b634d5a356 100644 --- a/components/newlib/test/test_time.c +++ b/components/newlib/test/test_time.c @@ -541,8 +541,6 @@ TEST_CASE("test time functions wide 64 bits", "[newlib]") #endif // !_USE_LONG_TIME_T #if defined( CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER ) && defined( CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER ) -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) -//IDF-5057 extern int64_t s_microseconds_offset; static const uint64_t s_start_timestamp = 1606838354; @@ -641,5 +639,4 @@ static void check_time(void) TEST_CASE_MULTIPLE_STAGES("Timestamp after abort is correct in case RTC & High-res timer have + big error", "[newlib][reset=abort,SW_CPU_RESET]", set_timestamp1, 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_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 //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif // CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER && CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER diff --git a/tools/unit-test-app/configs/default_2_c2 b/tools/unit-test-app/configs/default_2_c2 index b5b89f39c6..38b9cbabcc 100644 --- a/tools/unit-test-app/configs/default_2_c2 +++ b/tools/unit-test-app/configs/default_2_c2 @@ -1,3 +1,7 @@ # This config is split between targets since different component needs to be included CONFIG_IDF_TARGET="esp32c2" TEST_COMPONENTS=app_trace bootloader_support console efuse esp_common esp_eth esp_event esp_hid esp_http_client esp_http_server esp_netif esp_phy esp_ringbuf esp_rom esp_wifi espcoredump hal lwip mbedtls mdns mqtt newlib nvs_flash partition_table protocomm sdmmc spiffs +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