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

Function test_set_pkt_metadata_success

dpdk/app/test/test_security.c:1509–1529  ·  view source on GitHub ↗

* Test execution of rte_security_set_pkt_metadata in successful execution path */

Source from the content-addressed store, hash-verified

1507 * Test execution of rte_security_set_pkt_metadata in successful execution path
1508 */
1509static int
1510test_set_pkt_metadata_success(void)
1511{
1512 struct security_unittest_params *ut_params = &unittest_params;
1513 struct rte_mbuf m;
1514 int params;
1515
1516 mock_set_pkt_metadata_exp.device = NULL;
1517 mock_set_pkt_metadata_exp.sess = ut_params->sess;
1518 mock_set_pkt_metadata_exp.m = &m;
1519 mock_set_pkt_metadata_exp.params = &params;
1520 mock_set_pkt_metadata_exp.ret = 0;
1521
1522 int ret = rte_security_set_pkt_metadata(&ut_params->ctx,
1523 ut_params->sess, &m, &params);
1524 TEST_ASSERT_MOCK_FUNCTION_CALL_RET(rte_security_set_pkt_metadata,
1525 ret, 0, "%d");
1526 TEST_ASSERT_MOCK_CALLS(mock_set_pkt_metadata_exp, 1);
1527
1528 return TEST_SUCCESS;
1529}
1530
1531/**
1532 * rte_security_capabilities_get tests

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected