[PATCH 21.11.1 v1] test/crypto: skip oop test for raw api

Kevin Traynor ktraynor at redhat.com
Mon Apr 25 16:28:20 CEST 2022


On 14/04/2022 18:23, Kai Ji wrote:
> Add in api test type check to skip unsupported aead OOP testcase
> in raw API test.
> 
> Fixes: cd8166c28cd1 ("test/crypto: add raw API test for dpaax")
> Cc: hemant.agrawal at nxp.com
> 
> Signed-off-by: Kai Ji <kai.ji at intel.com>
> Tested-by: Poczatek, Jakub <jakub.poczatek at intel.com>
> ---
>   app/test/test_cryptodev.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> index 16431efc88..4eedc8e198 100644
> --- a/app/test/test_cryptodev.c
> +++ b/app/test/test_cryptodev.c
> @@ -10547,9 +10547,16 @@ test_authenticated_encryption_oop(const struct aead_test_data *tdata)
>   	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
>   	uint64_t feat_flags = dev_info.feature_flags;
>   
> +	/* not supported with CPU crypto and raw data-path APIs*/
> +	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO ||
> +			global_api_test_type == CRYPTODEV_RAW_API_TEST)
> +		return TEST_SKIPPED;
> +
>   	if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) &&
> -			(!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP)))
> +			(!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) {
> +		printf("Device does not support RAW data-path APIs.\n");
>   		return TEST_SKIPPED;
> +	}
>   
>   	/* not supported with CPU crypto */
>   	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)

The first if() means that the next two are dead code, and that means 
there is a log added that never gets printed. So need to remove 
duplicate and decide on order of checks and whether you want the log.



More information about the stable mailing list