DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] fix return value for skipped tests
@ 2019-04-09 11:33 Ayuj Verma
  2019-04-09 11:33 ` Ayuj Verma
  2019-04-09 11:33 ` [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP Ayuj Verma
  0 siblings, 2 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-09 11:33 UTC (permalink / raw)
  To: akhil.goyal, fiona.trahe, arkadiuszx.kusztal, pablo.de.lara.guarch
  Cc: shallyv, ssahu, kkotamarthy, adesai, dev, Ayuj Verma

Currently some tests return TEST_SKIPPED/-1 when tests or params
are not supported for particular PMD because of which tests adds to
FAILED test counter in place of Skipped/Unsupported counter.

Since unsupported test is not a failure case,
replace return value TEST_SKIPPED/-1 with -ENOTSUP

Changes in v2:
        - Replace TEST_SKIPPED/-1 with -ENOTSUP

Ayuj Verma (1):
  app/test: replace TEST_SKIPPED with -ENOTSUP

 app/test/test_cryptodev_asym.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
1.8.3.1

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

* [dpdk-dev] [PATCH v2] fix return value for skipped tests
  2019-04-09 11:33 [dpdk-dev] [PATCH v2] fix return value for skipped tests Ayuj Verma
@ 2019-04-09 11:33 ` Ayuj Verma
  2019-04-09 11:33 ` [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP Ayuj Verma
  1 sibling, 0 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-09 11:33 UTC (permalink / raw)
  To: akhil.goyal, fiona.trahe, arkadiuszx.kusztal, pablo.de.lara.guarch
  Cc: shallyv, ssahu, kkotamarthy, adesai, dev, Ayuj Verma

Currently some tests return TEST_SKIPPED/-1 when tests or params
are not supported for particular PMD because of which tests adds to
FAILED test counter in place of Skipped/Unsupported counter.

Since unsupported test is not a failure case,
replace return value TEST_SKIPPED/-1 with -ENOTSUP

Changes in v2:
        - Replace TEST_SKIPPED/-1 with -ENOTSUP

Ayuj Verma (1):
  app/test: replace TEST_SKIPPED with -ENOTSUP

 app/test/test_cryptodev_asym.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
1.8.3.1


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

* [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 11:33 [dpdk-dev] [PATCH v2] fix return value for skipped tests Ayuj Verma
  2019-04-09 11:33 ` Ayuj Verma
@ 2019-04-09 11:33 ` Ayuj Verma
  2019-04-09 11:33   ` Ayuj Verma
                     ` (2 more replies)
  1 sibling, 3 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-09 11:33 UTC (permalink / raw)
  To: akhil.goyal, fiona.trahe, arkadiuszx.kusztal, pablo.de.lara.guarch
  Cc: shallyv, ssahu, kkotamarthy, adesai, dev, Ayuj Verma

Return -ENOTSUP for unsupported tests

Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
---
 app/test/test_cryptodev_asym.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index d2efce9..feed3a8 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -352,7 +352,7 @@ struct test_cases_array {
 		RTE_LOG(INFO, USER1,
 				"Device doesn't support sign op with "
 				"exponent key type. Test Skipped\n");
-		return TEST_SKIPPED;
+		return -ENOTSUP;
 	}
 
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
@@ -498,7 +498,7 @@ struct test_cases_array {
 		RTE_LOG(INFO, USER1,
 				"Device doesn't support sign op with "
 				"exponent key type. Test Skipped\n");
-		return TEST_SKIPPED;
+		return -ENOTSUP;
 	}
 
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
@@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
 		&modinv_xform.xform_type, "modinv") < 0) {
 		RTE_LOG(ERR, USER1,
 				 "Invalid ASYNC algorithm specified\n");
-		return -1;
+		return -ENOTSUP;
 	}
 
 	cap_idx.type = modinv_xform.xform_type;
@@ -1273,7 +1273,7 @@ static inline void print_asym_capa(
 		modinv_xform.modinv.modulus.length)) {
 		RTE_LOG(ERR, USER1,
 				 "Invalid MODULOUS length specified\n");
-				return -1;
+				return -ENOTSUP;
 		}
 
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
@@ -1380,7 +1380,7 @@ static inline void print_asym_capa(
 		< 0) {
 		RTE_LOG(ERR, USER1,
 				"Invalid ASYNC algorithm specified\n");
-		return -1;
+		return -ENOTSUP;
 	}
 
 	/* check for modlen capability */
@@ -1391,7 +1391,7 @@ static inline void print_asym_capa(
 			capability, modex_xform.modex.modulus.length)) {
 		RTE_LOG(ERR, USER1,
 				"Invalid MODULOUS length specified\n");
-				return -1;
+				return -ENOTSUP;
 		}
 
 	/* generate crypto op data structure */
-- 
1.8.3.1

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

* [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 11:33 ` [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP Ayuj Verma
@ 2019-04-09 11:33   ` Ayuj Verma
  2019-04-09 14:55   ` Bruce Richardson
  2019-04-09 15:17   ` [dpdk-dev] " Trahe, Fiona
  2 siblings, 0 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-09 11:33 UTC (permalink / raw)
  To: akhil.goyal, fiona.trahe, arkadiuszx.kusztal, pablo.de.lara.guarch
  Cc: shallyv, ssahu, kkotamarthy, adesai, dev, Ayuj Verma

Return -ENOTSUP for unsupported tests

Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
---
 app/test/test_cryptodev_asym.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index d2efce9..feed3a8 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -352,7 +352,7 @@ struct test_cases_array {
 		RTE_LOG(INFO, USER1,
 				"Device doesn't support sign op with "
 				"exponent key type. Test Skipped\n");
-		return TEST_SKIPPED;
+		return -ENOTSUP;
 	}
 
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
@@ -498,7 +498,7 @@ struct test_cases_array {
 		RTE_LOG(INFO, USER1,
 				"Device doesn't support sign op with "
 				"exponent key type. Test Skipped\n");
-		return TEST_SKIPPED;
+		return -ENOTSUP;
 	}
 
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
@@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
 		&modinv_xform.xform_type, "modinv") < 0) {
 		RTE_LOG(ERR, USER1,
 				 "Invalid ASYNC algorithm specified\n");
-		return -1;
+		return -ENOTSUP;
 	}
 
 	cap_idx.type = modinv_xform.xform_type;
@@ -1273,7 +1273,7 @@ static inline void print_asym_capa(
 		modinv_xform.modinv.modulus.length)) {
 		RTE_LOG(ERR, USER1,
 				 "Invalid MODULOUS length specified\n");
-				return -1;
+				return -ENOTSUP;
 		}
 
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
@@ -1380,7 +1380,7 @@ static inline void print_asym_capa(
 		< 0) {
 		RTE_LOG(ERR, USER1,
 				"Invalid ASYNC algorithm specified\n");
-		return -1;
+		return -ENOTSUP;
 	}
 
 	/* check for modlen capability */
@@ -1391,7 +1391,7 @@ static inline void print_asym_capa(
 			capability, modex_xform.modex.modulus.length)) {
 		RTE_LOG(ERR, USER1,
 				"Invalid MODULOUS length specified\n");
-				return -1;
+				return -ENOTSUP;
 		}
 
 	/* generate crypto op data structure */
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 11:33 ` [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP Ayuj Verma
  2019-04-09 11:33   ` Ayuj Verma
@ 2019-04-09 14:55   ` Bruce Richardson
  2019-04-09 14:55     ` Bruce Richardson
  2019-04-10 12:33     ` [dpdk-dev] [EXT] " Ayuj Verma
  2019-04-09 15:17   ` [dpdk-dev] " Trahe, Fiona
  2 siblings, 2 replies; 16+ messages in thread
From: Bruce Richardson @ 2019-04-09 14:55 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: akhil.goyal, fiona.trahe, arkadiuszx.kusztal,
	pablo.de.lara.guarch, shallyv, ssahu, kkotamarthy, adesai, dev

On Tue, Apr 09, 2019 at 05:03:39PM +0530, Ayuj Verma wrote:
> Return -ENOTSUP for unsupported tests
> 
I disagree with this, since TEST_SKIPPED is the correct return value for
unsupported test conditions IMHO. If part of the current infrastructure
doesn't support that return value, I think the infrastructure should be
updated.

Ref: http://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors

/Bruce

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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 14:55   ` Bruce Richardson
@ 2019-04-09 14:55     ` Bruce Richardson
  2019-04-10 12:33     ` [dpdk-dev] [EXT] " Ayuj Verma
  1 sibling, 0 replies; 16+ messages in thread
From: Bruce Richardson @ 2019-04-09 14:55 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: akhil.goyal, fiona.trahe, arkadiuszx.kusztal,
	pablo.de.lara.guarch, shallyv, ssahu, kkotamarthy, adesai, dev

On Tue, Apr 09, 2019 at 05:03:39PM +0530, Ayuj Verma wrote:
> Return -ENOTSUP for unsupported tests
> 
I disagree with this, since TEST_SKIPPED is the correct return value for
unsupported test conditions IMHO. If part of the current infrastructure
doesn't support that return value, I think the infrastructure should be
updated.

Ref: http://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors

/Bruce

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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 11:33 ` [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP Ayuj Verma
  2019-04-09 11:33   ` Ayuj Verma
  2019-04-09 14:55   ` Bruce Richardson
@ 2019-04-09 15:17   ` Trahe, Fiona
  2019-04-09 15:17     ` Trahe, Fiona
  2019-04-12  7:08     ` Ayuj Verma
  2 siblings, 2 replies; 16+ messages in thread
From: Trahe, Fiona @ 2019-04-09 15:17 UTC (permalink / raw)
  To: Ayuj Verma, akhil.goyal, Kusztal, ArkadiuszX, De Lara Guarch, Pablo
  Cc: shallyv, ssahu, kkotamarthy, adesai, dev, Trahe, Fiona

Hi Ayuj,

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Tuesday, April 9, 2019 12:34 PM
> To: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: shallyv@marvell.com; ssahu@marvell.com; kkotamarthy@marvell.com; adesai@marvell.com;
> dev@dpdk.org; Ayuj Verma <ayverma@marvell.com>
> Subject: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
> 
> Return -ENOTSUP for unsupported tests
> 
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index d2efce9..feed3a8 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -352,7 +352,7 @@ struct test_cases_array {
>  		RTE_LOG(INFO, USER1,
>  				"Device doesn't support sign op with "
>  				"exponent key type. Test Skipped\n");
> -		return TEST_SKIPPED;
> +		return -ENOTSUP;
>  	}
> 
>  	sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -498,7 +498,7 @@ struct test_cases_array {
>  		RTE_LOG(INFO, USER1,
>  				"Device doesn't support sign op with "
>  				"exponent key type. Test Skipped\n");
> -		return TEST_SKIPPED;
> +		return -ENOTSUP;
>  	}
> 
>  	sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
>  		&modinv_xform.xform_type, "modinv") < 0) {
>  		RTE_LOG(ERR, USER1,
>  				 "Invalid ASYNC algorithm specified\n");
> -		return -1;
> +		return -ENOTSUP;
[Fiona] this looks more like a test code bug rather than an indication that the device doesn't support modinv. SO should still return -1.
Also - while you're updating, can you please fix the typo in the trace - ASYNC should be ASYMM


>  	}
> 
>  	cap_idx.type = modinv_xform.xform_type;
> @@ -1273,7 +1273,7 @@ static inline void print_asym_capa(
>  		modinv_xform.modinv.modulus.length)) {
>  		RTE_LOG(ERR, USER1,
>  				 "Invalid MODULOUS length specified\n");
> -				return -1;
> +				return -ENOTSUP;
[Fiona] please update the trace to match the return, e.g. something like "modulus length %len not supported by this device" 

>  		}
> 
>  	sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1380,7 +1380,7 @@ static inline void print_asym_capa(
>  		< 0) {
>  		RTE_LOG(ERR, USER1,
>  				"Invalid ASYNC algorithm specified\n");
> -		return -1;
> +		return -ENOTSUP;
>  	}
[Fiona] same as above, i.e. code bug. And typo in trace.
> 
>  	/* check for modlen capability */
> @@ -1391,7 +1391,7 @@ static inline void print_asym_capa(
>  			capability, modex_xform.modex.modulus.length)) {
>  		RTE_LOG(ERR, USER1,
>  				"Invalid MODULOUS length specified\n");
> -				return -1;
> +				return -ENOTSUP;
[Fiona] same as above. Fix trace.


>  		}
> 
>  	/* generate crypto op data structure */
> --
> 1.8.3.1

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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 15:17   ` [dpdk-dev] " Trahe, Fiona
@ 2019-04-09 15:17     ` Trahe, Fiona
  2019-04-12  7:08     ` Ayuj Verma
  1 sibling, 0 replies; 16+ messages in thread
From: Trahe, Fiona @ 2019-04-09 15:17 UTC (permalink / raw)
  To: Ayuj Verma, akhil.goyal, Kusztal, ArkadiuszX, De Lara Guarch, Pablo
  Cc: shallyv, ssahu, kkotamarthy, adesai, dev, Trahe, Fiona

Hi Ayuj,

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Tuesday, April 9, 2019 12:34 PM
> To: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: shallyv@marvell.com; ssahu@marvell.com; kkotamarthy@marvell.com; adesai@marvell.com;
> dev@dpdk.org; Ayuj Verma <ayverma@marvell.com>
> Subject: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
> 
> Return -ENOTSUP for unsupported tests
> 
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index d2efce9..feed3a8 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -352,7 +352,7 @@ struct test_cases_array {
>  		RTE_LOG(INFO, USER1,
>  				"Device doesn't support sign op with "
>  				"exponent key type. Test Skipped\n");
> -		return TEST_SKIPPED;
> +		return -ENOTSUP;
>  	}
> 
>  	sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -498,7 +498,7 @@ struct test_cases_array {
>  		RTE_LOG(INFO, USER1,
>  				"Device doesn't support sign op with "
>  				"exponent key type. Test Skipped\n");
> -		return TEST_SKIPPED;
> +		return -ENOTSUP;
>  	}
> 
>  	sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
>  		&modinv_xform.xform_type, "modinv") < 0) {
>  		RTE_LOG(ERR, USER1,
>  				 "Invalid ASYNC algorithm specified\n");
> -		return -1;
> +		return -ENOTSUP;
[Fiona] this looks more like a test code bug rather than an indication that the device doesn't support modinv. SO should still return -1.
Also - while you're updating, can you please fix the typo in the trace - ASYNC should be ASYMM


>  	}
> 
>  	cap_idx.type = modinv_xform.xform_type;
> @@ -1273,7 +1273,7 @@ static inline void print_asym_capa(
>  		modinv_xform.modinv.modulus.length)) {
>  		RTE_LOG(ERR, USER1,
>  				 "Invalid MODULOUS length specified\n");
> -				return -1;
> +				return -ENOTSUP;
[Fiona] please update the trace to match the return, e.g. something like "modulus length %len not supported by this device" 

>  		}
> 
>  	sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1380,7 +1380,7 @@ static inline void print_asym_capa(
>  		< 0) {
>  		RTE_LOG(ERR, USER1,
>  				"Invalid ASYNC algorithm specified\n");
> -		return -1;
> +		return -ENOTSUP;
>  	}
[Fiona] same as above, i.e. code bug. And typo in trace.
> 
>  	/* check for modlen capability */
> @@ -1391,7 +1391,7 @@ static inline void print_asym_capa(
>  			capability, modex_xform.modex.modulus.length)) {
>  		RTE_LOG(ERR, USER1,
>  				"Invalid MODULOUS length specified\n");
> -				return -1;
> +				return -ENOTSUP;
[Fiona] same as above. Fix trace.


>  		}
> 
>  	/* generate crypto op data structure */
> --
> 1.8.3.1


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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 14:55   ` Bruce Richardson
  2019-04-09 14:55     ` Bruce Richardson
@ 2019-04-10 12:33     ` Ayuj Verma
  2019-04-10 12:33       ` Ayuj Verma
  2019-04-10 12:48       ` Bruce Richardson
  1 sibling, 2 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-10 12:33 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: akhil.goyal, fiona.trahe, arkadiuszx.kusztal,
	pablo.de.lara.guarch, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Bruce,


Have you gone through patch-set v1<http://mails.dpdk.org/archives/dev/2019-April/128407.html>

What's your opinion on them.


Thanks and regards

Ayuj Verma


________________________________
From: Bruce Richardson <bruce.richardson@intel.com>
Sent: 09 April 2019 20:25:32
To: Ayuj Verma
Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; arkadiuszx.kusztal@intel.com; pablo.de.lara.guarch@intel.com; Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org
Subject: [EXT] Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP

External Email

----------------------------------------------------------------------
On Tue, Apr 09, 2019 at 05:03:39PM +0530, Ayuj Verma wrote:
> Return -ENOTSUP for unsupported tests
>
I disagree with this, since TEST_SKIPPED is the correct return value for
unsupported test conditions IMHO. If part of the current infrastructure
doesn't support that return value, I think the infrastructure should be
updated.

Ref: http://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors

/Bruce

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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-10 12:33     ` [dpdk-dev] [EXT] " Ayuj Verma
@ 2019-04-10 12:33       ` Ayuj Verma
  2019-04-10 12:48       ` Bruce Richardson
  1 sibling, 0 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-10 12:33 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: akhil.goyal, fiona.trahe, arkadiuszx.kusztal,
	pablo.de.lara.guarch, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Bruce,


Have you gone through patch-set v1<http://mails.dpdk.org/archives/dev/2019-April/128407.html>

What's your opinion on them.


Thanks and regards

Ayuj Verma


________________________________
From: Bruce Richardson <bruce.richardson@intel.com>
Sent: 09 April 2019 20:25:32
To: Ayuj Verma
Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; arkadiuszx.kusztal@intel.com; pablo.de.lara.guarch@intel.com; Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org
Subject: [EXT] Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP

External Email

----------------------------------------------------------------------
On Tue, Apr 09, 2019 at 05:03:39PM +0530, Ayuj Verma wrote:
> Return -ENOTSUP for unsupported tests
>
I disagree with this, since TEST_SKIPPED is the correct return value for
unsupported test conditions IMHO. If part of the current infrastructure
doesn't support that return value, I think the infrastructure should be
updated.

Ref: http://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors

/Bruce

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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-10 12:33     ` [dpdk-dev] [EXT] " Ayuj Verma
  2019-04-10 12:33       ` Ayuj Verma
@ 2019-04-10 12:48       ` Bruce Richardson
  2019-04-10 12:48         ` Bruce Richardson
  1 sibling, 1 reply; 16+ messages in thread
From: Bruce Richardson @ 2019-04-10 12:48 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: akhil.goyal, fiona.trahe, arkadiuszx.kusztal,
	pablo.de.lara.guarch, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

On Wed, Apr 10, 2019 at 12:33:23PM +0000, Ayuj Verma wrote:
>    Hi Bruce,
> 
>    Have you gone through patch-set [1]v1 
> 
>    What's your opinion on them.
> 
>    Thanks and regards
> 
>    Ayuj Verma

Looked at http://mails.dpdk.org/archives/dev/2019-April/128407.html

I like the idea of tracking the skips, and I suggest you go further and
actually track the -ENOTSUP errors as skips too. I don't see any change in
the reported output in that patch though - how are the skips reported if at
all?

/Bruce

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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-10 12:48       ` Bruce Richardson
@ 2019-04-10 12:48         ` Bruce Richardson
  0 siblings, 0 replies; 16+ messages in thread
From: Bruce Richardson @ 2019-04-10 12:48 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: akhil.goyal, fiona.trahe, arkadiuszx.kusztal,
	pablo.de.lara.guarch, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

On Wed, Apr 10, 2019 at 12:33:23PM +0000, Ayuj Verma wrote:
>    Hi Bruce,
> 
>    Have you gone through patch-set [1]v1 
> 
>    What's your opinion on them.
> 
>    Thanks and regards
> 
>    Ayuj Verma

Looked at http://mails.dpdk.org/archives/dev/2019-April/128407.html

I like the idea of tracking the skips, and I suggest you go further and
actually track the -ENOTSUP errors as skips too. I don't see any change in
the reported output in that patch though - how are the skips reported if at
all?

/Bruce

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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-09 15:17   ` [dpdk-dev] " Trahe, Fiona
  2019-04-09 15:17     ` Trahe, Fiona
@ 2019-04-12  7:08     ` Ayuj Verma
  2019-04-12  7:08       ` Ayuj Verma
  2019-04-12 10:25       ` Trahe, Fiona
  1 sibling, 2 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-12  7:08 UTC (permalink / raw)
  To: Trahe, Fiona, akhil.goyal, Kusztal, ArkadiuszX, De Lara Guarch, Pablo
  Cc: Shally Verma, Sunila Sahu, Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Fiona,


Please see inline.


Thanks and regards

Ayuj Verma


________________________________
From: Trahe, Fiona <fiona.trahe@intel.com>
Sent: 09 April 2019 20:47
To: Ayuj Verma; akhil.goyal@nxp.com; Kusztal, ArkadiuszX; De Lara Guarch, Pablo
Cc: Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org; Trahe, Fiona
Subject: RE: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP

Hi Ayuj,

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Tuesday, April 9, 2019 12:34 PM
> To: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: shallyv@marvell.com; ssahu@marvell.com; kkotamarthy@marvell.com; adesai@marvell.com;
> dev@dpdk.org; Ayuj Verma <ayverma@marvell.com>
> Subject: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
>
> Return -ENOTSUP for unsupported tests
>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index d2efce9..feed3a8 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -352,7 +352,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -498,7 +498,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
>                &modinv_xform.xform_type, "modinv") < 0) {
>                RTE_LOG(ERR, USER1,
>                                 "Invalid ASYNC algorithm specified\n");
> -             return -1;
> +             return -ENOTSUP;
[Fiona] this looks more like a test code bug rather than an indication that the device doesn't support modinv. SO should still return -1.
Also - while you're updating, can you please fix the typo in the trace - ASYNC should be ASYMM

[Ayuj]  Each test execute if device supports that algorithm else it is skipped. Thus, here it checks if modinv is not supported in capability then skip the test, which looks okay to me.

So, why do you say it is a bug?

Probably message is not proper should have been "Device doesn't support MODINV"

Will update typo.


>        }
>
>        cap_idx.type = modinv_xform.xform_type;
> @@ -1273,7 +1273,7 @@ static inline void print_asym_capa(
>                modinv_xform.modinv.modulus.length)) {
>                RTE_LOG(ERR, USER1,
>                                 "Invalid MODULOUS length specified\n");
> -                             return -1;
> +                             return -ENOTSUP;
[Fiona] please update the trace to match the return, e.g. something like "modulus length %len not supported by this device"
[Ayuj] Sure.
>                }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1380,7 +1380,7 @@ static inline void print_asym_capa(
>                < 0) {
>                RTE_LOG(ERR, USER1,
>                                "Invalid ASYNC algorithm specified\n");
> -             return -1;
> +             return -ENOTSUP;
>        }
[Fiona] same as above, i.e. code bug. And typo in trace.
>
>        /* check for modlen capability */
> @@ -1391,7 +1391,7 @@ static inline void print_asym_capa(
>                        capability, modex_xform.modex.modulus.length)) {
>                RTE_LOG(ERR, USER1,
>                                "Invalid MODULOUS length specified\n");
> -                             return -1;
> +                             return -ENOTSUP;
[Fiona] same as above. Fix trace.


>                }
>
>        /* generate crypto op data structure */
> --
> 1.8.3.1

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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-12  7:08     ` Ayuj Verma
@ 2019-04-12  7:08       ` Ayuj Verma
  2019-04-12 10:25       ` Trahe, Fiona
  1 sibling, 0 replies; 16+ messages in thread
From: Ayuj Verma @ 2019-04-12  7:08 UTC (permalink / raw)
  To: Trahe, Fiona, akhil.goyal, Kusztal, ArkadiuszX, De Lara Guarch, Pablo
  Cc: Shally Verma, Sunila Sahu, Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Fiona,


Please see inline.


Thanks and regards

Ayuj Verma


________________________________
From: Trahe, Fiona <fiona.trahe@intel.com>
Sent: 09 April 2019 20:47
To: Ayuj Verma; akhil.goyal@nxp.com; Kusztal, ArkadiuszX; De Lara Guarch, Pablo
Cc: Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org; Trahe, Fiona
Subject: RE: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP

Hi Ayuj,

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Tuesday, April 9, 2019 12:34 PM
> To: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: shallyv@marvell.com; ssahu@marvell.com; kkotamarthy@marvell.com; adesai@marvell.com;
> dev@dpdk.org; Ayuj Verma <ayverma@marvell.com>
> Subject: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
>
> Return -ENOTSUP for unsupported tests
>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index d2efce9..feed3a8 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -352,7 +352,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -498,7 +498,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
>                &modinv_xform.xform_type, "modinv") < 0) {
>                RTE_LOG(ERR, USER1,
>                                 "Invalid ASYNC algorithm specified\n");
> -             return -1;
> +             return -ENOTSUP;
[Fiona] this looks more like a test code bug rather than an indication that the device doesn't support modinv. SO should still return -1.
Also - while you're updating, can you please fix the typo in the trace - ASYNC should be ASYMM

[Ayuj]  Each test execute if device supports that algorithm else it is skipped. Thus, here it checks if modinv is not supported in capability then skip the test, which looks okay to me.

So, why do you say it is a bug?

Probably message is not proper should have been "Device doesn't support MODINV"

Will update typo.


>        }
>
>        cap_idx.type = modinv_xform.xform_type;
> @@ -1273,7 +1273,7 @@ static inline void print_asym_capa(
>                modinv_xform.modinv.modulus.length)) {
>                RTE_LOG(ERR, USER1,
>                                 "Invalid MODULOUS length specified\n");
> -                             return -1;
> +                             return -ENOTSUP;
[Fiona] please update the trace to match the return, e.g. something like "modulus length %len not supported by this device"
[Ayuj] Sure.
>                }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1380,7 +1380,7 @@ static inline void print_asym_capa(
>                < 0) {
>                RTE_LOG(ERR, USER1,
>                                "Invalid ASYNC algorithm specified\n");
> -             return -1;
> +             return -ENOTSUP;
>        }
[Fiona] same as above, i.e. code bug. And typo in trace.
>
>        /* check for modlen capability */
> @@ -1391,7 +1391,7 @@ static inline void print_asym_capa(
>                        capability, modex_xform.modex.modulus.length)) {
>                RTE_LOG(ERR, USER1,
>                                "Invalid MODULOUS length specified\n");
> -                             return -1;
> +                             return -ENOTSUP;
[Fiona] same as above. Fix trace.


>                }
>
>        /* generate crypto op data structure */
> --
> 1.8.3.1


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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-12  7:08     ` Ayuj Verma
  2019-04-12  7:08       ` Ayuj Verma
@ 2019-04-12 10:25       ` Trahe, Fiona
  2019-04-12 10:25         ` Trahe, Fiona
  1 sibling, 1 reply; 16+ messages in thread
From: Trahe, Fiona @ 2019-04-12 10:25 UTC (permalink / raw)
  To: Ayuj Verma, akhil.goyal, Kusztal, ArkadiuszX, De Lara Guarch, Pablo
  Cc: Shally Verma, Sunila Sahu, Kanaka Durga Kotamarthy, Arvind Desai,
	dev, Trahe, Fiona

Hi Ayuj

From: Ayuj Verma [mailto:ayverma@marvell.com]
Sent: Friday, April 12, 2019 8:08 AM
To: Trahe, Fiona <fiona.trahe@intel.com>; akhil.goyal@nxp.com; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Cc: Shally Verma <shallyv@marvell.com>; Sunila Sahu <ssahu@marvell.com>; Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>; Arvind Desai <adesai@marvell.com>; dev@dpdk.org
Subject: Re: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP


Hi Fiona,



Please see inline.



Thanks and regards

Ayuj Verma

________________________________
From: Trahe, Fiona <fiona.trahe@intel.com<mailto:fiona.trahe@intel.com>>
Sent: 09 April 2019 20:47
To: Ayuj Verma; akhil.goyal@nxp.com<mailto:akhil.goyal@nxp.com>; Kusztal, ArkadiuszX; De Lara Guarch, Pablo
Cc: Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org<mailto:dev@dpdk.org>; Trahe, Fiona
Subject: RE: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP

Hi Ayuj,

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Tuesday, April 9, 2019 12:34 PM
> To: akhil.goyal@nxp.com<mailto:akhil.goyal@nxp.com>; Trahe, Fiona <fiona.trahe@intel.com<mailto:fiona.trahe@intel.com>>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com<mailto:arkadiuszx.kusztal@intel.com>>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
> Cc: shallyv@marvell.com<mailto:shallyv@marvell.com>; ssahu@marvell.com<mailto:ssahu@marvell.com>; kkotamarthy@marvell.com<mailto:kkotamarthy@marvell.com>; adesai@marvell.com<mailto:adesai@marvell.com>;
> dev@dpdk.org<mailto:dev@dpdk.org>; Ayuj Verma <ayverma@marvell.com<mailto:ayverma@marvell.com>>
> Subject: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
>
> Return -ENOTSUP for unsupported tests
>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com<mailto:ayverma@marvell.com>>
> Signed-off-by: Shally Verma <shallyv@marvell.com<mailto:shallyv@marvell.com>>
> ---
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index d2efce9..feed3a8 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -352,7 +352,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -498,7 +498,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
>                &modinv_xform.xform_type, "modinv") < 0) {
>                RTE_LOG(ERR, USER1,
>                                 "Invalid ASYNC algorithm specified\n");
> -             return -1;
> +             return -ENOTSUP;
[Fiona] this looks more like a test code bug rather than an indication that the device doesn't support modinv. SO should still return -1.
Also - while you're updating, can you please fix the typo in the trace - ASYNC should be ASYMM

[Ayuj]  Each test execute if device supports that algorithm else it is skipped. Thus, here it checks if modinv is not supported in capability then skip the test, which looks okay to me.

So, why do you say it is a bug?
Probably message is not proper should have been "Device doesn't support MODINV"

Will update typo.

[Fiona] This is checking that the "modinv" string matches an element in the API enum. It's not checking anything to do with the device.

The device capability is retrieved by the following line:
capability = rte_cryptodev_asym_capability_get(dev_id,

                                                                    &cap_idx);

But actually is not checked. It should have a NULL check before moving on to the len check,

Else there can be a segfault in the len check function.

Can you add that NULL check please - and that should return -ENOTSUP.

Same with the modex test.

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

* Re: [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
  2019-04-12 10:25       ` Trahe, Fiona
@ 2019-04-12 10:25         ` Trahe, Fiona
  0 siblings, 0 replies; 16+ messages in thread
From: Trahe, Fiona @ 2019-04-12 10:25 UTC (permalink / raw)
  To: Ayuj Verma, akhil.goyal, Kusztal, ArkadiuszX, De Lara Guarch, Pablo
  Cc: Shally Verma, Sunila Sahu, Kanaka Durga Kotamarthy, Arvind Desai,
	dev, Trahe, Fiona

Hi Ayuj

From: Ayuj Verma [mailto:ayverma@marvell.com]
Sent: Friday, April 12, 2019 8:08 AM
To: Trahe, Fiona <fiona.trahe@intel.com>; akhil.goyal@nxp.com; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Cc: Shally Verma <shallyv@marvell.com>; Sunila Sahu <ssahu@marvell.com>; Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>; Arvind Desai <adesai@marvell.com>; dev@dpdk.org
Subject: Re: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP


Hi Fiona,



Please see inline.



Thanks and regards

Ayuj Verma

________________________________
From: Trahe, Fiona <fiona.trahe@intel.com<mailto:fiona.trahe@intel.com>>
Sent: 09 April 2019 20:47
To: Ayuj Verma; akhil.goyal@nxp.com<mailto:akhil.goyal@nxp.com>; Kusztal, ArkadiuszX; De Lara Guarch, Pablo
Cc: Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org<mailto:dev@dpdk.org>; Trahe, Fiona
Subject: RE: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP

Hi Ayuj,

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Tuesday, April 9, 2019 12:34 PM
> To: akhil.goyal@nxp.com<mailto:akhil.goyal@nxp.com>; Trahe, Fiona <fiona.trahe@intel.com<mailto:fiona.trahe@intel.com>>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com<mailto:arkadiuszx.kusztal@intel.com>>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
> Cc: shallyv@marvell.com<mailto:shallyv@marvell.com>; ssahu@marvell.com<mailto:ssahu@marvell.com>; kkotamarthy@marvell.com<mailto:kkotamarthy@marvell.com>; adesai@marvell.com<mailto:adesai@marvell.com>;
> dev@dpdk.org<mailto:dev@dpdk.org>; Ayuj Verma <ayverma@marvell.com<mailto:ayverma@marvell.com>>
> Subject: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
>
> Return -ENOTSUP for unsupported tests
>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com<mailto:ayverma@marvell.com>>
> Signed-off-by: Shally Verma <shallyv@marvell.com<mailto:shallyv@marvell.com>>
> ---
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index d2efce9..feed3a8 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -352,7 +352,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -498,7 +498,7 @@ struct test_cases_array {
>                RTE_LOG(INFO, USER1,
>                                "Device doesn't support sign op with "
>                                "exponent key type. Test Skipped\n");
> -             return TEST_SKIPPED;
> +             return -ENOTSUP;
>        }
>
>        sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
>                &modinv_xform.xform_type, "modinv") < 0) {
>                RTE_LOG(ERR, USER1,
>                                 "Invalid ASYNC algorithm specified\n");
> -             return -1;
> +             return -ENOTSUP;
[Fiona] this looks more like a test code bug rather than an indication that the device doesn't support modinv. SO should still return -1.
Also - while you're updating, can you please fix the typo in the trace - ASYNC should be ASYMM

[Ayuj]  Each test execute if device supports that algorithm else it is skipped. Thus, here it checks if modinv is not supported in capability then skip the test, which looks okay to me.

So, why do you say it is a bug?
Probably message is not proper should have been "Device doesn't support MODINV"

Will update typo.

[Fiona] This is checking that the "modinv" string matches an element in the API enum. It's not checking anything to do with the device.

The device capability is retrieved by the following line:
capability = rte_cryptodev_asym_capability_get(dev_id,

                                                                    &cap_idx);

But actually is not checked. It should have a NULL check before moving on to the len check,

Else there can be a segfault in the len check function.

Can you add that NULL check please - and that should return -ENOTSUP.

Same with the modex test.

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

end of thread, other threads:[~2019-04-12 10:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 11:33 [dpdk-dev] [PATCH v2] fix return value for skipped tests Ayuj Verma
2019-04-09 11:33 ` Ayuj Verma
2019-04-09 11:33 ` [dpdk-dev] [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP Ayuj Verma
2019-04-09 11:33   ` Ayuj Verma
2019-04-09 14:55   ` Bruce Richardson
2019-04-09 14:55     ` Bruce Richardson
2019-04-10 12:33     ` [dpdk-dev] [EXT] " Ayuj Verma
2019-04-10 12:33       ` Ayuj Verma
2019-04-10 12:48       ` Bruce Richardson
2019-04-10 12:48         ` Bruce Richardson
2019-04-09 15:17   ` [dpdk-dev] " Trahe, Fiona
2019-04-09 15:17     ` Trahe, Fiona
2019-04-12  7:08     ` Ayuj Verma
2019-04-12  7:08       ` Ayuj Verma
2019-04-12 10:25       ` Trahe, Fiona
2019-04-12 10:25         ` Trahe, Fiona

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).