* Call rte_fib6_free for NULL pointer user input. Note: free has no return and * therefore it is impossible to check for failure but this test is added to * increase function coverage metrics and to validate that freeing null does * not crash. */
| 118 | * not crash. |
| 119 | */ |
| 120 | int32_t |
| 121 | test_free_null(void) |
| 122 | { |
| 123 | struct rte_fib6 *fib = NULL; |
| 124 | struct rte_fib6_conf config; |
| 125 | |
| 126 | config.max_routes = MAX_ROUTES; |
| 127 | config.rib_ext_sz = 0; |
| 128 | config.default_nh = 0; |
| 129 | config.type = RTE_FIB6_DUMMY; |
| 130 | |
| 131 | fib = rte_fib6_create(__func__, SOCKET_ID_ANY, &config); |
| 132 | RTE_TEST_ASSERT(fib != NULL, "Failed to create FIB\n"); |
| 133 | |
| 134 | rte_fib6_free(fib); |
| 135 | rte_fib6_free(NULL); |
| 136 | |
| 137 | return TEST_SUCCESS; |
| 138 | } |
| 139 | |
| 140 | /* |
| 141 | * Check that rte_fib6_add and rte_fib6_delete fails gracefully |
nothing calls this directly
no test coverage detected