iPXE
zlib_test.c File Reference

zlib image tests More...

#include <ipxe/zlib.h>
#include <ipxe/test.h>
#include "archive_test.h"

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 ARCHIVE_TEST (hello_world, &zlib_image_type, "hello.z", NULL, "hello", BINFILE(0x78, 0x9c, 0xf3, 0x48, 0xcd, 0xc9, 0xc9, 0x57, 0x28, 0xcf, 0x2f, 0xca, 0x49, 0x01, 0x00, 0x18, 0xab, 0x04, 0x3d), TEXTFILE("Hello world"))
 "Hello world"
static void zlib_test_exec (void)
 Perform zlib self-test.

Variables

struct self_test zlib_test __self_test
 zlib self-test

Detailed Description

zlib image tests

Definition in file zlib_test.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ ARCHIVE_TEST()

ARCHIVE_TEST ( hello_world ,
& zlib_image_type,
"hello.z" ,
NULL ,
"hello" ,
BINFILE(0x78, 0x9c, 0xf3, 0x48, 0xcd, 0xc9, 0xc9, 0x57, 0x28, 0xcf, 0x2f, 0xca, 0x49, 0x01, 0x00, 0x18, 0xab, 0x04, 0x3d) ,
TEXTFILE("Hello world")  )

"Hello world"

References BINFILE, NULL, and TEXTFILE.

◆ zlib_test_exec()

void zlib_test_exec ( void )
static

Perform zlib self-test.

Definition at line 49 of file zlib_test.c.

49 {
50
51 archive_ok ( &hello_world );
52}
#define archive_ok(test)
Report an archive extraction test result.

References archive_ok.

Variable Documentation

◆ __self_test

struct self_test zlib_test __self_test
Initial value:
= {
.name = "zlib",
.exec = zlib_test_exec,
}
static void zlib_test_exec(void)
Perform zlib self-test.
Definition zlib_test.c:49

zlib self-test

Definition at line 55 of file zlib_test.c.

55 {
56 .name = "zlib",
57 .exec = zlib_test_exec,
58};