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

Side by Side Diff: src/platform/vboot_reference/tests/kernel_image_tests.c

Issue 1138006: Fix test return values (otherwise, autotest mistakenly thinks it failed). (Closed)
Patch Set: Created 10 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
« no previous file with comments | « src/platform/vboot_reference/tests/firmware_image_tests.c ('k') | no next file » | 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 kernel image library. 5 * Tests for kernel image library.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 int main(int argc, char* argv[]) { 149 int main(int argc, char* argv[]) {
150 uint64_t len; 150 uint64_t len;
151 uint8_t* kernel_sign_key_buf = NULL; 151 uint8_t* kernel_sign_key_buf = NULL;
152 uint8_t* firmware_key_blob = NULL; 152 uint8_t* firmware_key_blob = NULL;
153 uint8_t* kernel_blob = NULL; 153 uint8_t* kernel_blob = NULL;
154 uint64_t kernel_blob_len = 0; 154 uint64_t kernel_blob_len = 0;
155 KernelImage* image = NULL; 155 KernelImage* image = NULL;
156 RSAPublicKey* firmware_key = NULL; 156 RSAPublicKey* firmware_key = NULL;
157 int error_code = 1; 157 int error_code = 0;
158 158
159 if(argc != 7) { 159 if(argc != 7) {
160 fprintf(stderr, "Usage: %s <firmware signing algorithm> " /* argv[1] */ 160 fprintf(stderr, "Usage: %s <firmware signing algorithm> " /* argv[1] */
161 "<kernel signing algorithm> " /* argv[2] */ 161 "<kernel signing algorithm> " /* argv[2] */
162 "<firmware key> " /* argv[3] */ 162 "<firmware key> " /* argv[3] */
163 "<processed firmware pubkey> " /* argv[4] */ 163 "<processed firmware pubkey> " /* argv[4] */
164 "<kernel signing key> " /* argv[5] */ 164 "<kernel signing key> " /* argv[5] */
165 "<processed kernel signing key>\n", /* argv[6] */ 165 "<processed kernel signing key>\n", /* argv[6] */
166 argv[0]); 166 argv[0]);
167 return -1; 167 return -1;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 failure: 215 failure:
216 Free(kernel_blob); 216 Free(kernel_blob);
217 KernelImageFree(image); 217 KernelImageFree(image);
218 Free(kernel_sign_key_buf); 218 Free(kernel_sign_key_buf);
219 Free(firmware_key_blob); 219 Free(firmware_key_blob);
220 RSAPublicKeyFree(firmware_key); 220 RSAPublicKeyFree(firmware_key);
221 221
222 return error_code; 222 return error_code;
223 } 223 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/firmware_image_tests.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698