test/crypto: refactor to use sub test suites
authorCiara Power <ciara.power@intel.com>
Wed, 12 May 2021 11:36:51 +0000 (11:36 +0000)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 12 May 2021 14:17:07 +0000 (16:17 +0200)
commit8bfdd8a7f0f1c92192a0f7c5793722ff21ae3471
tree016a7ed4956bd850d460ad1655456ba01dffd51e
parentfbc5367550cb149bb83a7d9c727ecda6582333cd
test/crypto: refactor to use sub test suites

The existing implementation runs a giant cryptodev testsuite for most
autotests, which in turns runs one setup function regardless of device.

This is now broken down into multiple testsuites,
that are used as sub-testsuites. Each autotest runs a general crypto
parent test suite, to which the sub-testsuites are added.

For example, the AESNI_MB test runs "Cryptodev Unit Test Suite",
which has a setup function only to configure testsuite params.
Creation of vdevs in the setup function is no longer supported,
it is expected the user does this when running the app.
This autotest previously just ran the cryptodev_testsuite,
but now has the smaller sub-testsuites added to the parent suite instead.
The same test cases are being run as before.

The scheduler autotest creates its own parent testsuite with nested
sub-testsuites, rather than using the cryptodev testsuite mentioned above.
This is due to it being more complex in execution,
by requiring setting different modes before running tests.
The scheduler autotest no longer requires the extra test cases to
attach/set mode/detach when running the blockcipher test cases for
each mode. The attach/set mode/detach functionality is now tested in a
sub-testsuite. When running the sub-testsuites for each mode,
the attach/set mode/detach happens in the setup and teardown functions
for that sub-testsuite.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
app/test/test_cryptodev.c
app/test/test_cryptodev.h