iPXE
Macros | Functions | Variables
settings_test.c File Reference

Settings self-tests. More...

#include <string.h>
#include <ipxe/settings.h>
#include <ipxe/test.h>

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...
 

Detailed Description

Settings self-tests.

Definition in file settings_test.c.

Macro Definition Documentation

◆ RAW

#define RAW (   ...)    { __VA_ARGS__ }

Define inline raw data.

Definition at line 40 of file settings_test.c.

◆ storef_ok

#define storef_ok (   _settings,
  _setting,
  _formatted,
  _raw_array 
)
Value:
do { \
const uint8_t expected[] = _raw_array; \
uint8_t actual[ sizeof ( expected ) ]; \
int len; \
ok ( storef_setting ( _settings, _setting, _formatted ) == 0 ); \
len = fetch_setting ( _settings, _setting, NULL, NULL, actual, \
sizeof ( actual ) ); \
if ( len >= 0 ) { \
DBGC ( _settings, "Stored %s \"%s\", got:\n", \
(_setting)->type->name, _formatted ); \
DBGC_HDA ( _settings, 0, actual, len ); \
} else { \
DBGC ( _settings, "Stored %s \"%s\", got error %s\n", \
(_setting)->type->name, _formatted, \
strerror ( len ) ); \
} \
ok ( len == ( int ) sizeof ( actual ) ); \
ok ( memcmp ( actual, expected, sizeof ( actual ) ) == 0 ); \
} while ( 0 )
int expected
Expected value.
Definition: setjmp_test.c:45
uint32_t type
Operating system type.
Definition: ena.h:12
int storef_setting(struct settings *settings, const struct setting *setting, const char *value)
Store formatted value of setting.
Definition: settings.c:1319
int fetch_setting(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, void *data, size_t len)
Fetch setting.
Definition: settings.c:666
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
unsigned char uint8_t
Definition: stdint.h:10
uint32_t len
Length.
Definition: ena.h:14
#define ok(success)
Definition: test.h:46
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

Report a formatted-store test result.

Parameters
_settingsSettings block
_settingSetting
_formattedFormatted value
_raw_arrayExpected raw value

Definition at line 50 of file settings_test.c.

◆ fetchf_ok

#define fetchf_ok (   _settings,
  _setting,
  _raw_array,
  _formatted 
)
Value:
do { \
const uint8_t raw[] = _raw_array; \
char actual[ strlen ( _formatted ) + 1 ]; \
int len; \
ok ( store_setting ( _settings, _setting, raw, \
sizeof ( raw ) ) == 0 ); \
len = fetchf_setting ( _settings, _setting, NULL, NULL, actual, \
sizeof ( actual ) ); \
DBGC ( _settings, "Fetched %s \"%s\" from:\n", \
(_setting)->type->name, actual ); \
DBGC_HDA ( _settings, 0, raw, sizeof ( raw ) ); \
ok ( len == ( int ) ( sizeof ( actual ) - 1 ) ); \
ok ( strcmp ( actual, _formatted ) == 0 ); \
} while ( 0 )
int fetchf_setting(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, char *buf, size_t len)
Fetch formatted value of setting.
Definition: settings.c:1229
uint32_t type
Operating system type.
Definition: ena.h:12
int store_setting(struct settings *settings, const struct setting *setting, const void *data, size_t len)
Store value of setting.
Definition: settings.c:615
size_t strlen(const char *src)
Get length of string.
Definition: string.c:243
unsigned char uint8_t
Definition: stdint.h:10
uint32_t len
Length.
Definition: ena.h:14
int strcmp(const char *first, const char *second)
Compare strings.
Definition: string.c:173
__be32 raw[7]
Definition: CIB_PRM.h:28
#define ok(success)
Definition: test.h:46
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

Report a formatted-fetch test result.

Parameters
_settingsSettings block
_settingSetting
_raw_arrayRaw value
_formattedExpected formatted value

Definition at line 79 of file settings_test.c.

◆ storen_ok

#define storen_ok (   _settings,
  _setting,
  _numeric,
  _raw_array 
)
Value:
do { \
const uint8_t expected[] = _raw_array; \
uint8_t actual[ sizeof ( expected ) ]; \
int len; \
ok ( storen_setting ( _settings, _setting, _numeric ) == 0 ); \
len = fetch_setting ( _settings, _setting, NULL, NULL, actual, \
sizeof ( actual ) ); \
if ( len >= 0 ) { \
DBGC ( _settings, "Stored %s %#lx, got:\n", \
(_setting)->type->name, \
( unsigned long ) _numeric ); \
DBGC_HDA ( _settings, 0, actual, len ); \
} else { \
DBGC ( _settings, "Stored %s %#lx, got error %s\n", \
(_setting)->type->name, \
( unsigned long ) _numeric, strerror ( len ) ); \
} \
ok ( len == ( int ) sizeof ( actual ) ); \
ok ( memcmp ( actual, expected, sizeof ( actual ) ) == 0 ); \
} while ( 0 )
int expected
Expected value.
Definition: setjmp_test.c:45
uint32_t type
Operating system type.
Definition: ena.h:12
int storen_setting(struct settings *settings, const struct setting *setting, unsigned long value)
Store numeric value of setting.
Definition: settings.c:1414
int fetch_setting(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, void *data, size_t len)
Fetch setting.
Definition: settings.c:666
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
unsigned char uint8_t
Definition: stdint.h:10
uint32_t len
Length.
Definition: ena.h:14
#define ok(success)
Definition: test.h:46
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

Report a numeric-store test result.

Parameters
_settingsSettings block
_settingSetting
_numericNumeric value
_raw_arrayExpected raw value

Definition at line 103 of file settings_test.c.

◆ fetchn_ok

#define fetchn_ok (   _settings,
  _setting,
  _raw_array,
  _numeric 
)
Value:
do { \
const uint8_t raw[] = _raw_array; \
unsigned long actual; \
ok ( store_setting ( _settings, _setting, raw, \
sizeof ( raw ) ) == 0 ); \
ok ( fetchn_setting ( _settings, _setting, NULL, NULL, \
&actual ) == 0 ); \
DBGC ( _settings, "Fetched %s %#lx from:\n", \
(_setting)->type->name, actual ); \
DBGC_HDA ( _settings, 0, raw, sizeof ( raw ) ); \
ok ( actual == ( unsigned long ) _numeric ); \
} while ( 0 )
uint32_t type
Operating system type.
Definition: ena.h:12
int store_setting(struct settings *settings, const struct setting *setting, const void *data, size_t len)
Store value of setting.
Definition: settings.c:615
int fetchn_setting(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, unsigned long *value)
Fetch numeric value of setting.
Definition: settings.c:1372
unsigned char uint8_t
Definition: stdint.h:10
__be32 raw[7]
Definition: CIB_PRM.h:28
#define ok(success)
Definition: test.h:46
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

Report a numeric-fetch test result.

Parameters
_settingsSettings block
_settingSetting
_raw_arrayRaw array
_numericExpected numeric value

Definition at line 133 of file settings_test.c.

◆ test_settings

#define test_settings   test_generic_settings.settings

Test settings block.

Definition at line 161 of file settings_test.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ settings_test_exec()

static void settings_test_exec ( void  )
static

Perform settings self-tests.

Definition at line 269 of file settings_test.c.

269  {
270 
271  /* Register test settings block */
272  ok ( register_settings ( &test_settings, NULL, "test" ) == 0 );
273 
274  /* "string" setting type */
276  RAW ( 'h', 'e', 'l', 'l', 'o' ) );
278  RAW ( 'w', 'o', 'r', 'l', 'd' ), "world" );
279 
280  /* "uristring" setting type */
281  storef_ok ( &test_settings, &test_uristring_setting, "hello%20world",
282  RAW ( 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l',
283  'd' ) );
285  RAW ( 1, 2, 3, 4, 5 ), "%01%02%03%04%05" );
287  RAW ( 0, ' ', '%', '/', '#', ':', '@', '?', '=', '&' ),
288  "%00%20%25%2F%23%3A%40%3F%3D%26" );
289 
290  /* "ipv4" setting type */
291  storef_ok ( &test_settings, &test_ipv4_setting, "192.168.0.1",
292  RAW ( 192, 168, 0, 1 ) );
294  RAW ( 212, 13, 204, 60 ), "212.13.204.60" );
295 
296  /* "ipv6" setting type */
298  "2001:ba8:0:1d4::6950:5845",
299  RAW ( 0x20, 0x01, 0x0b, 0xa8, 0x00, 0x00, 0x01, 0xd4,
300  0x00, 0x00, 0x00, 0x00, 0x69, 0x50, 0x58, 0x45 ) );
302  RAW ( 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
303  0x02, 0x0c, 0x29, 0xff, 0xfe, 0xc5, 0x39, 0xa1 ),
304  "fe80::20c:29ff:fec5:39a1" );
305 
306  /* Integer setting types (as formatted strings) */
308  "54", RAW ( 54 ) );
310  "0x7f", RAW ( 0x7f ) );
312  "0x1234", RAW ( 0x34 ) );
314  "-32", RAW ( -32 ) );
316  RAW ( -9 ), "-9" );
318  RAW ( 106 ), "106" );
320  "129", RAW ( 129 ) );
322  "0x3421", RAW ( 0x21 ) );
324  RAW ( 0x54 ), "0x54" );
326  "29483", RAW ( 0x73, 0x2b ) );
328  RAW ( 0x82, 0x14 ), "-32236" );
330  RAW ( 0x12, 0x78 ), "4728" );
332  "48727", RAW ( 0xbe, 0x57 ) );
334  RAW ( 0x9a, 0x24 ), "0x9a24" );
336  "2901274", RAW ( 0x00, 0x2c, 0x45, 0x1a ) );
338  RAW ( 0xff, 0x34, 0x2d, 0xaf ), "-13357649" );
340  RAW ( 0x01, 0x00, 0x34, 0xab ), "16790699" );
342  "0xb598d21", RAW ( 0x0b, 0x59, 0x8d, 0x21 ) );
344  RAW ( 0xf2, 0x37, 0xb2, 0x18 ), "0xf237b218" );
345 
346  /* Integer setting types (as numeric values) */
348  72, RAW ( 72 ) );
350  0xabcd, RAW ( 0xcd ) );
352  RAW ( 0xfe ), -2 );
354  84, RAW ( 84 ) );
356  RAW ( 0xfe ), 0xfe );
358  0x87bd, RAW ( 0x87, 0xbd ) );
360  RAW ( 0x3d, 0x14 ), 0x3d14 );
362  RAW ( 0x80 ), -128 );
364  1, RAW ( 0x00, 0x01 ) );
366  RAW ( 0xbd, 0x87 ), 0xbd87 );
368  RAW ( 0x80 ), 0x0080 );
370  0x0812bfd2, RAW ( 0x08, 0x12, 0xbf, 0xd2 ) );
372  RAW ( 0x43, 0x87, 0x91, 0xb4 ), 0x438791b4 );
374  RAW ( 0xff, 0xff, 0xfe ), -2 );
376  0xb5927ab8, RAW ( 0xb5, 0x92, 0x7a, 0xb8 ) );
378  RAW ( 0x98, 0xab, 0x41, 0x81 ), 0x98ab4181 );
380  RAW ( 0xff, 0xff, 0xfe ), 0x00fffffe );
382  RAW ( 0, 0, 0, 0x12, 0x34, 0x56, 0x78 ), 0x12345678 );
384  RAW ( 0, 0, 0, 0x12, 0x34, 0x56, 0x78 ), 0x12345678 );
386  RAW ( 0xff, 0xff, 0x87, 0x65, 0x43, 0x21 ), -0x789abcdf );
387 
388  /* "hex" setting type */
390  "08:12:f5:22:90:1b:4b:47:a8:30:cb:4d:67:4c:d6:76",
391  RAW ( 0x08, 0x12, 0xf5, 0x22, 0x90, 0x1b, 0x4b, 0x47, 0xa8,
392  0x30, 0xcb, 0x4d, 0x67, 0x4c, 0xd6, 0x76 ) );
394  RAW ( 0x62, 0xd9, 0xd4, 0xc4, 0x7e, 0x3b, 0x41, 0x46, 0x91,
395  0xc6, 0xfd, 0x0c, 0xbf ),
396  "62:d9:d4:c4:7e:3b:41:46:91:c6:fd:0c:bf" );
397 
398  /* "hexhyp" setting type */
400  "11-33-22", RAW ( 0x11, 0x33, 0x22 ) );
402  RAW ( 0x9f, 0xe5, 0x6d, 0xfb, 0x24, 0x3a, 0x4c, 0xbb, 0xa9,
403  0x09, 0x6c, 0x66, 0x13, 0xc1, 0xa8, 0xec, 0x27 ),
404  "9f-e5-6d-fb-24-3a-4c-bb-a9-09-6c-66-13-c1-a8-ec-27" );
405 
406  /* "hexraw" setting type */
408  "012345abcdef", RAW ( 0x01, 0x23, 0x45, 0xab, 0xcd, 0xef ));
410  RAW ( 0x9e, 0x4b, 0x6e, 0xef, 0x36, 0xb6, 0x46, 0xfe, 0x8f,
411  0x17, 0x06, 0x39, 0x6b, 0xf4, 0x48, 0x4e ),
412  "9e4b6eef36b646fe8f1706396bf4484e" );
413 
414  /* "base64" setting type */
416  "cGFzc6\nNwaHJhc2U= ",
417  RAW ( 0x70, 0x61, 0x73, 0x73, 0xa3, 0x70, 0x68, 0x72, 0x61,
418  0x73, 0x65 ) );
420  RAW ( 0x80, 0x81, 0x82, 0x83, 0x84, 0x00, 0xff ),
421  "gIGCg4QA/w==" );
422 
423  /* "uuid" setting type (no store capability) */
425  RAW ( 0x1a, 0x6a, 0x74, 0x9d, 0x0e, 0xda, 0x46, 0x1a,0xa8,
426  0x7a, 0x7c, 0xfe, 0x4f, 0xca, 0x4a, 0x57 ),
427  "1a6a749d-0eda-461a-a87a-7cfe4fca4a57" );
429  RAW ( 0x1a, 0x6a, 0x74, 0x9d, 0x0e, 0xda, 0x46, 0x1a,0xa8,
430  0x7a, 0x7c, 0xfe, 0x4f, 0xca, 0x4a, 0x57 ),
431  "9d746a1a-da0e-1a46-a87a-7cfe4fca4a57" );
432 
433  /* "busdevfn" setting type (no store capability) */
435  RAW ( 0x03, 0x45 ), "0000:03:08.5" );
437  RAW ( 0x00, 0x02, 0x0a, 0x21 ), "0002:0a:04.1" );
438 
439  /* Clear and unregister test settings block */
442 }
static struct setting test_ipv4_setting
Test IPv4 address setting type.
#define storef_ok(_settings, _setting, _formatted, _raw_array)
Report a formatted-store test result.
Definition: settings_test.c:50
void unregister_settings(struct settings *settings)
Unregister settings block.
Definition: settings.c:514
#define fetchf_ok(_settings, _setting, _raw_array, _formatted)
Report a formatted-fetch test result.
Definition: settings_test.c:79
static struct setting test_busdevfn_setting
Test PCI bus:dev.fn setting type.
static struct setting test_string_setting
Test string setting.
static struct setting test_int32_setting
Test signed 32-bit integer setting type.
static struct setting test_ipv6_setting
Test IPv6 address setting type.
static struct setting test_guid_setting
Test GUID setting type.
#define fetchn_ok(_settings, _setting, _raw_array, _numeric)
Report a numeric-fetch test result.
static struct setting test_base64_setting
Test Base64 setting type.
static struct setting test_int8_setting
Test signed 8-bit integer setting type.
static struct setting test_int16_setting
Test signed 16-bit integer setting type.
#define RAW(...)
Define inline raw data.
Definition: settings_test.c:40
static struct setting test_uint8_setting
Test unsigned 8-bit integer setting type.
static struct setting test_uint32_setting
Test unsigned 32-bit integer setting type.
static struct setting test_uint16_setting
Test unsigned 16-bit integer setting type.
#define storen_ok(_settings, _setting, _numeric, _raw_array)
Report a numeric-store test result.
static struct setting test_hex_setting
Test colon-separated hex string setting type.
int register_settings(struct settings *settings, struct settings *parent, const char *name)
Register settings block.
Definition: settings.c:475
void clear_settings(struct settings *settings)
Clear settings block.
Definition: settings.c:1102
#define test_settings
Test settings block.
static struct setting test_hexraw_setting
Test raw hex string setting type.
static struct setting test_uuid_setting
Test UUID setting type.
#define ok(success)
Definition: test.h:46
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
static struct setting test_uristring_setting
Test URI-encoded string setting.
static struct setting test_hexhyp_setting
Test hyphen-separated hex string setting type.

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()

REQUIRING_SYMBOL ( settings_test  )

◆ REQUIRE_OBJECT()

REQUIRE_OBJECT ( ipv6  )

Variable Documentation

◆ test_generic_settings

struct generic_settings test_generic_settings
Initial value:
= {
.settings = {
.refcnt = NULL,
.siblings =
.children =
},
}
struct settings_operations generic_settings_operations
Generic settings operations.
Definition: settings.c:221
struct list_head list
List of generic settings.
Definition: settings.h:302
struct list_head siblings
Sibling settings blocks.
Definition: settings.h:140
struct settings settings
Settings block.
Definition: settings.h:300
struct generic_settings test_generic_settings
Test generic settings block.
struct list_head children
Child settings blocks.
Definition: settings.h:142
#define LIST_HEAD_INIT(list)
Initialise a static list head.
Definition: list.h:30
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

Test generic settings block.

Definition at line 148 of file settings_test.c.

◆ test_string_setting

struct setting test_string_setting
static
Initial value:
= {
.name = "test_string",
.type = &setting_type_string,
}

Test string setting.

Definition at line 164 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_uristring_setting

struct setting test_uristring_setting
static
Initial value:
= {
.name = "test_uristring",
.type = &setting_type_uristring,
}

Test URI-encoded string setting.

Definition at line 170 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_ipv4_setting

struct setting test_ipv4_setting
static
Initial value:
= {
.name = "test_ipv4",
.type = &setting_type_ipv4,
}

Test IPv4 address setting type.

Definition at line 176 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_ipv6_setting

struct setting test_ipv6_setting
static
Initial value:
= {
.name = "test_ipv6",
.type = &setting_type_ipv6,
}

Test IPv6 address setting type.

Definition at line 182 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_int8_setting

struct setting test_int8_setting
static
Initial value:
= {
.name = "test_int8",
.type = &setting_type_int8,
}

Test signed 8-bit integer setting type.

Definition at line 188 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_int16_setting

struct setting test_int16_setting
static
Initial value:
= {
.name = "test_int16",
.type = &setting_type_int16,
}

Test signed 16-bit integer setting type.

Definition at line 194 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_int32_setting

struct setting test_int32_setting
static
Initial value:
= {
.name = "test_int32",
.type = &setting_type_int32,
}

Test signed 32-bit integer setting type.

Definition at line 200 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_uint8_setting

struct setting test_uint8_setting
static
Initial value:
= {
.name = "test_uint8",
.type = &setting_type_uint8,
}

Test unsigned 8-bit integer setting type.

Definition at line 206 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_uint16_setting

struct setting test_uint16_setting
static
Initial value:
= {
.name = "test_uint16",
.type = &setting_type_uint16,
}

Test unsigned 16-bit integer setting type.

Definition at line 212 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_uint32_setting

struct setting test_uint32_setting
static
Initial value:
= {
.name = "test_uint32",
.type = &setting_type_uint32,
}

Test unsigned 32-bit integer setting type.

Definition at line 218 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_hex_setting

struct setting test_hex_setting
static
Initial value:
= {
.name = "test_hex",
.type = &setting_type_hex,
}

Test colon-separated hex string setting type.

Definition at line 224 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_hexhyp_setting

struct setting test_hexhyp_setting
static
Initial value:
= {
.name = "test_hexhyp",
.type = &setting_type_hexhyp,
}

Test hyphen-separated hex string setting type.

Definition at line 230 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_hexraw_setting

struct setting test_hexraw_setting
static
Initial value:
= {
.name = "test_hexraw",
.type = &setting_type_hexraw,
}

Test raw hex string setting type.

Definition at line 236 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_base64_setting

struct setting test_base64_setting
static
Initial value:
= {
.name = "test_base64",
.type = &setting_type_base64,
}

Test Base64 setting type.

Definition at line 242 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_uuid_setting

struct setting test_uuid_setting
static
Initial value:
= {
.name = "test_uuid",
.type = &setting_type_uuid,
}

Test UUID setting type.

Definition at line 248 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_guid_setting

struct setting test_guid_setting
static
Initial value:
= {
.name = "test_guid",
.type = &setting_type_guid,
}

Test GUID setting type.

Definition at line 254 of file settings_test.c.

Referenced by settings_test_exec().

◆ test_busdevfn_setting

struct setting test_busdevfn_setting
static
Initial value:
= {
.name = "test_busdevfn",
.type = &setting_type_busdevfn,
}

Test PCI bus:dev.fn setting type.

Definition at line 260 of file settings_test.c.

Referenced by settings_test_exec().

◆ __self_test

struct self_test settings_test __self_test
Initial value:
= {
.name = "settings",
}
static void settings_test_exec(void)
Perform settings self-tests.

Settings self-test.

Definition at line 445 of file settings_test.c.