* Call rte_rib6_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. */
| 92 | * not crash. |
| 93 | */ |
| 94 | int32_t |
| 95 | test_free_null(void) |
| 96 | { |
| 97 | struct rte_rib6 *rib = NULL; |
| 98 | struct rte_rib6_conf config; |
| 99 | |
| 100 | config.max_nodes = MAX_RULES; |
| 101 | config.ext_sz = 0; |
| 102 | |
| 103 | rib = rte_rib6_create(__func__, SOCKET_ID_ANY, &config); |
| 104 | RTE_TEST_ASSERT(rib != NULL, "Failed to create RIB\n"); |
| 105 | |
| 106 | rte_rib6_free(rib); |
| 107 | rte_rib6_free(NULL); |
| 108 | return TEST_SUCCESS; |
| 109 | } |
| 110 | |
| 111 | /* |
| 112 | * Check that rte_rib6_insert fails gracefully |
nothing calls this directly
no test coverage detected