Skip to content

Commit 502db21

Browse files
Flavio Ceolinnashif
authored andcommitted
tests: crypto: mbedtls: Fix mbedTLS self test usage
All _self_test functions should be called only if MBEDTLS_SELF_TEST is enabled. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 8b70ace commit 502db21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/crypto/mbedtls/src/mbedtls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,14 @@ void test_mbedtls(void)
407407
mbedtls_memory_buffer_alloc_status();
408408
#endif
409409
}
410+
#if defined(MBEDTLS_SELF_TEST)
410411
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
411412
mbedtls_memory_buffer_alloc_free();
412413
if (mbedtls_memory_buffer_alloc_self_test(v) != 0) {
413414
suites_failed++;
414415
}
415416
suites_tested++;
417+
#endif
416418
#endif
417419

418420
if (v != 0) {

0 commit comments

Comments
 (0)