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

Unified Diff: src/platform/vboot_reference/tests/rsa_verify_benchmark.c

Issue 1607006: VBoot Reference: Output debug information using debug() instead of fprintf(). (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 side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/tests/rsa_verify_benchmark.c
diff --git a/src/platform/vboot_reference/tests/rsa_verify_benchmark.c b/src/platform/vboot_reference/tests/rsa_verify_benchmark.c
index ccd6eafa34a8a8735b33146e5862029fff8adbfd..2b003ffa6b9ee7708b45f1972e94fd5f000c4bc3 100644
--- a/src/platform/vboot_reference/tests/rsa_verify_benchmark.c
+++ b/src/platform/vboot_reference/tests/rsa_verify_benchmark.c
@@ -36,7 +36,7 @@ int SpeedTestAlgorithm(int algorithm) {
snprintf(file_name, FILE_NAME_SIZE, "testkeys/key_rsa%d.keyb", key_size);
key = RSAPublicKeyFromFile(file_name);
if (!key) {
- fprintf(stderr, "Couldn't read RSA Public key from file: %s\n", file_name);
+ debug("Couldn't read RSA Public key from file: %s\n", file_name);
error_code = 1;
goto failure;
}
@@ -46,7 +46,7 @@ int SpeedTestAlgorithm(int algorithm) {
sha_strings[algorithm]);
digest = BufferFromFile(file_name, &digest_len);
if (!digest) {
- fprintf(stderr, "Couldn't read digest file.\n");
+ debug("Couldn't read digest file.\n");
error_code = 1;
goto failure;
}
@@ -56,7 +56,7 @@ int SpeedTestAlgorithm(int algorithm) {
key_size, sha_strings[algorithm]);
signature = BufferFromFile(file_name, &sig_len);
if (!signature) {
- fprintf(stderr, "Couldn't read signature file.\n");
+ debug("Couldn't read signature file.\n");
error_code = 1;
goto failure;
}
@@ -64,7 +64,7 @@ int SpeedTestAlgorithm(int algorithm) {
StartTimer(&ct);
for (i = 0; i < NUM_OPERATIONS; i++) {
if (!RSAVerify(key, signature, sig_len, algorithm, digest))
- fprintf(stderr, "Warning: Signature Check Failed.\n");
+ debug("Warning: Signature Check Failed.\n");
}
StopTimer(&ct);
« no previous file with comments | « src/platform/vboot_reference/tests/rollback_index_mock.c ('k') | src/platform/vboot_reference/tests/test_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698