[PATCH v2 4/6] test/dmadev: check result for device stop
Bruce Richardson
bruce.richardson at intel.com
Mon Jan 16 18:37:35 CET 2023
The DMA device stop API can return an error value so check that return
value when running dmadev unit tests.
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
app/test/test_dmadev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index fe62e98af8..4e1dbcaa19 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -837,7 +837,11 @@ test_dmadev_instance(int16_t dev_id)
goto err;
rte_mempool_free(pool);
- rte_dma_stop(dev_id);
+
+ if (rte_dma_stop(dev_id) < 0) {
+ rte_mempool_free(pool);
+ ERR_RETURN("Error stopping device %u\n", dev_id);
+ }
rte_dma_stats_reset(dev_id, vchan);
return 0;
--
2.37.2
More information about the dev
mailing list