Skip to content

Commit

Permalink
Merge pull request #7642 from valeriosetti/backport-fix-test-suite-debug
Browse files Browse the repository at this point in the history
Backport: add missing USE_PSA_INIT/DONE in test_suite_debug
  • Loading branch information
mpg authored May 23, 2023
2 parents c1f78a2 + c6240f7 commit 9ee945f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/suites/test_suite_debug.function
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void debug_print_msg_threshold(int threshold, int level, char *file,
mbedtls_ssl_config_init(&conf);
memset(buffer.buf, 0, 2000);
buffer.ptr = buffer.buf;
USE_PSA_INIT();

TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);

Expand All @@ -75,6 +76,7 @@ void debug_print_msg_threshold(int threshold, int level, char *file,
exit:
mbedtls_ssl_free(&ssl);
mbedtls_ssl_config_free(&conf);
USE_PSA_DONE();
}
/* END_CASE */

Expand All @@ -90,6 +92,7 @@ void mbedtls_debug_print_ret(char *file, int line, char *text, int value,
mbedtls_ssl_config_init(&conf);
memset(buffer.buf, 0, 2000);
buffer.ptr = buffer.buf;
USE_PSA_INIT();

TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);

Expand All @@ -102,6 +105,7 @@ void mbedtls_debug_print_ret(char *file, int line, char *text, int value,
exit:
mbedtls_ssl_free(&ssl);
mbedtls_ssl_config_free(&conf);
USE_PSA_DONE();
}
/* END_CASE */

Expand All @@ -117,7 +121,7 @@ void mbedtls_debug_print_buf(char *file, int line, char *text,
mbedtls_ssl_config_init(&conf);
memset(buffer.buf, 0, 2000);
buffer.ptr = buffer.buf;

USE_PSA_INIT();

TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);

Expand All @@ -130,6 +134,7 @@ void mbedtls_debug_print_buf(char *file, int line, char *text,
exit:
mbedtls_ssl_free(&ssl);
mbedtls_ssl_config_free(&conf);
USE_PSA_DONE();
}
/* END_CASE */

Expand All @@ -145,6 +150,8 @@ void mbedtls_debug_print_crt(char *crt_file, char *file, int line,
mbedtls_ssl_init(&ssl);
mbedtls_ssl_config_init(&conf);
mbedtls_x509_crt_init(&crt);
USE_PSA_INIT();

memset(buffer.buf, 0, 2000);
buffer.ptr = buffer.buf;

Expand All @@ -161,6 +168,7 @@ exit:
mbedtls_x509_crt_free(&crt);
mbedtls_ssl_free(&ssl);
mbedtls_ssl_config_free(&conf);
USE_PSA_DONE();
}
/* END_CASE */

Expand All @@ -178,6 +186,7 @@ void mbedtls_debug_print_mpi(char *value, char *file, int line,
mbedtls_mpi_init(&val);
memset(buffer.buf, 0, 2000);
buffer.ptr = buffer.buf;
USE_PSA_INIT();

TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);

Expand All @@ -193,5 +202,6 @@ exit:
mbedtls_mpi_free(&val);
mbedtls_ssl_free(&ssl);
mbedtls_ssl_config_free(&conf);
USE_PSA_DONE();
}
/* END_CASE */

0 comments on commit 9ee945f

Please sign in to comment.