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 <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2024-01-11 16:33:46 +00:00
parent 8174478f82
commit 9432e64933

View File

@ -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 },