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_fapi.h" 9 10 #define EXIT_SKIP 77 11 #define EXIT_ERROR 99 12 13 #define goto_error_if_not_failed(rc,msg,label) \ 14 if (rc == TSS2_RC_SUCCESS) { \ 15 LOG_ERROR("Error %s (%x) in Line %i: \n", msg, __LINE__, rc); \ 16 goto label; } 17 18 /* This variable is set to the same value in order to allow usage in if-statements etc. */ 19 extern char *fapi_profile; 20 21 #define FAPI_POLICIES TOP_SOURCEDIR "/test/data/fapi" 22 23 TSS2_RC 24 pcr_reset(FAPI_CONTEXT *context, UINT32 pcr); 25 /* 26 * This is the prototype for all integration tests in the tpm2-tss 27 * project. Integration tests are intended to exercise the combined 28 * components in the software stack. This typically means executing some 29 * SAPI function using the socket TCTI to communicate with a software 30 * TPM2 simulator. 31 * Return values: 32 * A successful test will return 0, any other value indicates failure. 33 */ 34 35 int test_invoke_fapi(FAPI_CONTEXT * fapi_context); 36