test_dmadev_setup() aborts the entire "DMA dev instance" test suite
with a hard failure when rte_dma_burst_capacity() reports fewer than
32 descriptors. Some DMA engines expose a small hardware ring; for
example a 32-entry ring that reserves one slot to distinguish a full
ring from an empty one leaves only 31 descriptors usable. Such a
device genuinely cannot run the instance tests, which enqueue 32-deep
bursts, but it should be reported as skipped rather than failed.

Return TEST_SKIPPED instead, matching test_dmadev_burst_setup() which
already skips (rather than fails) when the capacity is below 64.

Signed-off-by: Raghavendra Ningoji <[email protected]>
---
 app/test/test_dmadev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index 5488a1af33..1cfa8c1e10 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -1397,8 +1397,12 @@ test_dmadev_setup(void)
        if (rte_dma_stats_get(dev_id, vchan, &stats) != 0)
                ERR_RETURN("Error with rte_dma_stats_get()\n");
 
-       if (rte_dma_burst_capacity(dev_id, vchan) < 32)
-               ERR_RETURN("Error: Device does not have sufficient burst 
capacity to run tests");
+       if (rte_dma_burst_capacity(dev_id, vchan) < 32) {
+               RTE_LOG(ERR, USER1,
+                       "DMA Dev %u: insufficient burst capacity (32 required), 
skipping tests\n",
+                       dev_id);
+               return TEST_SKIPPED;
+       }
 
        if (stats.completed != 0 || stats.submitted != 0 || stats.errors != 0)
                ERR_RETURN("Error device stats are not all zero: completed = 
%"PRIu64", "
-- 
2.34.1

Reply via email to