* Test execution of rte_security_set_pkt_metadata in successful execution path */
| 1507 | * Test execution of rte_security_set_pkt_metadata in successful execution path |
| 1508 | */ |
| 1509 | static int |
| 1510 | test_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 = ¶ms; |
| 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, ¶ms); |
| 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 |
nothing calls this directly
no test coverage detected