patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11.1 v1] test/crypto: skip oop test for raw api
@ 2022-04-14 17:23 Kai Ji
  2022-04-25 14:28 ` Kevin Traynor
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Ji @ 2022-04-14 17:23 UTC (permalink / raw)
  To: stable; +Cc: ktraynor, kai.ji, hemant.agrawal

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@nxp.com

Signed-off-by: Kai Ji <kai.ji@intel.com>
Tested-by: Poczatek, Jakub <jakub.poczatek@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)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 21.11.1 v1] test/crypto: skip oop test for raw api
  2022-04-14 17:23 [PATCH 21.11.1 v1] test/crypto: skip oop test for raw api Kai Ji
@ 2022-04-25 14:28 ` Kevin Traynor
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Traynor @ 2022-04-25 14:28 UTC (permalink / raw)
  To: Kai Ji, stable; +Cc: hemant.agrawal

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@nxp.com
> 
> Signed-off-by: Kai Ji <kai.ji@intel.com>
> Tested-by: Poczatek, Jakub <jakub.poczatek@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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-25 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14 17:23 [PATCH 21.11.1 v1] test/crypto: skip oop test for raw api Kai Ji
2022-04-25 14:28 ` Kevin Traynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).