TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_ss_core_test.h File Reference
#include <inttypes.h>
#include <limits.h>
#include "tfm_api.h"
Include dependency graph for tfm_ss_core_test.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

psa_status_t spm_core_test_sfn_init_success (struct psa_invec *in_vec, size_t in_len, struct psa_outvec *out_vec, size_t out_len)
 Tests whether the initialisation of the service was successful. More...
 
psa_status_t spm_core_test_sfn_direct_recursion (struct psa_invec *in_vec, size_t in_len, struct psa_outvec *out_vec, size_t out_len)
 Tests what happens when a service calls itself directly. More...
 
psa_status_t spm_core_test_sfn (struct psa_invec *in_vec, size_t in_len, struct psa_outvec *out_vec, size_t out_len)
 Entry point for multiple test cases to be executed on the secure side. More...
 

Function Documentation

psa_status_t spm_core_test_sfn ( struct psa_invec in_vec,
size_t  in_len,
struct psa_outvec out_vec,
size_t  out_len 
)

Entry point for multiple test cases to be executed on the secure side.

Parameters
[in]in_vecArray of psa_invec objects
[in]in_lenNumber psa_invec objects in in_vec
[in]out_vecArray of psa_outvec objects
[in]out_lenNumber psa_outvec objects in out_vec

The function expects at least 1 in_vec object:

in_vec[0].base: A buffer containing a pointer to an uint32_t value containing the testcase id to be executed. in_vec[0].len: The size of a pointer in bytes.

The number of expected additional in_vecs and out_vecs is dependent on the id of the test case. For details see the function implementation.

Returns
Can return various error codes.

Definition at line 382 of file tfm_ss_core_test.c.

psa_status_t spm_core_test_sfn_direct_recursion ( struct psa_invec in_vec,
size_t  in_len,
struct psa_outvec out_vec,
size_t  out_len 
)

Tests what happens when a service calls itself directly.

Parameters
[in]in_vecArray of psa_invec objects
[in]in_lenNumber psa_invec objects in in_vec
[in]out_vecArray of psa_outvec objects
[in]out_lenNumber psa_outvec objects in out_vec

The function expects 1 in_vec object: in_vec[0].base: A buffer containing a pointer to an uint32_t value containing the current depth of the call (the value of the depth is 0 when first called). in_vec[0].len: The size of a pointer in bytes.

The function expects 0 out_vec objects.

Returns
Returns CORE_TEST_ERRNO_SUCCESS.

Definition at line 84 of file tfm_ss_core_test.c.

psa_status_t spm_core_test_sfn_init_success ( struct psa_invec in_vec,
size_t  in_len,
struct psa_outvec out_vec,
size_t  out_len 
)

Tests whether the initialisation of the service was successful.

Parameters
[in]in_vecArray of psa_invec objects
[in]in_lenNumber psa_invec objects in in_vec
[in]out_vecArray of psa_outvec objects
[in]out_lenNumber psa_outvec objects in out_vec
[in]in_vecArray of psa_invec objects
[in]in_lenNumber psa_invec objects in in_vec
[in]out_vecArray of psa_outvec objects
[in]out_lenNumber psa_outvec objects in out_vec

The function expects 0 in_vec objects. The function expects 0 out_vec objects.

Returns
Returns CORE_TEST_ERRNO_SUCCESS on success, and CORE_TEST_ERRNO_SP_NOT_INITED on failure.

Definition at line 68 of file tfm_ss_core_test.c.