Merge branch 'fix/flaky_test_with_memory_leak_v6.0' into 'release/v6.0'

fix(esp_system): Fix flaky tests with memory leak in sleep test (v6.0)

See merge request espressif/esp-idf!46415
This commit is contained in:
Jiang Jiang Jian
2026-03-20 10:40:05 +08:00
@@ -96,6 +96,7 @@ TEST_CASE("light sleep stress test", "[lightsleep]")
#if CONFIG_FREERTOS_NUMBER_OF_CORES == 2
xSemaphoreTake(done, portMAX_DELAY);
#endif
vTaskDelay(10 / portTICK_PERIOD_MS); // Give some time for the test task to suspend itself
vSemaphoreDelete(done);
}
@@ -122,6 +123,7 @@ TEST_CASE("light sleep stress test with periodic esp_timer", "[lightsleep]")
#if CONFIG_FREERTOS_NUMBER_OF_CORES == 2
xSemaphoreTake(done, portMAX_DELAY);
#endif
vTaskDelay(10 / portTICK_PERIOD_MS); // Give some time for the test task to suspend itself
vSemaphoreDelete(done);
esp_timer_stop(timer);
esp_timer_delete(timer);