MCPcopy Index your code
hub / github.com/F-Stack/f-stack / testsuite_setup

Function testsuite_setup

dpdk/app/test-bbdev/test_bbdev.c:31–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29static uint8_t null_dev_id;
30
31static int
32testsuite_setup(void)
33{
34 uint8_t nb_devs;
35 int ret;
36 char buf[RTE_BBDEV_NAME_MAX_LEN];
37
38 /* Create test device */
39 snprintf(buf, sizeof(buf), "%s_unittest", BBDEV_NAME_NULL);
40 ret = rte_vdev_init(buf, NULL);
41 TEST_ASSERT(ret == 0, "Failed to create instance of pmd: %s", buf);
42
43 nb_devs = rte_bbdev_count();
44 TEST_ASSERT(nb_devs != 0, "No devices found");
45
46 /* Most recently created device is our device */
47 null_dev_id = nb_devs - 1;
48
49 return TEST_SUCCESS;
50}
51
52static void
53testsuite_teardown(void)

Callers

nothing calls this directly

Calls 3

snprintfFunction · 0.85
rte_vdev_initFunction · 0.85
rte_bbdev_countFunction · 0.85

Tested by

no test coverage detected