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