From 9c7ff1094b08107257e3bb7f0189eac66e99fe2a 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 | 5 +++++ .../wpa_supplicant/test_apps/main/test_wifi_external_bss.c | 1 + 4 files changed, 8 insertions(+) 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 11005c4099..63bba7efb2 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..cb522f8875 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 @@ -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..."); diff --git a/components/wpa_supplicant/test_apps/main/test_wifi_external_bss.c b/components/wpa_supplicant/test_apps/main/test_wifi_external_bss.c index 2bc994c8fc..e63355d922 100644 --- a/components/wpa_supplicant/test_apps/main/test_wifi_external_bss.c +++ b/components/wpa_supplicant/test_apps/main/test_wifi_external_bss.c @@ -105,6 +105,7 @@ static void stop_wifi(void) } vTaskDelay(500 / portTICK_PERIOD_MS); TEST_ESP_OK(esp_wifi_deinit()); + vTaskDelay(1); } static void start_wifi_as_sta(void)