| 313 | } |
| 314 | |
| 315 | static int |
| 316 | test_dma_start_stop(void) |
| 317 | { |
| 318 | struct rte_dma_vchan_conf vchan_conf = { 0 }; |
| 319 | struct rte_dma_conf dev_conf = { 0 }; |
| 320 | int ret; |
| 321 | |
| 322 | /* Check for invalid parameters */ |
| 323 | ret = rte_dma_start(invalid_dev_id); |
| 324 | RTE_TEST_ASSERT(ret == -EINVAL, "Expected -EINVAL, %d", ret); |
| 325 | ret = rte_dma_stop(invalid_dev_id); |
| 326 | RTE_TEST_ASSERT(ret == -EINVAL, "Expected -EINVAL, %d", ret); |
| 327 | |
| 328 | /* Setup one vchan for later test */ |
| 329 | ret = setup_one_vchan(); |
| 330 | RTE_TEST_ASSERT_SUCCESS(ret, "Failed to setup one vchan, %d", ret); |
| 331 | |
| 332 | ret = rte_dma_start(test_dev_id); |
| 333 | RTE_TEST_ASSERT_SUCCESS(ret, "Failed to start, %d", ret); |
| 334 | |
| 335 | /* Check reconfigure and vchan setup when device started */ |
| 336 | ret = rte_dma_configure(test_dev_id, &dev_conf); |
| 337 | RTE_TEST_ASSERT(ret == -EBUSY, "Failed to configure, %d", ret); |
| 338 | ret = rte_dma_vchan_setup(test_dev_id, 0, &vchan_conf); |
| 339 | RTE_TEST_ASSERT(ret == -EBUSY, "Failed to setup vchan, %d", ret); |
| 340 | |
| 341 | ret = rte_dma_stop(test_dev_id); |
| 342 | RTE_TEST_ASSERT_SUCCESS(ret, "Failed to stop, %d", ret); |
| 343 | |
| 344 | return TEST_SUCCESS; |
| 345 | } |
| 346 | |
| 347 | static int |
| 348 | test_dma_stats(void) |
nothing calls this directly
no test coverage detected