diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2021-08-27 13:26:32 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-31 09:38:56 +0000 |
commit | 243b51f740583a1661f2d8209906e87a822cd832 (patch) | |
tree | 1ede8522e60ca29ef3937ceeee2f0888a4a8061d /tests | |
parent | 44826c7a47c4ee1300ae46d031ca81ffad596d09 (diff) | |
download | vboot-243b51f740583a1661f2d8209906e87a822cd832.tar.gz |
vboot/ui: Show error box on internal boot failure
CL:2917623 changes the behavior when failing to boot from internal disk
in developer UI. However, it causes the device to potentially enter a
reboot loop (b/197216832).
Instead of either triggering recovery or returning an error from the UI
loop, change the behavior to showing an error message in a dialog box
and staying in the UI. This is similar to the behavior when booting from
an invalid external disk, where an error screen will be shown to the
user.
Add VB2_UI_ERROR_INTERNAL_BOOT_FAILED to vb2_ui_error enum.
BUG=b:197216832, b:197911901
TEST=make runtests
BRANCH=none
Cq-Depend: chromium:3123160
Change-Id: Ic5ace55fc8b93ba0836e5722b7c5011fd490c35e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3124395
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vb2_ui_tests.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/vb2_ui_tests.c b/tests/vb2_ui_tests.c index 54f76037..948c6af5 100644 --- a/tests/vb2_ui_tests.c +++ b/tests/vb2_ui_tests.c @@ -635,8 +635,9 @@ static void developer_tests(void) /* If fail to load internal disk, don't boot */ reset_common_data(FOR_DEVELOPER); add_mock_vbtlk(VB2_ERROR_LK_NO_DISK_FOUND, VB_DISK_FLAG_FIXED); - TEST_EQ(vb2_developer_menu(ctx), VB2_ERROR_LK_NO_DISK_FOUND, - "if fail to load internal disk, don't boot"); + TEST_NEQ(vb2_developer_menu(ctx), VB2_SUCCESS, + "if fail to load internal disk, don't boot"); + TEST_EQ(mock_calls_until_shutdown, 0, " loop forever"); /* Select boot internal in dev menu */ reset_common_data(FOR_DEVELOPER); |