diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-06-11 16:53:07 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-06-12 09:22:32 -0700 |
commit | f2a1dc0a54ec542dd4be7b634483de317c89a2a2 (patch) | |
tree | ef2d7fcc9afd482f30db7be0f976cdb77030945e /tests/vboot_api_kernel2_tests.c | |
parent | 19c996909d8cae46ee3ee6d4319abd9f72ab53e1 (diff) | |
download | vboot-f2a1dc0a54ec542dd4be7b634483de317c89a2a2.tar.gz |
Add GBB flags for disabling software sync and defaulting to legacy bootfactory-spring-4262.Bfactory-skate-4262.459.B
1) GBB flag to skip EC software sync, so EC will be untouched. Needed
for EC development.
2) GBB flag to default to booting legacy at end of dev screen timeout.
Very handy for booting Ubuntu (or other OS).
Also added unit tests for the new flags.
BUG=chrome-os-partner:20111
BRANCH=none
TEST=make runtests
Change-Id: I9da87d87014881a1b1393b0b4a5acb921d080066
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58270
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'tests/vboot_api_kernel2_tests.c')
-rw-r--r-- | tests/vboot_api_kernel2_tests.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/vboot_api_kernel2_tests.c b/tests/vboot_api_kernel2_tests.c index aa3e20dc..c1572c2f 100644 --- a/tests/vboot_api_kernel2_tests.c +++ b/tests/vboot_api_kernel2_tests.c @@ -220,6 +220,12 @@ static void VbBootDevTest(void) TEST_EQ(u, 0, " recovery reason"); TEST_EQ(audio_looping_calls_left, 0, " used up audio"); + /* Proceed to legacy after timeout if GBB flag set */ + ResetMocks(); + gbb.flags |= GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY; + TEST_EQ(VbBootDeveloper(&cparams, &lkp), 1002, "Timeout"); + TEST_EQ(vbexlegacy_called, 1, " try legacy"); + /* Up arrow is uninteresting / passed to VbCheckDisplayKey() */ ResetMocks(); mock_keypress[0] = VB_KEY_UP; @@ -313,6 +319,14 @@ static void VbBootDevTest(void) VbNvGet(VbApiKernelGetVnc(), VBNV_RECOVERY_REQUEST, &u); TEST_EQ(u, 0, " recovery reason"); TEST_NEQ(audio_looping_calls_left, 0, " aborts audio"); + TEST_EQ(vbexlegacy_called, 0, " not legacy"); + + /* Ctrl+D doesn't boot legacy even if GBB flag is set */ + ResetMocks(); + mock_keypress[0] = 0x04; + gbb.flags |= GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY; + TEST_EQ(VbBootDeveloper(&cparams, &lkp), 1002, "Ctrl+D"); + TEST_EQ(vbexlegacy_called, 0, " not legacy"); /* Ctrl+L tries legacy boot mode only if enabled */ ResetMocks(); |