MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches

Expectation handling support functionality. More...

Macros

#define MCUX_CSSL_FP_EXPECTATIONS(...)
 Expectation aggregation.
 
#define MCUX_CSSL_FP_VOID_EXPECTATION_IMPL()
 Implementation of expectation of nothing.
 
#define MCUX_CSSL_FP_EXPECT_IMPL(...)
 Declaration(s) of expected code flow behavior.
 
#define MCUX_CSSL_FP_ASSERT_CALLBACK()
 Fallback assert callback implementation.
 
#define MCUX_CSSL_FP_ASSERT_IMPL(...)
 Assert an expected state of the code flow.
 

Detailed Description

Expectation handling support functionality.

Macro Definition Documentation

◆ MCUX_CSSL_FP_EXPECTATIONS

#define MCUX_CSSL_FP_EXPECTATIONS (   ...)

Expectation aggregation.

Parameters
expectOne or more (comma separated) declarations of expected code flow behavior.
Returns
Aggregated counter value for the given expectations.

◆ MCUX_CSSL_FP_VOID_EXPECTATION_IMPL

#define MCUX_CSSL_FP_VOID_EXPECTATION_IMPL ( )

Implementation of expectation of nothing.

This expectation macro indicates to the flow protection mechanism that nothing is expected to happen. This is mainly intended for internal use (to ensure at least one expectation is passed).

◆ MCUX_CSSL_FP_EXPECT_IMPL

#define MCUX_CSSL_FP_EXPECT_IMPL (   ...)

Declaration(s) of expected code flow behavior.

This macro can be used to indicate expectations in the function body at another location than the function entry or exit.

See also
MCUX_CSSL_FP_EXPECTATIONS
Parameters
expectOne or more (comma separated) declarations of expected code flow behavior.

◆ MCUX_CSSL_FP_ASSERT_CALLBACK

#define MCUX_CSSL_FP_ASSERT_CALLBACK ( )

Fallback assert callback implementation.

This macro will be executed if an MCUX_CSSL_FP_ASSERT fails. In general this behavior should be defined by the user. This implementation is only in place to ensure that an implementation is always available.

This is implemented a division by 0, which should trigger a compiler warning when used, to inform the user that the default implementation is used. Additionally, when still used at run-time it should trigger some system exception.

See also
MCUX_CSSL_FP_ASSERT

◆ MCUX_CSSL_FP_ASSERT_IMPL

#define MCUX_CSSL_FP_ASSERT_IMPL (   ...)

Assert an expected state of the code flow.

This macro can be used to check whether the code flow up to this point matches the expected state. Unlike the MCUX_CSSL_FP_EXPECT macro, it will not update the expectations, but merely perform a check on the recorded events against the already recorded expectations plus the ones provided as parameters.

If the check fails, the code defined in MCUX_CSSL_FP_ASSERT_CALLBACK will be executed.

See also
MCUX_CSSL_FP_EXPECTATIONS
Parameters
expectOne or more (comma separated) declarations of expected code flow behavior.