summaryrefslogtreecommitdiff
path: root/tests/vboot_api_kernel_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vboot_api_kernel_tests.c')
-rw-r--r--tests/vboot_api_kernel_tests.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/vboot_api_kernel_tests.c b/tests/vboot_api_kernel_tests.c
index 9294fd7f..16933ea6 100644
--- a/tests/vboot_api_kernel_tests.c
+++ b/tests/vboot_api_kernel_tests.c
@@ -403,6 +403,7 @@ static uint32_t got_external_mismatch;
static uint8_t workbuf[VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE]
__attribute__((aligned(VB2_WORKBUF_ALIGN)));
static struct vb2_context *ctx;
+static struct VbSelectAndLoadKernelParams kparams;
/**
* Reset mock data (for use before each test)
@@ -412,7 +413,9 @@ static void ResetMocks(int i)
TEST_SUCC(vb2api_init(workbuf, sizeof(workbuf), &ctx),
"vb2api_init failed");
- memset(VbApiKernelGetParams(), 0, sizeof(VbSelectAndLoadKernelParams));
+ memset(&kparams, 0, sizeof(VbSelectAndLoadKernelParams));
+ *VbApiKernelGetParamsPtr() = &kparams;
+
memset(&mock_disks, 0, sizeof(mock_disks));
load_kernel_calls = 0;