1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /***********************************************************************
3  * Copyright 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG
4  * Copyright (c) 2017-2018, Intel Corporation
5  *
6  * All rights reserved.
7  ***********************************************************************/
8 #include "tss2_esys.h"
9 
10 #define TSSWG_INTEROP 1
11 #define TSS_SAPI_FIRST_FAMILY 2
12 #define TSS_SAPI_FIRST_LEVEL 1
13 #define TSS_SAPI_FIRST_VERSION 108
14 #define EXIT_SKIP 77
15 #define EXIT_XFAIL 99
16 
17 #define goto_error_if_not_failed(rc,msg,label)                          \
18     if (rc == TSS2_RC_SUCCESS) {                                        \
19         LOG_ERROR("Error %s (%x) in Line %i: \n", msg, __LINE__, rc);   \
20         goto label; }
21 
22 /*
23  * This is the prototype for all integration tests in the tpm2-tss
24  * project. Integration tests are intended to exercise the combined
25  * components in the software stack. This typically means executing some
26  * SAPI function using the socket TCTI to communicate with a software
27  * TPM2 simulator.
28  * Return values:
29  * A successful test will return 0, any other value indicates failure.
30  */
31 
32 int test_invoke_esapi(ESYS_CONTEXT * sapi_context);
33