2019-06-20 12:54:43 +02:00
|
|
|
/*
|
|
|
|
* Helper functions for tests that use any PSA API.
|
|
|
|
*/
|
2020-06-15 11:59:37 +02:00
|
|
|
/*
|
2020-08-07 13:07:28 +02:00
|
|
|
* Copyright The Mbed TLS Contributors
|
2023-11-02 20:47:20 +01:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
2019-06-20 12:54:43 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PSA_HELPERS_H
|
|
|
|
#define PSA_HELPERS_H
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_PSA_CRYPTO_SPM)
|
|
|
|
#include "spm/psa_defs.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** Evaluate an expression and fail the test case if it returns an error.
|
|
|
|
*
|
|
|
|
* \param expr The expression to evaluate. This is typically a call
|
|
|
|
* to a \c psa_xxx function that returns a value of type
|
|
|
|
* #psa_status_t.
|
|
|
|
*/
|
2023-01-11 14:50:10 +01:00
|
|
|
#define PSA_ASSERT(expr) TEST_EQUAL((expr), PSA_SUCCESS)
|
2019-06-20 12:54:43 +02:00
|
|
|
|
|
|
|
#endif /* PSA_HELPERS_H */
|