[dpdk-dev] [PATCH v16 7/9] dma/skeleton: add test cases

Bruce Richardson bruce.richardson at intel.com
Mon Aug 23 16:03:42 CEST 2021


On Mon, Aug 23, 2021 at 11:31:32AM +0800, Chengwen Feng wrote:
> Patch introduces dmadev unit testcase for validation against the
> skeleton dmadev PMD implementation.
> 
> Test cases are added along with the skeleton driver implementation.
> It can be enabled by using vdev argument to any DPDK binary:
> 
> 	--vdev="dma_skeleton,selftest=1"
> 
> In case 'selftest=1' is not provided, autotest doesn't execute the
> test cases but the vdev is still available for application use.
> 
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> ---

Having self-tests was useful for rawdev implementations as each rawdev was
(potentially) a completely different device type so no common set of tests
could really be written for them. However, for dmadev, we have a common set
of functions and APIs, so I think that the tests provided here should be in
a general test-case set.

We are preparing to upstream a test suite for DMA devices, based off the
work we have in progress on our own drivers, and we'll look to include some
of the tests from here in that for consistency.  Please wait for that set -
hopefully appearing the next day or two - before doing additional work on
this set, as our set includes quite a comprehensive set of functional tests
in it, which would go well with the API tests here.

In terms of the skeleton dmadev itself, I'm not fully convinced of its
usefulness, but it does allow unit testing of the APIs in the absense of
dma device hardware. Whether that utility is worth the maintenance cost,
though, I'm not sure.

Regards,
/Bruce


More information about the dev mailing list