From 7fb7fdabd730751c38e18fee816d028ec1befed2 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Tue, 22 Apr 2025 16:28:55 +0200 Subject: [PATCH] tests: scripts: fix component_test_no_platform() Use alternative implementation of mbedtls_platform_get_entropy() since the default one lives in "platform.c" and that one is excluded in this test component. Signed-off-by: Valerio Setti --- tests/scripts/components-configuration.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/scripts/components-configuration.sh b/tests/scripts/components-configuration.sh index 2dfa6d2114..cc2cf0604f 100644 --- a/tests/scripts/components-configuration.sh +++ b/tests/scripts/components-configuration.sh @@ -280,6 +280,10 @@ component_test_no_platform () { scripts/config.py unset MBEDTLS_PSA_CRYPTO_STORAGE_C scripts/config.py unset MBEDTLS_PSA_ITS_FILE_C scripts/config.py unset MBEDTLS_ENTROPY_NV_SEED + # Use the test alternative implementation of mbedtls_platform_get_entropy() + # which is provided in "framework/tests/src/fake_external_rng_for_test.c" + # since the default one is excluded in this scenario. + scripts/config.py set MBEDTLS_PLATFORM_GET_ENTROPY_ALT # Note, _DEFAULT_SOURCE needs to be defined for platforms using glibc version >2.19, # to re-enable platform integration features otherwise disabled in C99 builds make CC=gcc CFLAGS='-Werror -Wall -Wextra -std=c99 -pedantic -Os -D_DEFAULT_SOURCE' lib programs