summaryrefslogtreecommitdiff
path: root/tests/vb2_misc_tests.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-11-28 15:40:17 +0800
committerCommit Bot <commit-bot@chromium.org>2020-02-08 03:35:37 +0000
commit737e719cd0b3c34f679efb76ba9734c336e35b8c (patch)
tree147c5efff6e12fa3e1f0cfffa1f35f43300253ee /tests/vb2_misc_tests.c
parent7b8829fea8526a2efb0e32566fde21fd92696a41 (diff)
downloadvboot-737e719cd0b3c34f679efb76ba9734c336e35b8c.tar.gz
vboot: only clear recovery requests at kernel verification
Instead of clearing recovery requests early on in firmware verification, defer this task until kernel verification has begun. If the system is rebooted for any non-vboot-related reason when entering recovery mode (e.g. FSP initialization), the recovery request will still be available in nvdata. Additionally, relocate the reboot triggered by memory training into VbSelectAndLoadKernel. BUG=b:124141368, b:35576380 TEST=make clean && make runtests BRANCH=none Change-Id: I787e45c7ed4f2bebf570bb9c1a8e9e371f2a040b Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1940398 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'tests/vb2_misc_tests.c')
-rw-r--r--tests/vb2_misc_tests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/vb2_misc_tests.c b/tests/vb2_misc_tests.c
index 22de3ae2..2a3f88dc 100644
--- a/tests/vb2_misc_tests.c
+++ b/tests/vb2_misc_tests.c
@@ -414,7 +414,7 @@ static void recovery_tests(void)
vb2_nv_set(ctx, VB2_NV_RECOVERY_REQUEST, 3);
vb2_check_recovery(ctx);
TEST_EQ(sd->recovery_reason, 3, "Recovery reason from request");
- TEST_EQ(vb2_nv_get(ctx, VB2_NV_RECOVERY_REQUEST), 0, "NV cleared");
+ TEST_EQ(vb2_nv_get(ctx, VB2_NV_RECOVERY_REQUEST), 3, "NV not cleared");
TEST_EQ(sd->flags & VB2_SD_FLAG_MANUAL_RECOVERY,
0, "Not manual recovery");
TEST_NEQ(ctx->flags & VB2_CONTEXT_RECOVERY_MODE,
@@ -427,7 +427,7 @@ static void recovery_tests(void)
vb2_check_recovery(ctx);
TEST_EQ(sd->recovery_reason, 5, "Recovery reason already failed");
TEST_EQ(vb2_nv_get(ctx, VB2_NV_RECOVERY_REQUEST),
- 0, "NV still cleared");
+ 4, "NV not cleared");
/* Override */
reset_common_data();