|
iPXE
|
I/O buffer tests. More...
#include <stdint.h>#include <string.h>#include <assert.h>#include <ipxe/iobuf.h>#include <ipxe/io.h>#include <ipxe/test.h>Go to the source code of this file.
Macros | |
| #define | alloc_iob_ok(len, align, offset) alloc_iob_okx ( len, align, offset, __FILE__, __LINE__ ) |
| #define | alloc_iob_fail_ok(len, align, offset) alloc_iob_fail_okx ( len, align, offset, __FILE__, __LINE__ ) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static void | alloc_iob_okx (size_t len, size_t align, size_t offset, const char *file, unsigned int line) |
| Report I/O buffer allocation test result. More... | |
| static void | alloc_iob_fail_okx (size_t len, size_t align, size_t offset, const char *file, unsigned int line) |
| Report I/O buffer allocation failure test result. More... | |
| static void | iobuf_test_exec (void) |
| Perform I/O buffer self-tests. More... | |
Variables | |
| struct self_test iobuf_test | __self_test |
| I/O buffer self-test. More... | |
I/O buffer tests.
Definition in file iobuf_test.c.
| #define alloc_iob_ok | ( | len, | |
| align, | |||
| offset | |||
| ) | alloc_iob_okx ( len, align, offset, __FILE__, __LINE__ ) |
Definition at line 85 of file iobuf_test.c.
| #define alloc_iob_fail_ok | ( | len, | |
| align, | |||
| offset | |||
| ) | alloc_iob_fail_okx ( len, align, offset, __FILE__, __LINE__ ) |
Definition at line 105 of file iobuf_test.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Report I/O buffer allocation test result.
| len | Required length of buffer |
| align | Physical alignment |
| offset | Offset from physical alignment |
| file | Test code file |
| line | Test code line |
Definition at line 54 of file iobuf_test.c.
References alloc_iob_raw(), io_buffer::data, DBGC, free_iob(), iob_put, iob_tailroom(), IOB_ZLEN, len, memset(), NULL, offset, and okx.
|
inlinestatic |
Report I/O buffer allocation failure test result.
| len | Required length of buffer |
| align | Physical alignment |
| offset | Offset from physical alignment |
| file | Test code file |
| line | Test code line |
Definition at line 97 of file iobuf_test.c.
References alloc_iob_raw(), len, NULL, offset, and okx.
|
static |
Perform I/O buffer self-tests.
Definition at line 112 of file iobuf_test.c.
References alloc_iob_fail_ok, and alloc_iob_ok.
| struct self_test iobuf_test __self_test |
I/O buffer self-test.
Definition at line 43 of file iobuf_test.c.
1.8.15