From 9c97fda0ab9e70ff8cd548abda0e1c5964ffa387 Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Thu, 14 Dec 2023 14:27:50 +0000 Subject: [PATCH] Move wrapper include to psa_crypto_helpers.h This makes memory poisoning wrappers available to (almost) all tests. Signed-off-by: David Horstmann --- tests/include/test/psa_crypto_helpers.h | 4 ++++ tests/suites/test_suite_psa_crypto.function | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/include/test/psa_crypto_helpers.h b/tests/include/test/psa_crypto_helpers.h index 8d0f7e69d..c29134a92 100644 --- a/tests/include/test/psa_crypto_helpers.h +++ b/tests/include/test/psa_crypto_helpers.h @@ -21,6 +21,10 @@ #include "mbedtls/psa_util.h" #endif +#if defined(MBEDTLS_TEST_HOOKS) +#include "test/psa_memory_poisoning_wrappers.h" +#endif + #if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) /* Internal function for #TEST_USES_KEY_ID. Return 1 on success, 0 on failure. */ diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index 8ebb3950b..796a62a5f 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -19,10 +19,6 @@ #include "test/psa_crypto_helpers.h" #include "test/psa_exercise_key.h" -#if defined(MBEDTLS_TEST_HOOKS) -#include "test/psa_memory_poisoning_wrappers.h" -#endif - /* If this comes up, it's a bug in the test code or in the test data. */ #define UNUSED 0xdeadbeef