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

Function ut_setup

dpdk/app/test/test_security.c:534–560  ·  view source on GitHub ↗

* ut_setup initializes test case parameters to default values. * It resets also any .called and .failed statistics of mockup functions * usage. */

Source from the content-addressed store, hash-verified

532 * usage.
533 */
534static int
535ut_setup(void)
536{
537 struct security_unittest_params *ut_params = &unittest_params;
538 ut_params->ctx.device = NULL;
539 ut_params->ctx.ops = &mock_ops;
540 ut_params->ctx.sess_cnt = 0;
541 ut_params->sess = NULL;
542
543 mock_session_create_exp.called = 0;
544 mock_session_update_exp.called = 0;
545 mock_session_get_size_exp.called = 0;
546 mock_session_stats_get_exp.called = 0;
547 mock_session_destroy_exp.called = 0;
548 mock_set_pkt_metadata_exp.called = 0;
549 mock_capabilities_get_exp.called = 0;
550
551 mock_session_create_exp.failed = 0;
552 mock_session_update_exp.failed = 0;
553 mock_session_get_size_exp.failed = 0;
554 mock_session_stats_get_exp.failed = 0;
555 mock_session_destroy_exp.failed = 0;
556 mock_set_pkt_metadata_exp.failed = 0;
557 mock_capabilities_get_exp.failed = 0;
558
559 return TEST_SUCCESS;
560}
561
562/**
563 * destroy_session_with_check is a helper function releasing session

Callers 1

ut_setup_with_sessionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected