summaryrefslogtreecommitdiff
path: root/tests/vb2_ui_tests.c
diff options
context:
space:
mode:
authoredisonhello <edisonhello@google.com>2021-07-28 15:03:38 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-12 08:13:12 +0000
commitd8de9942e2fdfdf3f1792740cb5419163faff3ea (patch)
treecfeba75c29a429c58e297360a37b0bfa166915f9 /tests/vb2_ui_tests.c
parent302794156d6689d97eba7d7f6907498858d6b0ef (diff)
downloadvboot-d8de9942e2fdfdf3f1792740cb5419163faff3ea.tar.gz
vboot/misc: Add validity check in vb2api_enable_developer_mode
Check vb2api_allow_recovery before actual changes in vb2api_enable_developer_mode. Add new API error type VB2_ERROR_API_ENABLE_DEV_NOT_ALLOWED in vb2_error_t. Add spaces in the output message of vb2_misc_tests for indentation. BUG=b:172339016 TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \ make -j32 test_setup && make -j32 runtests; TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \ make -j32 test_setup && make -j32 runtests; TEST=Hayato booted into developer mode BRANCH=none Change-Id: Ifebdd01ca87cf944c394907eca73a09fc3bf5457 Signed-off-by: edisonhello <edisonhello@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3056240 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'tests/vb2_ui_tests.c')
-rw-r--r--tests/vb2_ui_tests.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/vb2_ui_tests.c b/tests/vb2_ui_tests.c
index ca9a9987..95d22900 100644
--- a/tests/vb2_ui_tests.c
+++ b/tests/vb2_ui_tests.c
@@ -527,9 +527,10 @@ int vb2ex_physical_presence_pressed(void)
return mock_pp_pressed[mock_iters];
}
-void vb2api_enable_developer_mode(struct vb2_context *c)
+vb2_error_t vb2api_enable_developer_mode(struct vb2_context *c)
{
mock_enable_dev_mode = 1;
+ return VB2_SUCCESS;
}
const char *vb2ex_get_debug_info(struct vb2_context *c)