MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_get_helper

Function test_get_helper

dpdk/app/test/test_thash.c:511–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511static int
512test_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
538static int
539test_period_overflow(void)

Callers

nothing calls this directly

Calls 4

rte_thash_init_ctxFunction · 0.85
rte_thash_get_helperFunction · 0.85
rte_thash_add_helperFunction · 0.85
rte_thash_free_ctxFunction · 0.85

Tested by

no test coverage detected