From 2f8ef67a2d6db22a55477bb63e8e848656e0e082 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Fri, 28 Aug 2026 16:52:22 +0300 Subject: [PATCH] test(esp_timer): Restrict LAC-timer alarm test to ESP32 only The "set timer < now_time" test targets the ESP32 LAC timer (magic constant 0xefffffff/80 and a tick-based tolerance) and is not valid on systimer-based targets, where it fails under the ISR-dispatch configs. On master it is already guarded with CONFIG_IDF_TARGET_ESP32; this guard was not backported to v6.1. Add the same guard here. --- components/esp_timer/test_apps/main/test_esp_timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/esp_timer/test_apps/main/test_esp_timer.c b/components/esp_timer/test_apps/main/test_esp_timer.c index b12f18a0fb2..a2aaf6c88d2 100644 --- a/components/esp_timer/test_apps/main/test_esp_timer.c +++ b/components/esp_timer/test_apps/main/test_esp_timer.c @@ -875,6 +875,7 @@ TEST_CASE("esp_timer_impl_set_alarm and using start_once do not lead that the Sy #endif // !defined(CONFIG_FREERTOS_UNICORE) && SOC_DPORT_WORKAROUND +#ifdef CONFIG_IDF_TARGET_ESP32 TEST_CASE("Test case when esp_timer_impl_set_alarm needs set timer < now_time", "[esp_timer]") { esp_timer_impl_advance(50331648); // 0xefffffff/80 = 50331647 @@ -892,6 +893,7 @@ TEST_CASE("Test case when esp_timer_impl_set_alarm needs set timer < now_time", printf("alarm_reg = 0x%llx, count_reg 0x%llx\n", alarm_reg, count_reg); TEST_ASSERT(alarm_reg <= (count_reg + offset)); } +#endif // CONFIG_IDF_TARGET_ESP32 static void timer_callback5(void* arg) {