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

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

Issue 1587005: Use UINT64_C macros from stdint.h. (Closed)
Patch Set: Created 10 years, 8 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 | « no previous file | src/platform/vboot_reference/tests/big_kernel_tests.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 if firmware image library deals with very large firmware. This 5 * Tests if firmware image library deals with very large firmware. This
6 * is a quick and dirty test for detecting integer overflow issues. 6 * is a quick and dirty test for detecting integer overflow issues.
7 */ 7 */
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 11
12 #include "file_keys.h" 12 #include "file_keys.h"
13 #include "firmware_image.h" 13 #include "firmware_image.h"
14 #include "rsa_utility.h" 14 #include "rsa_utility.h"
15 #include "test_common.h" 15 #include "test_common.h"
16 #include "utility.h" 16 #include "utility.h"
17 17
18 /* Choose a firmware size greater than the range of 32-bits unsigned. */ 18 /* Choose a firmware size greater than the range of 32-bits unsigned. */
19 #define BIG_FIRMWARE_SIZE ((uint64_t) 0x100000000ULL) 19 #define BIG_FIRMWARE_SIZE UINT64_C(0x100000000)
20 20
21 #define ROOT_KEY_BASE_NAME "testkeys/key_rsa8192" 21 #define ROOT_KEY_BASE_NAME "testkeys/key_rsa8192"
22 #define FIRMWARE_KEY_BASE_NAME "testkeys/key_rsa1024" 22 #define FIRMWARE_KEY_BASE_NAME "testkeys/key_rsa1024"
23 23
24 const char* kRootKeyPublicFile = ROOT_KEY_BASE_NAME ".keyb"; 24 const char* kRootKeyPublicFile = ROOT_KEY_BASE_NAME ".keyb";
25 const char* kRootKeyFile = ROOT_KEY_BASE_NAME ".pem"; 25 const char* kRootKeyFile = ROOT_KEY_BASE_NAME ".pem";
26 const char* kFirmwareKeyPublicFile = FIRMWARE_KEY_BASE_NAME ".keyb"; 26 const char* kFirmwareKeyPublicFile = FIRMWARE_KEY_BASE_NAME ".keyb";
27 const char* kFirmwareKeyFile = FIRMWARE_KEY_BASE_NAME ".pem"; 27 const char* kFirmwareKeyFile = FIRMWARE_KEY_BASE_NAME ".pem";
28 28
29 int BigFirmwareTest(void) { 29 int BigFirmwareTest(void) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 int main(int argc, char* argv[1]) 67 int main(int argc, char* argv[1])
68 { 68 {
69 int error_code = 0; 69 int error_code = 0;
70 error_code = BigFirmwareTest(); 70 error_code = BigFirmwareTest();
71 if (!gTestSuccess) 71 if (!gTestSuccess)
72 error_code = 255; 72 error_code = 255;
73 return error_code; 73 return error_code;
74 } 74 }
OLDNEW
« no previous file with comments | « no previous file | src/platform/vboot_reference/tests/big_kernel_tests.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698