mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
Add missing header file.
Change-Id: I2b0fdab305fc3b7286679ac133daed62523fb241 BUG=none TEST=none Review URL: http://codereview.chromium.org/3423009
This commit is contained in:
34
tests/tpm_lite/tlcl_tests.h
Normal file
34
tests/tpm_lite/tlcl_tests.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
/* Common definitions for test programs.
|
||||
*/
|
||||
|
||||
#ifndef TLCL_TESTS_H
|
||||
#define TLCL_TESTS_H
|
||||
|
||||
/* Standard testing indexes. */
|
||||
#define INDEX0 0xcafe
|
||||
#define INDEX1 0xcaff
|
||||
|
||||
#define DO_ON_FAILURE(tpm_command, action) do { \
|
||||
uint32_t result; \
|
||||
if ((result = (tpm_command)) != TPM_SUCCESS) { \
|
||||
action; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Prints error and returns on failure */
|
||||
#define TPM_CHECK(tpm_command) \
|
||||
DO_ON_FAILURE(tpm_command, \
|
||||
printf("TEST FAILED: line %d: " #tpm_command ": 0x%x\n", \
|
||||
__LINE__, result); return result)
|
||||
|
||||
/* Executes TlclStartup(), but ignores POSTINIT error if the
|
||||
* TLCL_RESILIENT_STARTUP environment variable is set.
|
||||
*/
|
||||
uint32_t TlclStartupIfNeeded(void);
|
||||
|
||||
#endif // TLCL_TESTS_H
|
||||
Reference in New Issue
Block a user