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

Unified Diff: tests/tpm_lite/tlcl_tests.c

Issue 3389004: Rehaul of firmware TPM tests (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: remove leaked change 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 | « tests/tpm_lite/timing.c ('k') | tests/tpm_lite/writelimit.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/tpm_lite/tlcl_tests.c
diff --git a/tests/tpm_lite/tlcl_tests.c b/tests/tpm_lite/tlcl_tests.c
new file mode 100644
index 0000000000000000000000000000000000000000..59180e4042d8807fbc5b9dbcbf0974a766acf100
--- /dev/null
+++ b/tests/tpm_lite/tlcl_tests.c
@@ -0,0 +1,27 @@
+/* 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.
+ */
+
+/* Shared code for tests.
+ */
+
+#include "tlcl.h"
+#include "tlcl_tests.h"
+
+const char* resilient_startup = NULL;
+
+uint32_t TlclStartupIfNeeded(void) {
+ static char* null_getenv = "some string"; /* just a unique address */
+ uint32_t result = TlclStartup();
+ if (resilient_startup == NULL) {
+ resilient_startup = getenv("TLCL_RESILIENT_STARTUP");
+ if (resilient_startup == NULL) {
+ resilient_startup = null_getenv;
+ }
+ }
+ if (resilient_startup == null_getenv) {
+ return result;
+ }
+ return result == TPM_E_INVALID_POSTINIT ? TPM_SUCCESS : result;
+}
« no previous file with comments | « tests/tpm_lite/timing.c ('k') | tests/tpm_lite/writelimit.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698