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>
diff --git a/programs/test/metatest.c b/programs/test/metatest.c
index bdcb1df..79c57d1 100644
--- a/programs/test/metatest.c
+++ b/programs/test/metatest.c
@@ -362,24 +362,22 @@
     { "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 },
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index 4465d05..0daab09 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -1125,7 +1125,7 @@
     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 @@
     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