TF-M Reference Manual
1.2.0
TrustedFirmware-M
Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
platform_tests_common.c
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019, Arm Limited. All rights reserved.
3
*
4
* SPDX-License-Identifier: BSD-3-Clause
5
*
6
*/
7
8
#include "
tfm_platform_api.h
"
9
#include "
platform_tests_common.h
"
10
14
void
tfm_platform_test_common_001
(
struct
test_result_t
*
ret
)
15
{
16
int32_t err;
17
18
err =
tfm_platform_ioctl
((
tfm_platform_ioctl_req_t
)
INVALID_REQUEST
,
19
NULL,
20
NULL);
21
if
(err !=
TFM_PLATFORM_ERR_NOT_SUPPORTED
) {
22
TEST_FAIL
(
"Call with invalid request should fail."
);
23
return
;
24
}
25
26
ret->
val
=
TEST_PASSED
;
27
}
tfm_platform_api.h
TEST_PASSED
Definition:
test_framework.h:23
test_result_t
Definition:
test_framework.h:27
TEST_FAIL
#define TEST_FAIL(info_msg)
Definition:
test_framework.h:137
tfm_platform_ioctl_req_t
int32_t tfm_platform_ioctl_req_t
Definition:
tfm_platform_api.h:45
tfm_platform_test_common_001
void tfm_platform_test_common_001(struct test_result_t *ret)
Call the platform service with an invalid request.
Definition:
platform_tests_common.c:14
INVALID_REQUEST
#define INVALID_REQUEST
Definition:
platform_tests_common.h:17
TFM_PLATFORM_ERR_NOT_SUPPORTED
Definition:
tfm_platform_api.h:39
test_t::ret
struct test_result_t ret
Definition:
test_framework.h:47
platform_tests_common.h
test_result_t::val
enum test_status_t val
Definition:
test_framework.h:28
tfm_platform_ioctl
enum tfm_platform_err_t tfm_platform_ioctl(tfm_platform_ioctl_req_t request, psa_invec *input, psa_outvec *output)
Performs a platform-specific service.
Definition:
tfm_platform_func_api.c:24
test
suites
platform
platform_tests_common.c
Generated on Thu Feb 18 2021 13:29:12 for TF-M Reference Manual by
1.8.6