summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHsin-Te Yuan <yuanhsinte@google.com>2022-06-23 18:37:45 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-28 12:59:30 +0000
commit57eb6ea8e8ebf6ecb859815ef15b962a38803bd2 (patch)
treec243a33c6955e83081a3b858e6cdd92d37a1e149 /tests
parent9867ce3ed708b3b89f4f547e263a87c8b34cc945 (diff)
downloadvboot-57eb6ea8e8ebf6ecb859815ef15b962a38803bd2.tar.gz
2kernel: Add vb2api_kernel_phase2 and vb2api_normal_bootfirmware-chameleon-14947.Bfirmware-14947.B
Extract the middle part of VbSelectAndLoadKernel as vb2api_kernel_phase2 and call it from VbSelectAndLoadKernel. Also, remove vb2_nv_init in VbSelectAndLoadKernel. Furthermore, publicize vb2_normal_boot as vb2api_normal_boot in preparation for moving the content of VbSelectAndLoadKernel to depthcharge. Besides, when NO_BOOT is set, manual recovery should be disallowed (unless VB2_GBB_FLAG_FORCE_MANUAL_RECOVERY is set). Therefore, print the NO_BOOT debug log only for the broken screen case. BUG=b:172339016 BRANCH=none TEST=make runtests Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com> Change-Id: I4dc5ee4fb80ecc8c24a992a489c3bf6fe267046d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3720975 Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/vb2_kernel_tests.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/vb2_kernel_tests.c b/tests/vb2_kernel_tests.c
index 0b3e94c7..c467fa9d 100644
--- a/tests/vb2_kernel_tests.c
+++ b/tests/vb2_kernel_tests.c
@@ -7,7 +7,6 @@
#include "2api.h"
#include "2common.h"
-#include "2kernel.h"
#include "2misc.h"
#include "2nvstorage.h"
#include "2rsa.h"
@@ -309,26 +308,26 @@ static void normal_boot_tests(void)
{
reset_common_data(FOR_NORMAL_BOOT);
mock_vbtlk_expect_fixed = 1;
- TEST_EQ(vb2_normal_boot(ctx), VB2_SUCCESS,
- "vb2_normal_boot() returns VB2_SUCCESS");
+ TEST_EQ(vb2api_normal_boot(ctx), VB2_SUCCESS,
+ "vb2api_normal_boot() returns VB2_SUCCESS");
reset_common_data(FOR_NORMAL_BOOT);
mock_vbtlk_expect_fixed = 1;
mock_vbtlk_retval = VB2_ERROR_MOCK;
- TEST_EQ(vb2_normal_boot(ctx), VB2_ERROR_MOCK,
- "vb2_normal_boot() returns VB2_ERROR_MOCK");
+ TEST_EQ(vb2api_normal_boot(ctx), VB2_ERROR_MOCK,
+ "vb2api_normal_boot() returns VB2_ERROR_MOCK");
reset_common_data(FOR_NORMAL_BOOT);
vb2_nv_set(ctx, VB2_NV_DISPLAY_REQUEST, 1);
- TEST_EQ(vb2_normal_boot(ctx), VB2_REQUEST_REBOOT,
- "vb2_normal_boot() reboot to reset NVRAM display request");
+ TEST_EQ(vb2api_normal_boot(ctx), VB2_REQUEST_REBOOT,
+ "vb2api_normal_boot() reboot to reset NVRAM display request");
TEST_EQ(vb2_nv_get(ctx, VB2_NV_DISPLAY_REQUEST), 0,
" display request reset");
reset_common_data(FOR_NORMAL_BOOT);
vb2_nv_set(ctx, VB2_NV_DIAG_REQUEST, 1);
- TEST_EQ(vb2_normal_boot(ctx), VB2_REQUEST_REBOOT,
- "vb2_normal_boot() reboot to reset NVRAM diag request");
+ TEST_EQ(vb2api_normal_boot(ctx), VB2_REQUEST_REBOOT,
+ "vb2api_normal_boot() reboot to reset NVRAM diag request");
TEST_EQ(vb2_nv_get(ctx, VB2_NV_DIAG_REQUEST), 0,
" diag request reset");}