| 15 | }; |
| 16 | |
| 17 | static int |
| 18 | test_ether_addr(void) |
| 19 | { |
| 20 | struct rte_ether_addr rand_ea = { }; |
| 21 | unsigned int i; |
| 22 | |
| 23 | RTE_TEST_ASSERT(rte_is_zero_ether_addr(&zero_ea), "Zero address is not zero"); |
| 24 | RTE_TEST_ASSERT(!rte_is_zero_ether_addr(&bcast_ea), "Broadcast is zero"); |
| 25 | |
| 26 | for (i = 0; i < N; i++) { |
| 27 | rte_eth_random_addr(rand_ea.addr_bytes); |
| 28 | RTE_TEST_ASSERT(!rte_is_zero_ether_addr(&rand_ea), |
| 29 | "Random address is zero"); |
| 30 | RTE_TEST_ASSERT(rte_is_unicast_ether_addr(&rand_ea), |
| 31 | "Random address is not unicast"); |
| 32 | RTE_TEST_ASSERT(rte_is_local_admin_ether_addr(&rand_ea), |
| 33 | "Random address is not local admin"); |
| 34 | } |
| 35 | |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | static int |
| 40 | test_format_addr(void) |
no test coverage detected