6f3fd6358f
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>
16 lines
379 B
C
16 lines
379 B
C
/* 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);
|
|
}
|