Skip to content
Permalink
Browse files

tests: mbedtls: Call mbedtls_platform_set_printf() only if needed

It exists only if MBEDTLS_PLATFORM_PRINTF_ALT is defined, whcih we
no longer do, but make the call condiitonal in case we'll need to
make it configurable later.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
  • Loading branch information...
pfalcon authored and nashif committed May 23, 2019
1 parent af529d1 commit bf070716d155d390aca3f0a01ddd1a2470487f98
Showing with 4 additions and 0 deletions.
  1. +2 −0 tests/benchmarks/mbedtls/src/benchmark.c
  2. +2 −0 tests/crypto/mbedtls/src/mbedtls.c
@@ -299,7 +299,9 @@ int main(int argc, char *argv[])
printk("\tMBEDTLS Benchmark sample\n");

mbedtls_debug_set_threshold(CONFIG_MBEDTLS_DEBUG_LEVEL);
#if defined(MBEDTLS_PLATFORM_PRINTF_ALT)
mbedtls_platform_set_printf(MBEDTLS_PRINT);
#endif
mbedtls_ssl_conf_dbg(&conf, my_debug, NULL);

k_delayed_work_init(&mbedtls_alarm, mbedtls_alarm_timeout);
@@ -164,7 +164,9 @@ void test_mbedtls(void)

void *pointer;

#if defined(MBEDTLS_PLATFORM_PRINTF_ALT)
mbedtls_platform_set_printf(MBEDTLS_PRINT);
#endif

TC_START("Performing mbedTLS crypto tests:");

0 comments on commit bf07071

Please sign in to comment.
You can’t perform that action at this time.