fix(esp_system): delay after light sleep stress cleanup

This commit is contained in:
Marius Vikhammer
2026-09-01 10:39:56 +08:00
parent 283d7b5ebd
commit 85bb3faa5f
@@ -97,9 +97,8 @@ TEST_CASE("light sleep stress test", "[lightsleep]")
#if CONFIG_FREERTOS_NUMBER_OF_CORES == 2
xSemaphoreTake(done, portMAX_DELAY);
#endif
/* vTaskDelete() only queues TCB/stack for idle; wait for two idle passes. */
vTaskDelay(2);
vSemaphoreDelete(done);
vTaskDelay(10);
}
static void timer_func(void* arg)
@@ -125,12 +124,10 @@ TEST_CASE("light sleep stress test with periodic esp_timer", "[lightsleep]")
#if CONFIG_FREERTOS_NUMBER_OF_CORES == 2
xSemaphoreTake(done, portMAX_DELAY);
#endif
/* Stop the periodic timer first, otherwise it starves idle and the
* self-deleted worker looks like a leak to Unity. */
vSemaphoreDelete(done);
esp_timer_stop(timer);
esp_timer_delete(timer);
vTaskDelay(2);
vSemaphoreDelete(done);
vTaskDelay(10);
}
#endif // !(CONFIG_SPIRAM) || (CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL >= 16384)