From 873cde487c50c5cd7ec1d0380c3b1e9f9ff651ed Mon Sep 17 00:00:00 2001 From: armando Date: Thu, 3 Apr 2025 10:31:50 +0800 Subject: [PATCH] test(system): increased 200B memory leak thresh due to mmu mmap mutex 200B to extend the thresh, real increase to the memory usage will be smaller --- .../test_apps/master/main/test_app_main.c | 2 +- .../esp_mm/test_apps/mmap_hw/main/test_app_main.c | 10 +++++----- .../esp_psram/test_apps/psram/main/test_app_main.c | 2 +- .../esp_system_unity_tests/main/test_app_main.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/esp_driver_spi/test_apps/master/main/test_app_main.c b/components/esp_driver_spi/test_apps/master/main/test_app_main.c index 16ba4072f3..4bea564e9b 100644 --- a/components/esp_driver_spi/test_apps/master/main/test_app_main.c +++ b/components/esp_driver_spi/test_apps/master/main/test_app_main.c @@ -9,7 +9,7 @@ #include "esp_heap_caps.h" // iterator to load partition tables in `test spi bus lock, with flash` will lead memory not free -#define TEST_MEMORY_LEAK_THRESHOLD (350) +#define TEST_MEMORY_LEAK_THRESHOLD (450) void setUp(void) { diff --git a/components/esp_mm/test_apps/mmap_hw/main/test_app_main.c b/components/esp_mm/test_apps/mmap_hw/main/test_app_main.c index 95fc6dcab2..4127c164dc 100644 --- a/components/esp_mm/test_apps/mmap_hw/main/test_app_main.c +++ b/components/esp_mm/test_apps/mmap_hw/main/test_app_main.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -13,11 +13,11 @@ * - traversing all vaddr range to check their attributes * * These tests need certain number of internal resources (heap memory), as they uses up the vaddr ranges - * On ESP32, it should be around 450 - * On ESP32S2, it should be around 600 - * On other chips, it should be around 400 + * On ESP32, it should be around 650 + * On ESP32S2, it should be around 800 + * On other chips, it should be around 600 */ -#define TEST_MEMORY_LEAK_THRESHOLD (-650) +#define TEST_MEMORY_LEAK_THRESHOLD (-800) static size_t before_free_8bit; static size_t before_free_32bit; diff --git a/components/esp_psram/test_apps/psram/main/test_app_main.c b/components/esp_psram/test_apps/psram/main/test_app_main.c index e19a4c2c37..1eaf39bad1 100644 --- a/components/esp_psram/test_apps/psram/main/test_app_main.c +++ b/components/esp_psram/test_apps/psram/main/test_app_main.c @@ -8,7 +8,7 @@ #include "unity_test_runner.h" #include "esp_heap_caps.h" -#define TEST_MEMORY_LEAK_THRESHOLD (-600) +#define TEST_MEMORY_LEAK_THRESHOLD (-750) static size_t before_free_8bit; static size_t before_free_32bit; diff --git a/components/esp_system/test_apps/esp_system_unity_tests/main/test_app_main.c b/components/esp_system/test_apps/esp_system_unity_tests/main/test_app_main.c index fdaa6101fc..a55e944f98 100644 --- a/components/esp_system/test_apps/esp_system_unity_tests/main/test_app_main.c +++ b/components/esp_system/test_apps/esp_system_unity_tests/main/test_app_main.c @@ -11,7 +11,7 @@ #include "freertos/task.h" // Some resources are lazy allocated, the threshold is left for that case -#define TEST_MEMORY_LEAK_THRESHOLD (-900) +#define TEST_MEMORY_LEAK_THRESHOLD (-1100) static size_t before_free_8bit; static size_t before_free_32bit;