30#define ARCHIVE_TEST( name, TYPE, ARCHIVE_NAME, EXTRACT_NAME, \
31 EXPECTED_NAME, ARCHIVE, EXPECTED ) \
32 static const uint8_t name ## _archive FILE_ARRAY ( ARCHIVE ); \
33 static const uint8_t name ## _expected FILE_ARRAY ( EXPECTED ); \
34 static struct archive_test name = { \
36 .archive_name = ARCHIVE_NAME, \
37 .archive = name ## _archive, \
38 .archive_len = sizeof ( name ## _archive ), \
39 .extract_name = EXTRACT_NAME, \
40 .expected_name = EXPECTED_NAME, \
41 .expected = name ## _expected, \
42 .expected_len = sizeof ( name ## _expected ), \
50#define archive_ok( test ) archive_okx ( test, __FILE__, __LINE__ )
void archive_okx(struct archive_test *test, const char *file, unsigned int line)
Report an archive extraction test result.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
An archive extraction test.
const void * expected
Expected extracted image data.
const char * extract_name
Explicit name for extraction (or NULL).
const void * archive
Archive image data.
const char * expected_name
Expected extracted image name.
const char * archive_name
Archive image filename.
size_t expected_len
Length of expected extracted image data.
size_t archive_len
Length of archive image data.
const struct image_type * type
Archive image type.
An executable image type.
Self-test infrastructure.