summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2021-02-12 11:13:33 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-30 07:18:26 +0000
commit21655916f255ed92ad27110f0a65d392f18f6280 (patch)
tree83ba6a9cf18687378a1777f1fa65fc7c6dc09471 /tests
parent230d9688b9498518774096109a5c31639f5f6cc0 (diff)
downloadvboot-21655916f255ed92ad27110f0a65d392f18f6280.tar.gz
vboot/vboot_kernel: return value from failed functions
Instead of just checking for failure/success on functions returning vb2_error_t and mapping to a completely different return value, pass that value directly back to the caller. Also, create VB2_ERROR_KEYBLOCK_HASH_INVALID_IN_DEV_MODE to replace uses of VB2_ERROR_KEYBLOCK_SIG_INVALID when keyblock hash is invalid (dev mode, using self-signed kernels). This CL is part of a series to merge vboot1 and vboot2.0 kernel verification code; see b/181739551. BUG=b:181739551 TEST=make clean && make runtests BRANCH=none Signed-off-by: Joel Kitching <kitching@google.com> Change-Id: Iefc00ccee6b6d29fb94e4acd652c033321f2d8af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2772138 Reviewed-by: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/vb20_kernel_tests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/vb20_kernel_tests.c b/tests/vb20_kernel_tests.c
index 3f26549f..e71e5ce7 100644
--- a/tests/vb20_kernel_tests.c
+++ b/tests/vb20_kernel_tests.c
@@ -228,7 +228,7 @@ static void verify_keyblock_hash_tests(void)
reset_common_data(FOR_KEYBLOCK);
mock_vblock.k.data_key_data[0] ^= 0xa0;
TEST_EQ(vb2_verify_keyblock_hash(kb, kb->keyblock_size, &wb),
- VB2_ERROR_KEYBLOCK_SIG_INVALID,
+ VB2_ERROR_KEYBLOCK_HASH_INVALID_IN_DEV_MODE,
"Keyblock check hash invalid");
}