summaryrefslogtreecommitdiff
path: root/tests/vboot_api_devmode_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vboot_api_devmode_tests.c')
-rw-r--r--tests/vboot_api_devmode_tests.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/vboot_api_devmode_tests.c b/tests/vboot_api_devmode_tests.c
index a65fc269..5b495163 100644
--- a/tests/vboot_api_devmode_tests.c
+++ b/tests/vboot_api_devmode_tests.c
@@ -12,6 +12,7 @@
#include "2sysincludes.h"
#include "2api.h"
+#include "2misc.h"
#include "2nvstorage.h"
#include "crc32.h"
#include "gbb_header.h"
@@ -134,6 +135,7 @@ test_case_t test[] = {
/* Mock data */
static VbCommonParams cparams;
+static uint8_t workbuf[VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE];
static struct vb2_context ctx;
static uint8_t shared_data[VB_SHARED_DATA_MIN_SIZE];
static VbSharedDataHeader* shared = (VbSharedDataHeader*)shared_data;
@@ -160,6 +162,9 @@ static void ResetMocks(void) {
cparams.gbb = &gbb;
memset(&ctx, 0, sizeof(ctx));
+ ctx.workbuf = workbuf;
+ ctx.workbuf_size = sizeof(workbuf);
+ vb2_init_context(&ctx);
vb2_nv_init(&ctx);
memset(&shared_data, 0, sizeof(shared_data));