From c8e79a926620e48830778714cfe4b2ea2453fcaf Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 25 Jul 2025 13:33:07 +1000 Subject: Update forked idf components --- lib/bt/test_apps/memory_release/main/test_app_main.c | 5 ++++- .../memory_release/pytest_memory_release.py | 20 +++++++++++++------- lib/bt/test_apps/memory_release/sdkconfig.defaults | 2 ++ 3 files changed, 19 insertions(+), 8 deletions(-) (limited to 'lib/bt/test_apps/memory_release') diff --git a/lib/bt/test_apps/memory_release/main/test_app_main.c b/lib/bt/test_apps/memory_release/main/test_app_main.c index 562d1d97..909a730d 100644 --- a/lib/bt/test_apps/memory_release/main/test_app_main.c +++ b/lib/bt/test_apps/memory_release/main/test_app_main.c @@ -11,6 +11,7 @@ #include "nvs_flash.h" #include "multi_heap.h" +#include "esp_heap_caps.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" @@ -127,5 +128,7 @@ void app_main(void) } ESP_LOGI(tag, "Free heap size increased by %"PRIu32" bytes", free_after - free_before); - ESP_LOGI(tag, "SUCCESS"); + if (heap_caps_check_integrity_all(true)) { + ESP_LOGI(tag, "Comprehensive heap check: SUCCESS"); + } } diff --git a/lib/bt/test_apps/memory_release/pytest_memory_release.py b/lib/bt/test_apps/memory_release/pytest_memory_release.py index dbefc908..d5d70fcd 100644 --- a/lib/bt/test_apps/memory_release/pytest_memory_release.py +++ b/lib/bt/test_apps/memory_release/pytest_memory_release.py @@ -1,15 +1,21 @@ -# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded import Dut +from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.parametrize('config', [ - pytest.param('default', marks=[pytest.mark.esp32, pytest.mark.esp32c2, pytest.mark.generic]), - pytest.param('iram', marks=[pytest.mark.esp32c2, pytest.mark.generic]), - pytest.param('psram', marks=[pytest.mark.esp32, pytest.mark.psram]), -], indirect=True) +@idf_parametrize( + 'config,target,markers', + [ + ('default', 'esp32', (pytest.mark.generic,)), + ('default', 'esp32c2', (pytest.mark.generic,)), + ('iram', 'esp32c2', (pytest.mark.generic,)), + ('psram', 'esp32', (pytest.mark.psram,)), + ], + indirect=['config', 'target'], +) def test_bt_memory_release(dut: Dut) -> None: dut.expect_exact('BLE Host Task Started', timeout=6) dut.expect_exact('BLE Host Task Stopped', timeout=8) - dut.expect_exact('SUCCESS', timeout=10) + dut.expect_exact('Comprehensive heap check: SUCCESS', timeout=10) diff --git a/lib/bt/test_apps/memory_release/sdkconfig.defaults b/lib/bt/test_apps/memory_release/sdkconfig.defaults index a22d8109..fc2b04c1 100644 --- a/lib/bt/test_apps/memory_release/sdkconfig.defaults +++ b/lib/bt/test_apps/memory_release/sdkconfig.defaults @@ -1,2 +1,4 @@ +CONFIG_HEAP_POISONING_COMPREHENSIVE=y + CONFIG_BT_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y -- cgit v1.2.3