summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@chromium.org>2019-05-22 11:33:40 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-06-19 07:55:53 -0700
commit80bc32daf1692cf13b670e60725e195c1a568e8e (patch)
tree65f8548231870212f5304c18998ed0b04e76e1cd /tests
parentb4b4507d6198e0f9109afd58bec54759d8cab17a (diff)
downloadvboot-80bc32daf1692cf13b670e60725e195c1a568e8e.tar.gz
lib/ec_sync_all: Reboot EC to RO after successful AUX FW update
Currently some chips that require AUX FW update request EC reboot to RO after the FW update is applied successfully while some chips do not. It is safe to request EC reboot to RO whenever AUX FW update is applied successfully so that all the chips that require AUX FW update gets reset to a clean state. Update tests to handle the updated code flow and return code correctly. BUG=b:128820536,b:119046668 BRANCH=None TEST=Ensure that the device boots to ChromeOS. Force a TCPC FW update and ensure that after it is successfully applied EC reboots to RO. Cq-Depend: chromium:1625866 Change-Id: I72849620d90284e49cd1a9b31fc5eadede455c51 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/1627302 Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Commit-Ready: Karthikeyan Ramasubramanian <kramasub@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ec_sync_tests.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/ec_sync_tests.c b/tests/ec_sync_tests.c
index 1698e032..44efb7de 100644
--- a/tests/ec_sync_tests.c
+++ b/tests/ec_sync_tests.c
@@ -469,12 +469,12 @@ static void VbSoftwareSyncTest(void)
ResetMocks();
ec_aux_fw_mock_severity = VB_AUX_FW_FAST_UPDATE;
- test_ssync(VBERROR_SUCCESS, 0,
+ test_ssync(VBERROR_EC_REBOOT_TO_RO_REQUIRED, 0,
"Fast auxiliary FW update needed");
TEST_EQ(screens_count, 0,
" wait screen skipped");
TEST_EQ(ec_aux_fw_update_req, 1, " aux fw update requested");
- TEST_EQ(ec_aux_fw_protected, 1, " aux fw protected");
+ TEST_EQ(ec_aux_fw_protected, 0, " aux fw protected");
ResetMocks();
ec_aux_fw_mock_severity = VB_AUX_FW_SLOW_UPDATE;
@@ -484,14 +484,15 @@ static void VbSoftwareSyncTest(void)
ResetMocks();
ec_aux_fw_mock_severity = VB_AUX_FW_SLOW_UPDATE;
- test_ssync(VBERROR_SUCCESS, 0,
+ test_ssync(VBERROR_EC_REBOOT_TO_RO_REQUIRED, 0,
"Slow auxiliary FW update needed");
TEST_EQ(ec_aux_fw_update_req, 1, " aux fw update requested");
- TEST_EQ(ec_aux_fw_protected, 1, " aux fw protected");
+ TEST_EQ(ec_aux_fw_protected, 0, " aux fw protected");
TEST_EQ(screens_displayed[0], VB_SCREEN_WAIT,
" wait screen forced");
ResetMocks();
+ ec_aux_fw_mock_severity = VB_AUX_FW_FAST_UPDATE;
ec_aux_fw_retval = VBERROR_UNKNOWN;
test_ssync(VBERROR_UNKNOWN, VB2_RECOVERY_AUX_FW_UPDATE,
"Error updating AUX firmware");