[dpdk-dev] [PATCH v2 1/3] test/crypto: add more AES GCM tests for QAT PMD
Trahe, Fiona
fiona.trahe at intel.com
Thu Oct 3 14:41:58 CEST 2019
Hi Adam,
> -----Original Message-----
> From: Dybkowski, AdamX
> Sent: Friday, September 27, 2019 4:48 PM
> To: dev at dpdk.org; Trahe, Fiona <fiona.trahe at intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal at intel.com>; akhil.goyal at nxp.com
> Cc: Dybkowski, AdamX <adamx.dybkowski at intel.com>
> Subject: [PATCH v2 1/3] test/crypto: add more AES GCM tests for QAT PMD
>
> This patch adds 256-bit AES GCM tests for QAT PMD
> (which already existed for AESNI and OpenSSL) and also adds
> a number of negative unit tests for AES GCM for QAT PMD, in order
> to verify authenticated encryption and decryption with modified data.
>
> Signed-off-by: Adam Dybkowski <adamx.dybkowski at intel.com>
> ---
These are a great set of tests to add, thanks.
However, I find the silent terminology misleading. as the fn is not silent, other errors may print, debug may print and depending on the flag passed in the compare error may print.
Also, if the test fails for some other reason than the one it should, this will be missed.
What you want to do is catch specific expected errors so I'd suggest following:
leave test_authenticated_encryption() name as is.
Add a fail_expected enum to crypto_unittest_params, with elements like NONE, DIGEST_CORRUPT, ENCRYPTED_DATA_CORRUPT, UNENCRYPTED_DATA_CORRUPT
Don't suppress the errors, instead in wrapper fns, print "Negative test - errors are expected" at top of each negative test, corrupt the input and set the appropriate fail.
In test_authenticated_encryption() and test_authenticated_encryption() use the enum to check for the expected failure.
Does that make sense?
More information about the dev
mailing list