diff options
Diffstat (limited to 'tests/vboot_api_kernel4_tests.c')
-rw-r--r-- | tests/vboot_api_kernel4_tests.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/vboot_api_kernel4_tests.c b/tests/vboot_api_kernel4_tests.c index e239192c..07bbfcec 100644 --- a/tests/vboot_api_kernel4_tests.c +++ b/tests/vboot_api_kernel4_tests.c @@ -11,6 +11,7 @@ #include "2sysincludes.h" #include "2api.h" +#include "2misc.h" #include "2nvstorage.h" #include "ec_sync.h" #include "gbb_header.h" @@ -24,7 +25,9 @@ #include "vboot_struct.h" /* Mock data */ +static uint8_t workbuf[VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE]; static struct vb2_context ctx; +static struct vb2_shared_data *sd; static VbCommonParams cparams; static VbSelectAndLoadKernelParams kparams; static uint8_t shared_data[VB_SHARED_DATA_MIN_SIZE]; @@ -54,9 +57,15 @@ static void ResetMocks(void) gbb.flags = 0; memset(&ctx, 0, sizeof(ctx)); + ctx.workbuf = workbuf; + ctx.workbuf_size = sizeof(workbuf); + vb2_init_context(&ctx); vb2_nv_init(&ctx); vb2_nv_set(&ctx, VB2_NV_KERNEL_MAX_ROLLFORWARD, 0xffffffff); + sd = vb2_get_sd(&ctx); + sd->vbsd = shared; + memset(&shared_data, 0, sizeof(shared_data)); VbSharedDataInit(shared, sizeof(shared_data)); |