| 509 | } |
| 510 | |
| 511 | static int |
| 512 | test_get_helper(void) |
| 513 | { |
| 514 | struct rte_thash_ctx *ctx; |
| 515 | struct rte_thash_subtuple_helper *h; |
| 516 | int ret; |
| 517 | |
| 518 | ctx = rte_thash_init_ctx("test", 40, 7, NULL, 0); |
| 519 | RTE_TEST_ASSERT(ctx != NULL, "Can not create thash ctx\n"); |
| 520 | |
| 521 | h = rte_thash_get_helper(NULL, "first_range"); |
| 522 | RTE_TEST_ASSERT(h == NULL, "Call succeeded with invalid parameters\n"); |
| 523 | |
| 524 | h = rte_thash_get_helper(ctx, NULL); |
| 525 | RTE_TEST_ASSERT(h == NULL, "Call succeeded with invalid parameters\n"); |
| 526 | |
| 527 | ret = rte_thash_add_helper(ctx, "first_range", 8, 0); |
| 528 | RTE_TEST_ASSERT(ret == 0, "Can not create helper\n"); |
| 529 | |
| 530 | h = rte_thash_get_helper(ctx, "first_range"); |
| 531 | RTE_TEST_ASSERT(h != NULL, "Can not find helper\n"); |
| 532 | |
| 533 | rte_thash_free_ctx(ctx); |
| 534 | |
| 535 | return TEST_SUCCESS; |
| 536 | } |
| 537 | |
| 538 | static int |
| 539 | test_period_overflow(void) |
nothing calls this directly
no test coverage detected