Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1693)

Unified Diff: tests/tpm_lite/tlcl_tests.h

Issue 3423009: Add missing header file. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/tpm_lite/tlcl_tests.h
diff --git a/tests/tpm_lite/tlcl_tests.h b/tests/tpm_lite/tlcl_tests.h
new file mode 100644
index 0000000000000000000000000000000000000000..57e8fd92332898af8998d635ac8af3a82b01bca2
--- /dev/null
+++ b/tests/tpm_lite/tlcl_tests.h
@@ -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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698