From 905b427479cf694a3258a2c75340f6144d556739 Mon Sep 17 00:00:00 2001 From: Armando Date: Fri, 15 Mar 2024 15:46:07 +0800 Subject: [PATCH] test(cache): added test for M2C with ESP_CACHE_MSYNC_FLAG_UNALIGNED --- components/esp_mm/test_apps/mm/main/test_cache_msync.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/esp_mm/test_apps/mm/main/test_cache_msync.c b/components/esp_mm/test_apps/mm/main/test_cache_msync.c index 8b4c2200dd..deffc6e051 100644 --- a/components/esp_mm/test_apps/mm/main/test_cache_msync.c +++ b/components/esp_mm/test_apps/mm/main/test_cache_msync.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -202,3 +202,8 @@ TEST_CASE("test cache msync work with PSRAM stack", "[cache]") free(stack_for_task); } #endif //#if CONFIG_SPIRAM + +TEST_CASE("test cache msync unaligned flag not work with M2C direction", "[cache]") +{ + TEST_ASSERT(esp_cache_msync((void *)TEST_SYNC_START, 0x8000, ESP_CACHE_MSYNC_FLAG_UNALIGNED | ESP_CACHE_MSYNC_FLAG_DIR_M2C) == ESP_ERR_INVALID_ARG); +}