OLD | NEW |
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /* Only perform a TPM_Startup command. | 6 /* Only perform a TPM_Startup command. |
7 */ | 7 */ |
8 | 8 |
9 #include <stdio.h> | 9 #include <stdio.h> |
10 | 10 |
11 #include "tlcl.h" | 11 #include "tlcl.h" |
12 | 12 |
13 int main(int argc, char** argv) { | 13 int main(int argc, char** argv) { |
14 uint32_t result; | 14 uint32_t result; |
15 TlclLibInit(); | 15 TlclLibInit(); |
16 result = TlclStartup(); | 16 result = TlclStartup(); |
17 if (result != 0) { | 17 if (result != 0) { |
18 printf("tpm startup failed with 0x%x\n", result); | 18 printf("tpm startup failed with 0x%x\n", result); |
19 } | 19 } |
20 result = TlclGetFlags(NULL, NULL, NULL); | 20 result = TlclGetFlags(NULL, NULL, NULL); |
21 if (result != 0) { | 21 if (result != 0) { |
22 printf("tpm getflags failed with 0x%x\n", result); | 22 printf("tpm getflags failed with 0x%x\n", result); |
23 } | 23 } |
24 printf("executing SelfTestFull\n"); | 24 printf("executing SelfTestFull\n"); |
25 TlclSelfTestFull(); | 25 TlclSelfTestFull(); |
26 result = TlclGetFlags(NULL, NULL, NULL); | 26 result = TlclGetFlags(NULL, NULL, NULL); |
27 if (result != 0) { | 27 if (result != 0) { |
28 printf("tpm getflags failed with 0x%x\n", result); | 28 printf("tpm getflags failed with 0x%x\n", result); |
29 } | 29 } |
| 30 printf("TEST SUCCEEDED\n"); |
30 return 0; | 31 return 0; |
31 } | 32 } |
OLD | NEW |