diff options
Diffstat (limited to 'tests/vboot_api_kernel5_tests.c')
-rw-r--r-- | tests/vboot_api_kernel5_tests.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/vboot_api_kernel5_tests.c b/tests/vboot_api_kernel5_tests.c index 65899aec..8d3281be 100644 --- a/tests/vboot_api_kernel5_tests.c +++ b/tests/vboot_api_kernel5_tests.c @@ -27,6 +27,7 @@ #include "vboot_struct.h" /* Mock data */ +static uint8_t workbuf[VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE]; static struct vb2_context ctx; static struct vb2_context ctx_nvram_backend; static VbCommonParams cparams; @@ -67,9 +68,11 @@ static void ResetMocks(void) gbb->rootkey_offset = sizeof(*gbb); gbb->rootkey_size = sizeof(VbPublicKey); - /* ctx.workbuf will be allocated and initialized by - * VbVerifyMemoryBootImage. */ + /* ctx.workbuf will be initialized by VbVerifyMemoryBootImage. */ memset(&ctx, 0, sizeof(ctx)); + ctx.workbuf = workbuf; + ctx.workbuf_size = sizeof(workbuf); + vb2_init_context(&ctx); /* * ctx_nvram_backend is only used as an NVRAM backend (see |