mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-05 06:26:52 +00:00
Add accessor helpers for mbedtls_test_info
Step one of being able to control access to mbedtls_test_info with a mutex. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
a021d63bf7
commit
4580d4d829
7 changed files with 159 additions and 33 deletions
|
|
@ -427,7 +427,7 @@ int test_hooks_failure_detected(void)
|
|||
mbedtls_test_mutex_usage_check();
|
||||
#endif
|
||||
|
||||
if (mbedtls_test_info.result != MBEDTLS_TEST_RESULT_SUCCESS) {
|
||||
if (mbedtls_test_get_result() != MBEDTLS_TEST_RESULT_SUCCESS) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -343,9 +343,11 @@ int main(int argc, char *argv[])
|
|||
#if defined(MBEDTLS_TEST_MUTEX_USAGE)
|
||||
mbedtls_test_mutex_usage_check();
|
||||
#endif
|
||||
int result = (int) mbedtls_test_get_result();
|
||||
|
||||
mbedtls_printf("Running metatest %s... done, result=%d\n",
|
||||
argv[1], (int) mbedtls_test_info.result);
|
||||
mbedtls_exit(mbedtls_test_info.result == MBEDTLS_TEST_RESULT_SUCCESS ?
|
||||
argv[1], result);
|
||||
mbedtls_exit(result == MBEDTLS_TEST_RESULT_SUCCESS ?
|
||||
MBEDTLS_EXIT_SUCCESS :
|
||||
MBEDTLS_EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue