iPXE
|
Settings self-tests. More...
Go to the source code of this file.
Macros | |
#define | RAW(...) { __VA_ARGS__ } |
Define inline raw data. More... | |
#define | storef_ok(_settings, _setting, _formatted, _raw_array) |
Report a formatted-store test result. More... | |
#define | fetchf_ok(_settings, _setting, _raw_array, _formatted) |
Report a formatted-fetch test result. More... | |
#define | storen_ok(_settings, _setting, _numeric, _raw_array) |
Report a numeric-store test result. More... | |
#define | fetchn_ok(_settings, _setting, _raw_array, _numeric) |
Report a numeric-fetch test result. More... | |
#define | test_settings test_generic_settings.settings |
Test settings block. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | settings_test_exec (void) |
Perform settings self-tests. More... | |
REQUIRING_SYMBOL (settings_test) | |
REQUIRE_OBJECT (ipv6) | |
Variables | |
struct generic_settings | test_generic_settings |
Test generic settings block. More... | |
static struct setting | test_string_setting |
Test string setting. More... | |
static struct setting | test_uristring_setting |
Test URI-encoded string setting. More... | |
static struct setting | test_ipv4_setting |
Test IPv4 address setting type. More... | |
static struct setting | test_ipv6_setting |
Test IPv6 address setting type. More... | |
static struct setting | test_int8_setting |
Test signed 8-bit integer setting type. More... | |
static struct setting | test_int16_setting |
Test signed 16-bit integer setting type. More... | |
static struct setting | test_int32_setting |
Test signed 32-bit integer setting type. More... | |
static struct setting | test_uint8_setting |
Test unsigned 8-bit integer setting type. More... | |
static struct setting | test_uint16_setting |
Test unsigned 16-bit integer setting type. More... | |
static struct setting | test_uint32_setting |
Test unsigned 32-bit integer setting type. More... | |
static struct setting | test_hex_setting |
Test colon-separated hex string setting type. More... | |
static struct setting | test_hexhyp_setting |
Test hyphen-separated hex string setting type. More... | |
static struct setting | test_hexraw_setting |
Test raw hex string setting type. More... | |
static struct setting | test_base64_setting |
Test Base64 setting type. More... | |
static struct setting | test_uuid_setting |
Test UUID setting type. More... | |
static struct setting | test_guid_setting |
Test GUID setting type. More... | |
static struct setting | test_busdevfn_setting |
Test PCI bus:dev.fn setting type. More... | |
struct self_test settings_test | __self_test |
Settings self-test. More... | |
Settings self-tests.
Definition in file settings_test.c.
#define RAW | ( | ... | ) | { __VA_ARGS__ } |
Define inline raw data.
Definition at line 40 of file settings_test.c.
#define storef_ok | ( | _settings, | |
_setting, | |||
_formatted, | |||
_raw_array | |||
) |
Report a formatted-store test result.
_settings | Settings block |
_setting | Setting |
_formatted | Formatted value |
_raw_array | Expected raw value |
Definition at line 50 of file settings_test.c.
#define fetchf_ok | ( | _settings, | |
_setting, | |||
_raw_array, | |||
_formatted | |||
) |
Report a formatted-fetch test result.
_settings | Settings block |
_setting | Setting |
_raw_array | Raw value |
_formatted | Expected formatted value |
Definition at line 79 of file settings_test.c.
#define storen_ok | ( | _settings, | |
_setting, | |||
_numeric, | |||
_raw_array | |||
) |
Report a numeric-store test result.
_settings | Settings block |
_setting | Setting |
_numeric | Numeric value |
_raw_array | Expected raw value |
Definition at line 103 of file settings_test.c.
#define fetchn_ok | ( | _settings, | |
_setting, | |||
_raw_array, | |||
_numeric | |||
) |
Report a numeric-fetch test result.
_settings | Settings block |
_setting | Setting |
_raw_array | Raw array |
_numeric | Expected numeric value |
Definition at line 133 of file settings_test.c.
#define test_settings test_generic_settings.settings |
Test settings block.
Definition at line 161 of file settings_test.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Perform settings self-tests.
Definition at line 269 of file settings_test.c.
References clear_settings(), fetchf_ok, fetchn_ok, NULL, ok, RAW, register_settings(), storef_ok, storen_ok, test_base64_setting, test_busdevfn_setting, test_guid_setting, test_hex_setting, test_hexhyp_setting, test_hexraw_setting, test_int16_setting, test_int32_setting, test_int8_setting, test_ipv4_setting, test_ipv6_setting, test_settings, test_string_setting, test_uint16_setting, test_uint32_setting, test_uint8_setting, test_uristring_setting, test_uuid_setting, and unregister_settings().
REQUIRING_SYMBOL | ( | settings_test | ) |
REQUIRE_OBJECT | ( | ipv6 | ) |
struct generic_settings test_generic_settings |
Test generic settings block.
Definition at line 148 of file settings_test.c.
|
static |
Test string setting.
Definition at line 164 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test URI-encoded string setting.
Definition at line 170 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test IPv4 address setting type.
Definition at line 176 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test IPv6 address setting type.
Definition at line 182 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test signed 8-bit integer setting type.
Definition at line 188 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test signed 16-bit integer setting type.
Definition at line 194 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test signed 32-bit integer setting type.
Definition at line 200 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test unsigned 8-bit integer setting type.
Definition at line 206 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test unsigned 16-bit integer setting type.
Definition at line 212 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test unsigned 32-bit integer setting type.
Definition at line 218 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test colon-separated hex string setting type.
Definition at line 224 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test hyphen-separated hex string setting type.
Definition at line 230 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test raw hex string setting type.
Definition at line 236 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test Base64 setting type.
Definition at line 242 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test UUID setting type.
Definition at line 248 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test GUID setting type.
Definition at line 254 of file settings_test.c.
Referenced by settings_test_exec().
|
static |
Test PCI bus:dev.fn setting type.
Definition at line 260 of file settings_test.c.
Referenced by settings_test_exec().
struct self_test settings_test __self_test |
Settings self-test.
Definition at line 453 of file settings_test.c.