|
iPXE
|
Network device tests. More...
Go to the source code of this file.
Data Structures | |
| struct | testnet_setting |
| A test network device setting. More... | |
| struct | testnet |
| A test network device. More... | |
Macros | |
| #define | TESTNET(NAME, ...) |
| Declare a test network device. More... | |
| #define | testnet_ok(testnet) testnet_okx ( testnet, __FILE__, __LINE__ ) |
| Report a network device creation test result. More... | |
| #define | testnet_open_ok(testnet) testnet_open_okx ( testnet, __FILE__, __LINE__ ) |
| Report a network device opening test result. More... | |
| #define | testnet_set_ok(testnet, name, value) testnet_set_okx ( testnet, name, value, __FILE__, __LINE__ ) |
| Report a network device setting test result. More... | |
| #define | testnet_close_ok(testnet) testnet_close_okx ( testnet, __FILE__, __LINE__ ) |
| Report a network device closing test result. More... | |
| #define | testnet_remove_ok(testnet) testnet_remove_okx ( testnet, __FILE__, __LINE__ ) |
| Report a network device removal test result. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| void | testnet_okx (struct testnet *testnet, const char *file, unsigned int line) |
| Report a network device creation test result. More... | |
| void | testnet_open_okx (struct testnet *testnet, const char *file, unsigned int line) |
| Report a network device opening test result. More... | |
| void | testnet_set_okx (struct testnet *testnet, const char *name, const char *value, const char *file, unsigned int line) |
| Report a network device setting test result. More... | |
| void | testnet_close_okx (struct testnet *testnet, const char *file, unsigned int line) |
| Report a network device closing test result. More... | |
| void | testnet_remove_okx (struct testnet *testnet, const char *file, unsigned int line) |
| Report a network device removal test result. More... | |
Network device tests.
Definition in file netdev_test.h.
| #define TESTNET | ( | NAME, | |
| ... | |||
| ) |
Declare a test network device.
| NAME | Network device name |
| ... | Initial network device settings |
Definition at line 41 of file netdev_test.h.
| #define testnet_ok | ( | testnet | ) | testnet_okx ( testnet, __FILE__, __LINE__ ) |
Report a network device creation test result.
| testnet | Test network device |
Definition at line 64 of file netdev_test.h.
| #define testnet_open_ok | ( | testnet | ) | testnet_open_okx ( testnet, __FILE__, __LINE__ ) |
Report a network device opening test result.
| testnet | Test network device |
Definition at line 73 of file netdev_test.h.
| #define testnet_set_ok | ( | testnet, | |
| name, | |||
| value | |||
| ) | testnet_set_okx ( testnet, name, value, __FILE__, __LINE__ ) |
Report a network device setting test result.
| testnet | Test network device |
| name | Setting name (relative to network device's settings) |
| value | Setting value |
Definition at line 85 of file netdev_test.h.
| #define testnet_close_ok | ( | testnet | ) | testnet_close_okx ( testnet, __FILE__, __LINE__ ) |
Report a network device closing test result.
| testnet | Test network device |
Definition at line 96 of file netdev_test.h.
| #define testnet_remove_ok | ( | testnet | ) | testnet_remove_okx ( testnet, __FILE__, __LINE__ ) |
Report a network device removal test result.
| testnet | Test network device |
Definition at line 106 of file netdev_test.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| void testnet_okx | ( | struct testnet * | testnet, |
| const char * | file, | ||
| unsigned int | line | ||
| ) |
Report a network device creation test result.
| testnet | Test network device |
| file | Test code file |
| line | Test code line |
Definition at line 104 of file netdev_test.c.
References alloc_etherdev(), testnet::count, testnet::dev, net_device::dev, testnet_setting::name, device::name, net_device::name, testnet::netdev, netdev_init(), NULL, okx, register_netdev(), snprintf(), testnet_open_okx(), testnet_operations, testnet_set_okx(), testnet::testset, and testnet_setting::value.
| void testnet_open_okx | ( | struct testnet * | testnet, |
| const char * | file, | ||
| unsigned int | line | ||
| ) |
Report a network device opening test result.
| testnet | Test network device |
| file | Test code file |
| line | Test code line |
Definition at line 138 of file netdev_test.c.
References testnet::netdev, netdev_open(), NULL, and okx.
Referenced by testnet_okx().
| void testnet_set_okx | ( | struct testnet * | testnet, |
| const char * | name, | ||
| const char * | value, | ||
| const char * | file, | ||
| unsigned int | line | ||
| ) |
Report a network device setting test result.
| testnet | Test network device |
| name | Setting name (relative to network device's settings) |
| value | Setting value |
| file | Test code file |
| line | Test code line |
Definition at line 157 of file netdev_test.c.
References autovivify_child_settings(), testnet::dev, device::name, settings::name, name, testnet::netdev, netdev_settings(), NULL, okx, parse_setting_name(), snprintf(), storef_setting(), strchr(), strcmp(), strlen(), and value.
Referenced by testnet_okx().
| void testnet_close_okx | ( | struct testnet * | testnet, |
| const char * | file, | ||
| unsigned int | line | ||
| ) |
Report a network device closing test result.
| testnet | Test network device |
| file | Test code file |
| line | Test code line |
Definition at line 190 of file netdev_test.c.
References testnet::netdev, netdev_close(), NULL, and okx.
| void testnet_remove_okx | ( | struct testnet * | testnet, |
| const char * | file, | ||
| unsigned int | line | ||
| ) |
Report a network device removal test result.
| testnet | Test network device |
| file | Test code file |
| line | Test code line |
Definition at line 207 of file netdev_test.c.
References testnet::netdev, netdev_nullify(), netdev_put(), NULL, okx, and unregister_netdev().
1.8.15