From 9432e64933f77fb3392b9346607670ea7caaacd6 Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Thu, 11 Jan 2024 16:33:46 +0000 Subject: [PATCH] Only run memory poisoning metatests when poisoning When we cannot memory poison due to platform constraints, do not attempt to run memory poisoning metatests (but still run other ASan metatests). Signed-off-by: David Horstmann --- programs/test/metatest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/test/metatest.c b/programs/test/metatest.c index 392b638420..bdcb1df9af 100644 --- a/programs/test/metatest.c +++ b/programs/test/metatest.c @@ -362,6 +362,7 @@ metatest_t metatests[] = { { "double_free", "asan", double_free }, { "read_uninitialized_stack", "msan", read_uninitialized_stack }, { "memory_leak", "asan", memory_leak }, +#if defined(MBEDTLS_TEST_MEMORY_CAN_POISON) { "test_memory_poison_0_0_8_r", "asan", test_memory_poison }, { "test_memory_poison_0_0_8_w", "asan", test_memory_poison }, { "test_memory_poison_0_7_8_r", "asan", test_memory_poison }, @@ -378,6 +379,7 @@ metatest_t metatests[] = { { "test_memory_poison_7_0_1_w", "asan", test_memory_poison }, { "test_memory_poison_7_1_2_r", "asan", test_memory_poison }, { "test_memory_poison_7_1_2_w", "asan", test_memory_poison }, +#endif /* MBEDTLS_TEST_MEMORY_CAN_POISON */ { "mutex_lock_not_initialized", "pthread", mutex_lock_not_initialized }, { "mutex_unlock_not_initialized", "pthread", mutex_unlock_not_initialized }, { "mutex_free_not_initialized", "pthread", mutex_free_not_initialized },