blob: 001f037dd9045d6347a8f6e5d4353933ef743bc6 [file] [log] [blame]
Jens Wiklander29326472018-04-20 11:22:15 +02001// SPDX-License-Identifier: GPL-2.0
2/* Copyright (c) 2018, Linaro Limited */
3
4#include "xtest_test.h"
5#include "xtest_helpers.h"
6
7#include <ta_crypt.h>
8#include <tee_api_types.h>
9#include <compiler.h>
10
11static void test_8101(ADBG_Case_t *c __maybe_unused)
12{
13#ifdef CFG_TA_MBEDTLS_SELF_TEST
14 TEEC_Session session = { 0 };
15 uint32_t ret_orig;
16
17 if (!ADBG_EXPECT_TEEC_SUCCESS(c, xtest_teec_open_session(
18 &session, &crypt_user_ta_uuid,
19 NULL, &ret_orig)))
20 return;
21 ADBG_EXPECT_TEEC_SUCCESS(c,
22 TEEC_InvokeCommand(&session, TA_CRYPT_CMD_MBEDTLS_SELF_TESTS,
23 NULL, &ret_orig));
24 TEEC_CloseSession(&session);
25#else
26 Do_ADBG_Log("CFG_TA_MBEDTLS_SELF_TEST not set, test skipped");
27#endif
28}
29ADBG_CASE_DEFINE(regression, 8101, test_8101, "TA mbedTLS self tests");