1 /** @file
2 * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
3 * SPDX-License-Identifier : Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 **/
17
18 #include "val_interfaces.h"
19 #include "val_target.h"
20 #include "test_i089.h"
21
22 #define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 89)
23 #define TEST_DESC "Testing psa_panic API\n"
24 TEST_PUBLISH(TEST_NUM, test_entry);
25 val_api_t *val = NULL;
26 psa_api_t *psa = NULL;
27
test_entry(val_api_t * val_api,psa_api_t * psa_api)28 void test_entry(val_api_t *val_api, psa_api_t *psa_api)
29 {
30 int32_t status = VAL_STATUS_SUCCESS;
31
32 val = val_api;
33 psa = psa_api;
34
35 /* test init */
36 val->test_init(TEST_NUM, TEST_DESC, TEST_FIELD(TEST_ISOLATION_L1, WD_LOW_TIMEOUT));
37 if (!IS_TEST_START(val->get_status()))
38 {
39 goto test_exit;
40 }
41
42 /* Execute list of tests available in test[num]_client_tests_list from Non-secure side*/
43 status = val->execute_non_secure_tests(TEST_NUM, test_i089_client_tests_list, TRUE);
44 if (VAL_ERROR(status))
45 {
46 goto test_exit;
47 }
48
49 test_exit:
50 val->test_exit();
51 }
52