From 8df075a5341a59cd3f3aa0dd72e9885d18b854a3 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 26 Jan 2026 15:43:36 +0800 Subject: [PATCH] fix(wifi): fix unit test ci memory check fail issue --- .../external_coex_function/main/test_enable_extern_coex.c | 1 + .../test_apps/wifi_function/main/test_wifi_country.c | 1 + .../esp_wifi/test_apps/wifi_function/main/test_wifi_init.c | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c b/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c index e362e796a1..c1663cdab2 100644 --- a/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c +++ b/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c @@ -58,6 +58,7 @@ TEST_CASE("enable external coex", "[external_coex]") #if !SOC_MODEM_CLOCK_IS_INDEPENDENT && !CONFIG_IDF_TARGET_ESP32C2 ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit")); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); #endif ESP_LOGI(TAG, "test passed..."); diff --git a/components/esp_wifi/test_apps/wifi_function/main/test_wifi_country.c b/components/esp_wifi/test_apps/wifi_function/main/test_wifi_country.c index 82bfc347e5..1cbb3a79e9 100644 --- a/components/esp_wifi/test_apps/wifi_function/main/test_wifi_country.c +++ b/components/esp_wifi/test_apps/wifi_function/main/test_wifi_country.c @@ -56,6 +56,7 @@ TEST_CASE("wifi set country code", "[wifi_init]") ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit")); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); ESP_LOGI(TAG, "test passed..."); } diff --git a/components/esp_wifi/test_apps/wifi_function/main/test_wifi_init.c b/components/esp_wifi/test_apps/wifi_function/main/test_wifi_init.c index f941cda44c..76a179a532 100644 --- a/components/esp_wifi/test_apps/wifi_function/main/test_wifi_init.c +++ b/components/esp_wifi/test_apps/wifi_function/main/test_wifi_init.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -60,6 +60,7 @@ static void wifi_driver_can_start_on_APP_CPU_task(void* arg) TEST_ESP_OK(esp_wifi_init(&cfg)); ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit...")); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); ESP_LOGI(TAG, EMPH_STR("event_deinit")); TEST_ESP_OK(event_deinit()); ESP_LOGI(TAG, "exit task..."); @@ -98,6 +99,7 @@ TEST_CASE("Calling esp_wifi_stop() with start", "[wifi_init]") TEST_ESP_OK(esp_wifi_stop()); ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit")); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); ESP_LOGI(TAG, EMPH_STR("event_deinit")); TEST_ESP_OK(event_deinit()); ESP_LOGI(TAG, "test passed..."); @@ -114,6 +116,7 @@ TEST_CASE("Calling esp_wifi_stop() without start", "[wifi_init]") TEST_ESP_OK(esp_wifi_stop()); ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit")); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); ESP_LOGI(TAG, EMPH_STR("event_deinit")); TEST_ESP_OK(event_deinit()); ESP_LOGI(TAG, "test passed..."); @@ -134,6 +137,7 @@ TEST_CASE("Calling esp_wifi_deinit() without stop", "[wifi_init]") TEST_ESP_OK(esp_wifi_stop()); ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit")); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); ESP_LOGI(TAG, EMPH_STR("event_deinit")); TEST_ESP_OK(event_deinit()); ESP_LOGI(TAG, "test passed..."); @@ -150,6 +154,7 @@ TEST_CASE("Calling esp_wifi_connect() without start", "[wifi_init]") TEST_ESP_ERR(ESP_ERR_WIFI_NOT_STARTED, esp_wifi_connect()); ESP_LOGI(TAG, EMPH_STR("esp_wifi_deinit")); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); ESP_LOGI(TAG, EMPH_STR("event_deinit")); TEST_ESP_OK(event_deinit()); ESP_LOGI(TAG, "test passed...");