summaryrefslogtreecommitdiff
path: root/tests/vboot_api_init_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vboot_api_init_tests.c')
-rw-r--r--tests/vboot_api_init_tests.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/vboot_api_init_tests.c b/tests/vboot_api_init_tests.c
index a74c541d..bfa5d7df 100644
--- a/tests/vboot_api_init_tests.c
+++ b/tests/vboot_api_init_tests.c
@@ -556,6 +556,7 @@ static void VbInitTestBackup(void)
VbNvSet(&vnc, VBNV_DEV_BOOT_LEGACY, 1);
VbNvSet(&vnc, VBNV_DEV_BOOT_SIGNED_ONLY, 1);
VbNvSet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, 1);
+ VbNvSet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, 1);
/* and some that don't */
VbNvSet(&vnc, VBNV_OPROM_NEEDED, 1);
VbNvSet(&vnc, VBNV_TRY_B_COUNT, 3);
@@ -585,6 +586,8 @@ static void VbInitTestBackup(void)
TEST_EQ(u, 0, " NV dev_boot_signed_only");
VbNvGet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
TEST_EQ(u, 0, " NV dev_boot_fastboot_full_cap");
+ VbNvGet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
+ TEST_EQ(u, 0, " NV_fastboot_unlock_in_fw ");
/* So we should have written the backup */
TEST_EQ(backup_write_called, 1, " Backup written once");
/* And the backup should reflect the persisent flags. */
@@ -602,6 +605,8 @@ static void VbInitTestBackup(void)
TEST_EQ(u, 0, " BU dev_boot_signed_only");
VbNvGet(&tmp_vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
TEST_EQ(u, 0, " BU dev_boot_fastboot_full_cap");
+ VbNvGet(&tmp_vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
+ TEST_EQ(u, 0, " BU fastboot_unlock_in_fw");
/* but not the others */
VbNvGet(&tmp_vnc, VBNV_OPROM_NEEDED, &u);
TEST_EQ(u, 0, " BU oprom_needed");
@@ -642,6 +647,7 @@ static void VbInitTestBackup(void)
VbNvSet(&vnc, VBNV_DEV_BOOT_LEGACY, 1);
VbNvSet(&vnc, VBNV_DEV_BOOT_SIGNED_ONLY, 1);
VbNvSet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, 1);
+ VbNvSet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, 1);
/* and some that don't */
VbNvSet(&vnc, VBNV_OPROM_NEEDED, 1);
VbNvSet(&vnc, VBNV_TRY_B_COUNT, 4);
@@ -691,6 +697,8 @@ static void VbInitTestBackup(void)
TEST_EQ(u, 1, " BU dev_boot_signed_only");
VbNvGet(&tmp_vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
TEST_EQ(u, 1, " BU dev_boot_fastboot_full_cap");
+ VbNvGet(&tmp_vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
+ TEST_EQ(u, 1, " BU fastboot_unlock_in_fw");
/* but not the others */
VbNvGet(&tmp_vnc, VBNV_OPROM_NEEDED, &u);
TEST_EQ(u, 0, " BU oprom_needed");
@@ -730,6 +738,8 @@ static void VbInitTestBackup(void)
TEST_EQ(u, 1, " BU dev_boot_signed_only");
VbNvGet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
TEST_EQ(u, 1, " BU dev_boot_fastboot_full_cap");
+ VbNvGet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
+ TEST_EQ(u, 1, " BU fastboot_unlock_in_fw");
/*
* But if we lose the NV storage and go back to normal mode at the same
@@ -766,6 +776,8 @@ static void VbInitTestBackup(void)
TEST_EQ(u, 0, " BU dev_boot_signed_only");
VbNvGet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
TEST_EQ(u, 0, " BU dev_boot_fastboot_full_cap");
+ VbNvGet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
+ TEST_EQ(u, 0, " BU fastboot_unlock_in_fw");
}