mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-20 12:40:47 +00:00
Separate memory poisoning tests from generic ASan
Some platforms may support ASan but be C99-only (no C11 support). These platforms will support ASan metatests but not memory poisoning, which requires C11 features. To allow for this, create a separate platform requirement, "poison", in metatest.c to distinguish generic ASan metatests from ones that require suppport for memory poisoning. In practice our platforms support both, so run "poison" tests in the same all.sh components where we run "asan" ones. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
fad038c501
commit
9de6edd462
@ -362,24 +362,22 @@ 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 },
|
||||
{ "test_memory_poison_0_7_8_w", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_0_0_1_r", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_0_0_1_w", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_0_1_2_r", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_0_1_2_w", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_8_r", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_8_w", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_7_8_r", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_7_8_w", "asan", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_1_r", "asan", test_memory_poison },
|
||||
{ "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 */
|
||||
{ "test_memory_poison_0_0_8_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_0_0_8_w", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_0_7_8_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_0_7_8_w", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_0_0_1_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_0_0_1_w", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_0_1_2_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_0_1_2_w", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_8_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_8_w", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_7_8_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_7_8_w", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_1_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_0_1_w", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_1_2_r", "poison", test_memory_poison },
|
||||
{ "test_memory_poison_7_1_2_w", "poison", test_memory_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 },
|
||||
|
@ -1125,7 +1125,7 @@ component_test_default_cmake_gcc_asan () {
|
||||
programs/test/selftest
|
||||
|
||||
msg "test: metatests (GCC, ASan build)"
|
||||
tests/scripts/run-metatests.sh any asan
|
||||
tests/scripts/run-metatests.sh any asan poison
|
||||
|
||||
msg "test: ssl-opt.sh (ASan build)" # ~ 1 min
|
||||
tests/ssl-opt.sh
|
||||
@ -1944,7 +1944,7 @@ component_test_everest () {
|
||||
make test
|
||||
|
||||
msg "test: metatests (clang, ASan)"
|
||||
tests/scripts/run-metatests.sh any asan
|
||||
tests/scripts/run-metatests.sh any asan poison
|
||||
|
||||
msg "test: Everest ECDH context - ECDH-related part of ssl-opt.sh (ASan build)" # ~ 5s
|
||||
tests/ssl-opt.sh -f ECDH
|
||||
|
Loading…
x
Reference in New Issue
Block a user