| 29 | static uint8_t null_dev_id; |
| 30 | |
| 31 | static int |
| 32 | testsuite_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 | |
| 52 | static void |
| 53 | testsuite_teardown(void) |
nothing calls this directly
no test coverage detected