From 065bd322200ccf2f9d717fd258ec966a522ce733 Mon Sep 17 00:00:00 2001 From: Ilya Tagunov Date: Wed, 27 Nov 2024 07:59:31 +0000 Subject: [PATCH] tests: secure_storage: psa: enable malloc arena for Mbed TLS The PSA Crypto implementation provided by Mbed TLS generally requires some amount of heap to function, so enable the arena unconditionally to make the test compatible with MINIMAL_LIBC configurations where the arena is disabled by default. Signed-off-by: Ilya Tagunov --- .../secure_storage/psa/crypto/overlay-secure_storage.conf | 2 ++ .../secure_storage/psa/its/overlay-default_transform.conf | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/subsys/secure_storage/psa/crypto/overlay-secure_storage.conf b/tests/subsys/secure_storage/psa/crypto/overlay-secure_storage.conf index 063c04fd2b5e..e076008277b6 100644 --- a/tests/subsys/secure_storage/psa/crypto/overlay-secure_storage.conf +++ b/tests/subsys/secure_storage/psa/crypto/overlay-secure_storage.conf @@ -4,6 +4,8 @@ CONFIG_MAIN_STACK_SIZE=2048 CONFIG_MBEDTLS=y CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_TIMER_RANDOM_GENERATOR=y +# PSA Crypto needs some heap, but MINIMAL_LIBC has none by default. +CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=2048 CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_SECURE_STORAGE=y diff --git a/tests/subsys/secure_storage/psa/its/overlay-default_transform.conf b/tests/subsys/secure_storage/psa/its/overlay-default_transform.conf index 2f49f5d6593a..dd3041073096 100644 --- a/tests/subsys/secure_storage/psa/its/overlay-default_transform.conf +++ b/tests/subsys/secure_storage/psa/its/overlay-default_transform.conf @@ -1,6 +1,8 @@ CONFIG_MBEDTLS=y CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_TIMER_RANDOM_GENERATOR=y +# PSA Crypto needs some heap, but MINIMAL_LIBC has none by default. +CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=2048 CONFIG_MBEDTLS_PSA_CRYPTO_C=y # SETTINGS_MAX_VAL_LEN (256) - flags (1) - CONFIG_SECURE_STORAGE_ITS_TRANSFORM_OUTPUT_OVERHEAD (28)