* Checks that rte_lpm6_delete_bulk_func fails gracefully for incorrect user * input arguments */
| 398 | * input arguments |
| 399 | */ |
| 400 | int32_t |
| 401 | test8(void) |
| 402 | { |
| 403 | struct rte_lpm6 *lpm = NULL; |
| 404 | struct rte_lpm6_config config; |
| 405 | uint8_t ip[10][16]; |
| 406 | uint8_t depth[10]; |
| 407 | int32_t status = 0; |
| 408 | |
| 409 | config.max_rules = MAX_RULES; |
| 410 | config.number_tbl8s = NUMBER_TBL8S; |
| 411 | config.flags = 0; |
| 412 | |
| 413 | /* rte_lpm6_delete: lpm == NULL */ |
| 414 | status = rte_lpm6_delete_bulk_func(NULL, ip, depth, 10); |
| 415 | TEST_LPM_ASSERT(status < 0); |
| 416 | |
| 417 | /*Create valid lpm to use in rest of test. */ |
| 418 | lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config); |
| 419 | TEST_LPM_ASSERT(lpm != NULL); |
| 420 | |
| 421 | /* rte_lpm6_delete: ip = NULL */ |
| 422 | status = rte_lpm6_delete_bulk_func(lpm, NULL, depth, 10); |
| 423 | TEST_LPM_ASSERT(status < 0); |
| 424 | |
| 425 | /* rte_lpm6_delete: next_hop = NULL */ |
| 426 | status = rte_lpm6_delete_bulk_func(lpm, ip, NULL, 10); |
| 427 | TEST_LPM_ASSERT(status < 0); |
| 428 | |
| 429 | rte_lpm6_free(lpm); |
| 430 | |
| 431 | return PASS; |
| 432 | } |
| 433 | |
| 434 | /* |
| 435 | * Call add, lookup and delete for a single rule with depth < 24. |
nothing calls this directly
no test coverage detected