mbox series

[0/1] Refactor crypto unit tests.

Message ID 20191211161015.9845-1-adamx.dybkowski@intel.com (mailing list archive)
Headers
Series Refactor crypto unit tests. |

Message

Dybkowski, AdamX Dec. 11, 2019, 4:10 p.m. UTC
  This patch is a first step to refactor the overly complex symmetric
crypto unit tests. It merges many separate arrays of the tests
for these PMDs: null, aesni_mb, aesni_gcm, openssl, qat, sw_snow3g,
sw_kasumi, sw_zuc into one big array that's then used when running
unit tests on these PMDs.

Individual test functions check the capabilities and execute the rest
of the rest or skip (return -ENOTSUP) based on the particular test
requirements - e.g. test if PMD supports ZUC algo or even a particular
key length in few cases. Few edge cases required to check the PMD
itself (e.g. run on QAT only, or skip on AES NI / AES GCM). 

It's the first step of bigger refactoring. Maintainers of other PMDs
are encouraged to add their PMD unit tests also into this big central
array and remove individual test macro arrays.

This patch doesn't address next refactoring steps to be done in the
future: geting rid of many small (usually 1-2 line) test functions,
created separately for every test case; and simplifying many bigger
functions that currently do similar things but work on different
test vector structures.

Adam Dybkowski (1):
  test/crypto: refactor unit tests into one combined array

 app/test/test_cryptodev.c                  | 16113 +++++++++----------
 app/test/test_cryptodev_blockcipher.c      |     2 +-
 app/test/test_cryptodev_des_test_vectors.h |     6 +-
 3 files changed, 7430 insertions(+), 8691 deletions(-)
  

Comments

Akhil Goyal Dec. 12, 2019, 11:56 a.m. UTC | #1
Hi Adam,

This patch doesn't apply on TOT. Could you please rebase or let us know if some dependent patch is there?

Also, it would be nice if this patch can be broken into smaller patches, as it is blocked by patchworks due to its length and it would be easier to review it. 

Also, please add all crypto PMD owners in CC when you send the next version. This would impact all of them.

Thanks,
Akhil

> -----Original Message-----
> From: Adam Dybkowski <adamx.dybkowski@intel.com>
> Sent: Wednesday, December 11, 2019 9:40 PM
> To: dev@dpdk.org; fiona.trahe@intel.com; Akhil Goyal <akhil.goyal@nxp.com>;
> arkadiuszx.kusztal@intel.com
> Cc: Adam Dybkowski <adamx.dybkowski@intel.com>
> Subject: [PATCH 0/1] Refactor crypto unit tests.
> 
> This patch is a first step to refactor the overly complex symmetric
> crypto unit tests. It merges many separate arrays of the tests
> for these PMDs: null, aesni_mb, aesni_gcm, openssl, qat, sw_snow3g,
> sw_kasumi, sw_zuc into one big array that's then used when running
> unit tests on these PMDs.
> 
> Individual test functions check the capabilities and execute the rest
> of the rest or skip (return -ENOTSUP) based on the particular test
> requirements - e.g. test if PMD supports ZUC algo or even a particular
> key length in few cases. Few edge cases required to check the PMD
> itself (e.g. run on QAT only, or skip on AES NI / AES GCM).
> 
> It's the first step of bigger refactoring. Maintainers of other PMDs
> are encouraged to add their PMD unit tests also into this big central
> array and remove individual test macro arrays.
> 
> This patch doesn't address next refactoring steps to be done in the
> future: geting rid of many small (usually 1-2 line) test functions,
> created separately for every test case; and simplifying many bigger
> functions that currently do similar things but work on different
> test vector structures.
> 
> Adam Dybkowski (1):
>   test/crypto: refactor unit tests into one combined array
> 
>  app/test/test_cryptodev.c                  | 16113 +++++++++----------
>  app/test/test_cryptodev_blockcipher.c      |     2 +-
>  app/test/test_cryptodev_des_test_vectors.h |     6 +-
>  3 files changed, 7430 insertions(+), 8691 deletions(-)
> 
> --
> 2.17.1