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

Side by Side Diff: tests/vboot_nvstorage_test.c

Issue 6698032: Add VB test error func/num (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: ready for code review Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « host/lib/crossystem.c ('k') | utility/crossystem_main.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Tests for firmware NV storage library. 5 * Tests for firmware NV storage library.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 13 matching lines...) Expand all
24 24
25 /* Array of fields to test, terminated with a field with desc==NULL. */ 25 /* Array of fields to test, terminated with a field with desc==NULL. */
26 static VbNvField nvfields[] = { 26 static VbNvField nvfields[] = {
27 {VBNV_DEBUG_RESET_MODE, 0, 1, 0, "debug reset mode"}, 27 {VBNV_DEBUG_RESET_MODE, 0, 1, 0, "debug reset mode"},
28 {VBNV_TRY_B_COUNT, 0, 6, 15, "try B count"}, 28 {VBNV_TRY_B_COUNT, 0, 6, 15, "try B count"},
29 {VBNV_RECOVERY_REQUEST, 0, 0x42, 0xED, "recovery request"}, 29 {VBNV_RECOVERY_REQUEST, 0, 0x42, 0xED, "recovery request"},
30 {VBNV_LOCALIZATION_INDEX, 0, 0x69, 0xB0, "localization index"}, 30 {VBNV_LOCALIZATION_INDEX, 0, 0x69, 0xB0, "localization index"},
31 {VBNV_KERNEL_FIELD, 0, 0x12345678, 0xFEDCBA98, "kernel field"}, 31 {VBNV_KERNEL_FIELD, 0, 0x12345678, 0xFEDCBA98, "kernel field"},
32 {VBNV_TRIED_FIRMWARE_B, 0, 1, 0, "tried firmware B"}, 32 {VBNV_TRIED_FIRMWARE_B, 0, 1, 0, "tried firmware B"},
33 {VBNV_FW_VERIFIED_KERNEL_KEY, 0, 1, 0, "firmware verified kernel key"}, 33 {VBNV_FW_VERIFIED_KERNEL_KEY, 0, 1, 0, "firmware verified kernel key"},
34 {VBNV_TEST_ERROR_FUNC, 0, 1, 7, "verified boot test error func"},
35 {VBNV_TEST_ERROR_NUM, 0, 3, 6, "verified boot test error number"},
34 {0, 0, 0, 0, NULL} 36 {0, 0, 0, 0, NULL}
35 }; 37 };
36 38
37 static void VbNvStorageTest(void) { 39 static void VbNvStorageTest(void) {
38 40
39 VbNvField* vnf; 41 VbNvField* vnf;
40 VbNvContext c; 42 VbNvContext c;
41 uint8_t goodcrc; 43 uint8_t goodcrc;
42 uint32_t data; 44 uint32_t data;
43 45
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 int main(int argc, char* argv[]) { 141 int main(int argc, char* argv[]) {
140 int error_code = 0; 142 int error_code = 0;
141 143
142 VbNvStorageTest(); 144 VbNvStorageTest();
143 145
144 if (!gTestSuccess) 146 if (!gTestSuccess)
145 error_code = 255; 147 error_code = 255;
146 148
147 return error_code; 149 return error_code;
148 } 150 }
OLDNEW
« no previous file with comments | « host/lib/crossystem.c ('k') | utility/crossystem_main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698