summaryrefslogtreecommitdiff
path: root/tests/vboot_api_kernel2_tests.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2017-11-27 15:37:13 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-01-11 08:12:53 +0000
commit008b1db9e576a38e409fdd3fc7f7f4b513f2bcaf (patch)
tree2f1c77d02aa1ec58a301d07b57079722f56e48bb /tests/vboot_api_kernel2_tests.c
parent3cb2e75d5401bc5b98bee604fbe1280ec49a4e20 (diff)
downloadvboot-008b1db9e576a38e409fdd3fc7f7f4b513f2bcaf.tar.gz
vboot: Use 2nvstorage instead of vboot_nvstorage
Remove the old vboot1 vboot_nvstorage library (VbNv*() functions) and use the vboot2 library (vb2_nv_*()) instead. This is needed in preparation for moving to 64-byte records; no sense in implementing that change twice... Should be (better be) no change in system behavior. BUG=chromium:789276 BRANCH=none TEST=make runtests compare output of crossystem before/after change (should be identical) Change-Id: I10f9975b0824263064b9a74a3c6daadcecc085d3 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/794732 (cherry picked from commit dff5852c2f41c240842b49549b212c36287d5e26) Reviewed-on: https://chromium-review.googlesource.com/861319 Reviewed-by: Shelley Chen <shchen@chromium.org> Commit-Queue: Shelley Chen <shchen@chromium.org> Tested-by: Shelley Chen <shchen@chromium.org>
Diffstat (limited to 'tests/vboot_api_kernel2_tests.c')
-rw-r--r--tests/vboot_api_kernel2_tests.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/vboot_api_kernel2_tests.c b/tests/vboot_api_kernel2_tests.c
index 384c978d..da0af9b5 100644
--- a/tests/vboot_api_kernel2_tests.c
+++ b/tests/vboot_api_kernel2_tests.c
@@ -22,7 +22,6 @@
#include "vboot_common.h"
#include "vboot_display.h"
#include "vboot_kernel.h"
-#include "vboot_nvstorage.h"
#include "vboot_struct.h"
/* Mock data */
@@ -307,7 +306,7 @@ static void VbBootDevTest(void)
* legacy are set */
ResetMocks();
vb2_nv_set(&ctx, VB2_NV_DEV_DEFAULT_BOOT,
- VBNV_DEV_DEFAULT_BOOT_LEGACY);
+ VB2_DEV_DEFAULT_BOOT_LEGACY);
vb2_nv_set(&ctx, VB2_NV_DEV_BOOT_LEGACY, 1);
TEST_EQ(VbBootDeveloper(&ctx, &cparams), 1002, "Timeout");
TEST_EQ(vbexlegacy_called, 1, " try legacy");
@@ -315,7 +314,7 @@ static void VbBootDevTest(void)
/* Proceed to legacy boot mode only if enabled */
ResetMocks();
vb2_nv_set(&ctx, VB2_NV_DEV_DEFAULT_BOOT,
- VBNV_DEV_DEFAULT_BOOT_LEGACY);
+ VB2_DEV_DEFAULT_BOOT_LEGACY);
TEST_EQ(VbBootDeveloper(&ctx, &cparams), 1002, "Timeout");
TEST_EQ(vbexlegacy_called, 0, " not legacy");
@@ -323,7 +322,7 @@ static void VbBootDevTest(void)
* usb are set */
ResetMocks();
vb2_nv_set(&ctx, VB2_NV_DEV_DEFAULT_BOOT,
- VBNV_DEV_DEFAULT_BOOT_USB);
+ VB2_DEV_DEFAULT_BOOT_USB);
vb2_nv_set(&ctx, VB2_NV_DEV_BOOT_USB, 1);
vbtlk_retval = VBERROR_SUCCESS - VB_DISK_FLAG_REMOVABLE;
TEST_EQ(VbBootDeveloper(&ctx, &cparams), 0, "Ctrl+U USB");
@@ -331,14 +330,14 @@ static void VbBootDevTest(void)
/* Proceed to usb boot mode only if enabled */
ResetMocks();
vb2_nv_set(&ctx, VB2_NV_DEV_DEFAULT_BOOT,
- VBNV_DEV_DEFAULT_BOOT_USB);
+ VB2_DEV_DEFAULT_BOOT_USB);
TEST_EQ(VbBootDeveloper(&ctx, &cparams), 1002, "Timeout");
/* If no USB tries fixed disk */
ResetMocks();
vb2_nv_set(&ctx, VB2_NV_DEV_BOOT_USB, 1);
vb2_nv_set(&ctx, VB2_NV_DEV_DEFAULT_BOOT,
- VBNV_DEV_DEFAULT_BOOT_USB);
+ VB2_DEV_DEFAULT_BOOT_USB);
TEST_EQ(VbBootDeveloper(&ctx, &cparams), 1002, "Ctrl+U enabled");
TEST_EQ(vbexlegacy_called, 0, " not legacy");
@@ -369,7 +368,7 @@ static void VbBootDevTest(void)
VBERROR_LOAD_KERNEL_RECOVERY,
"Space = recovery");
TEST_EQ(vb2_nv_get(&ctx, VB2_NV_RECOVERY_REQUEST),
- VBNV_RECOVERY_RW_DEV_SCREEN, " recovery reason");
+ VB2_RECOVERY_RW_DEV_SCREEN, " recovery reason");
/* Space asks to disable virtual dev switch */
ResetMocks();