tests: Add lib/cbfs-verification-test test case

This commit adds test case for lib/cbfs verification mechanisms.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I1d8cbb1c2d0a9db3236de065428b70a9c2a66330
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56601
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Jakub Czapiga
2021-07-22 08:52:46 +02:00
committed by Julius Werner
parent 6813d561b2
commit 6f3fd6358f
5 changed files with 392 additions and 0 deletions

16
tests/stubs/die.c Normal file
View File

@@ -0,0 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <stdarg.h>
#include <stdio.h>
#include <tests/test.h>
void die(const char *msg, ...)
{
/* die() can be called in middle a function, so we should not allow for it to return */
static char msg_buf[256];
va_list v;
va_start(v, msg);
vsnprintf(msg_buf, ARRAY_SIZE(msg_buf), msg, v);
va_end(v);
fail_msg("%s", msg_buf);
}