summaryrefslogtreecommitdiff
path: root/tests/test_common.c
diff options
context:
space:
mode:
authorGaurav Shah <gauravsh@chromium.org>2010-05-26 13:19:00 -0700
committerGaurav Shah <gauravsh@chromium.org>2010-05-26 13:19:00 -0700
commitbcd8f4a07c664d55b67d4e8dc35e362b50b376bd (patch)
tree2d6fdb4c147fd8e0a306e0098d8fad9fdbeb6e4b /tests/test_common.c
parent5fe021b4114e60ac1536f3d9c103c26875868794 (diff)
downloadvboot-bcd8f4a07c664d55b67d4e8dc35e362b50b376bd.tar.gz
Make kernel signature a part of the kernel preamble.
With this change, the kernel signature is a part of the preamble block (and therefore, used during preamble signature verification). BUG=670 TEST=image verification tests still pass. corrected splicing test expectations (and it passes). Review URL: http://codereview.chromium.org/2292001
Diffstat (limited to 'tests/test_common.c')
-rw-r--r--tests/test_common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_common.c b/tests/test_common.c
index 53c6fdf1..5c39413f 100644
--- a/tests/test_common.c
+++ b/tests/test_common.c
@@ -33,6 +33,18 @@ int TEST_EQ(int result, int expected_result, char* testname) {
}
}
+int TEST_NEQ(int result, int not_expected_result, char* testname) {
+ if (result != not_expected_result) {
+ fprintf(stderr, "%s Test " COL_GREEN "PASSED\n" COL_STOP, testname);
+ return 1;
+ }
+ else {
+ fprintf(stderr, "%s Test " COL_RED "FAILED\n" COL_STOP, testname);
+ gTestSuccess = 0;
+ return 0;
+ }
+}
+
FirmwareImage* GenerateTestFirmwareImage(int algorithm,
const uint8_t* firmware_sign_key,
int firmware_key_version,