DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/crypto: skip unsupported cases
@ 2020-05-20 15:26 akhil.goyal
  2020-05-21  7:52 ` Ruifeng Wang
  2020-07-16 19:07 ` [dpdk-dev] [PATCH v2] " Akhil Goyal
  0 siblings, 2 replies; 7+ messages in thread
From: akhil.goyal @ 2020-05-20 15:26 UTC (permalink / raw)
  To: dev
  Cc: Ruifeng.Wang, declan.doherty, asomalap, anoobj, roy.fan.zhang,
	fiona.trahe, rnagadheeraj, adwivedi, jianjay.zhou,
	pablo.de.lara.guarch, adamx.dybkowski, Akhil Goyal

From: Akhil Goyal <akhil.goyal@nxp.com>

blockcipher cases are either returning TEST_SUCCESS
or TEST_FAILED as status, but the test may not be
supported by the PMD which is also a success case
for the PMD. Hence checking for status == TEST_FAILED
for setting the overall status as failed.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_cryptodev_blockcipher.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 642b549717..d033350659 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -107,7 +107,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 				"Test Skipped.\n");
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 				"SKIPPED");
-			return 0;
+			return TEST_SKIPPED;
 		}
 	}
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
@@ -120,7 +120,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 					"Test Skipped.\n");
 				snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 					"SKIPPED");
-				return 0;
+				return TEST_SKIPPED;
 			}
 		} else {
 			if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
@@ -129,7 +129,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 					"Test Skipped.\n");
 				snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 					"SKIPPED");
-				return 0;
+				return TEST_SKIPPED;
 			}
 		}
 
@@ -146,7 +146,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 				"Test Skipped.\n");
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 				"SKIPPED");
-			return 0;
+			return TEST_SKIPPED;
 		}
 	}
 
@@ -163,7 +163,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 			"Device does not support this algorithm."
 			"Test Skipped.\n");
 		snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED");
-		return 0;
+		return TEST_SKIPPED;
 	}
 
 	/* preparing data */
@@ -435,6 +435,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 				init_xform, sess_priv_mpool);
 		if (status == -ENOTSUP) {
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "UNSUPPORTED");
+			status = TEST_SKIPPED;
 			goto error_exit;
 		}
 		if (!sess || status < 0) {
@@ -780,7 +781,7 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
 		printf("  %u) TestCase %s %s\n", test_index ++,
 			tc->test_descr, test_msg);
 
-		if (status != TEST_SUCCESS) {
+		if (status == TEST_FAILED) {
 			if (overall_status == TEST_SUCCESS)
 				overall_status = status;
 
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] test/crypto: skip unsupported cases
  2020-05-20 15:26 [dpdk-dev] [PATCH] test/crypto: skip unsupported cases akhil.goyal
@ 2020-05-21  7:52 ` Ruifeng Wang
  2020-07-16 19:07 ` [dpdk-dev] [PATCH v2] " Akhil Goyal
  1 sibling, 0 replies; 7+ messages in thread
From: Ruifeng Wang @ 2020-05-21  7:52 UTC (permalink / raw)
  To: Akhil.goyal, dev
  Cc: declan.doherty, asomalap, anoobj, roy.fan.zhang, fiona.trahe,
	rnagadheeraj, adwivedi, jianjay.zhou, pablo.de.lara.guarch,
	adamx.dybkowski, Akhil.goyal


> -----Original Message-----
> From: akhil.goyal@nxp.com <akhil.goyal@nxp.com>
> Sent: Wednesday, May 20, 2020 11:26 PM
> To: dev@dpdk.org
> Cc: Ruifeng Wang <Ruifeng.Wang@arm.com>; declan.doherty@intel.com;
> asomalap@amd.com; anoobj@marvell.com; roy.fan.zhang@intel.com;
> fiona.trahe@intel.com; rnagadheeraj@marvell.com; adwivedi@marvell.com;
> jianjay.zhou@huawei.com; pablo.de.lara.guarch@intel.com;
> adamx.dybkowski@intel.com; Akhil.goyal@nxp.com
> Subject: [PATCH] test/crypto: skip unsupported cases
>
> From: Akhil Goyal <akhil.goyal@nxp.com>
>
> blockcipher cases are either returning TEST_SUCCESS or TEST_FAILED as
> status, but the test may not be supported by the PMD which is also a success
> case for the PMD. Hence checking for status == TEST_FAILED for setting the
> overall status as failed.
>
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
>  app/test/test_cryptodev_blockcipher.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/app/test/test_cryptodev_blockcipher.c
> b/app/test/test_cryptodev_blockcipher.c
> index 642b549717..d033350659 100644
> --- a/app/test/test_cryptodev_blockcipher.c
> +++ b/app/test/test_cryptodev_blockcipher.c
> @@ -107,7 +107,7 @@ test_blockcipher_one_case(const struct
> blockcipher_test_case *t,
>  "Test Skipped.\n");
>  snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
>  "SKIPPED");
> -return 0;
> +return TEST_SKIPPED;
>  }
>  }
>  if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) { @@ -
> 120,7 +120,7 @@ test_blockcipher_one_case(const struct
> blockcipher_test_case *t,
>  "Test Skipped.\n");
>  snprintf(test_msg,
> BLOCKCIPHER_TEST_MSG_LEN,
>  "SKIPPED");
> -return 0;
> +return TEST_SKIPPED;
>  }
>  } else {
>  if (!(feat_flags &
> RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { @@ -129,7 +129,7 @@
> test_blockcipher_one_case(const struct blockcipher_test_case *t,
>  "Test Skipped.\n");
>  snprintf(test_msg,
> BLOCKCIPHER_TEST_MSG_LEN,
>  "SKIPPED");
> -return 0;
> +return TEST_SKIPPED;
>  }
>  }
>
> @@ -146,7 +146,7 @@ test_blockcipher_one_case(const struct
> blockcipher_test_case *t,
>  "Test Skipped.\n");
>  snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
>  "SKIPPED");
> -return 0;
> +return TEST_SKIPPED;
>  }
>  }
>
> @@ -163,7 +163,7 @@ test_blockcipher_one_case(const struct
> blockcipher_test_case *t,
>  "Device does not support this algorithm."
>  "Test Skipped.\n");
>  snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
> "SKIPPED");
> -return 0;
> +return TEST_SKIPPED;
>  }
>
>  /* preparing data */
> @@ -435,6 +435,7 @@ test_blockcipher_one_case(const struct
> blockcipher_test_case *t,
>  init_xform, sess_priv_mpool);
>  if (status == -ENOTSUP) {
>  snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
> "UNSUPPORTED");
> +status = TEST_SKIPPED;
>  goto error_exit;
>  }
>  if (!sess || status < 0) {
> @@ -780,7 +781,7 @@ test_blockcipher_all_tests(struct rte_mempool
> *mbuf_pool,
>  printf("  %u) TestCase %s %s\n", test_index ++,
>  tc->test_descr, test_msg);
>
> -if (status != TEST_SUCCESS) {
> +if (status == TEST_FAILED) {
>  if (overall_status == TEST_SUCCESS)
We can remove this line and overwrite overall_status unconditionally. WDYT?

Thanks
/Ruifeng
>  overall_status = status;
>
> --
> 2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

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

* [dpdk-dev] [PATCH v2] test/crypto: skip unsupported cases
  2020-05-20 15:26 [dpdk-dev] [PATCH] test/crypto: skip unsupported cases akhil.goyal
  2020-05-21  7:52 ` Ruifeng Wang
@ 2020-07-16 19:07 ` Akhil Goyal
  2020-07-20  9:27   ` Akhil Goyal
  1 sibling, 1 reply; 7+ messages in thread
From: Akhil Goyal @ 2020-07-16 19:07 UTC (permalink / raw)
  To: dev
  Cc: declan.doherty, asomalap, anoobj, roy.fan.zhang, fiona.trahe,
	rnagadheeraj, adwivedi, jianjay.zhou, pablo.de.lara.guarch,
	adamx.dybkowski, Akhil Goyal

blockcipher cases are either returning TEST_SUCCESS
or TEST_FAILED as status, but the test may not be
supported by the PMD which is also a success case
for the PMD. Hence checking for status == TEST_FAILED
for setting the overall status as failed.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_cryptodev_blockcipher.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 642b54971..221262341 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -107,7 +107,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 				"Test Skipped.\n");
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 				"SKIPPED");
-			return 0;
+			return TEST_SKIPPED;
 		}
 	}
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
@@ -120,7 +120,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 					"Test Skipped.\n");
 				snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 					"SKIPPED");
-				return 0;
+				return TEST_SKIPPED;
 			}
 		} else {
 			if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
@@ -129,7 +129,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 					"Test Skipped.\n");
 				snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 					"SKIPPED");
-				return 0;
+				return TEST_SKIPPED;
 			}
 		}
 
@@ -146,7 +146,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 				"Test Skipped.\n");
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN,
 				"SKIPPED");
-			return 0;
+			return TEST_SKIPPED;
 		}
 	}
 
@@ -163,7 +163,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 			"Device does not support this algorithm."
 			"Test Skipped.\n");
 		snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED");
-		return 0;
+		return TEST_SKIPPED;
 	}
 
 	/* preparing data */
@@ -435,6 +435,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 				init_xform, sess_priv_mpool);
 		if (status == -ENOTSUP) {
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "UNSUPPORTED");
+			status = TEST_SKIPPED;
 			goto error_exit;
 		}
 		if (!sess || status < 0) {
@@ -780,9 +781,8 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
 		printf("  %u) TestCase %s %s\n", test_index ++,
 			tc->test_descr, test_msg);
 
-		if (status != TEST_SUCCESS) {
-			if (overall_status == TEST_SUCCESS)
-				overall_status = status;
+		if (status == TEST_FAILED) {
+			overall_status = status;
 
 			if (tc->feature_mask & BLOCKCIPHER_TEST_FEATURE_STOPPER)
 				break;
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v2] test/crypto: skip unsupported cases
  2020-07-16 19:07 ` [dpdk-dev] [PATCH v2] " Akhil Goyal
@ 2020-07-20  9:27   ` Akhil Goyal
  2020-07-20  9:42     ` Bruce Richardson
  2020-07-20 10:18     ` Ankur Dwivedi
  0 siblings, 2 replies; 7+ messages in thread
From: Akhil Goyal @ 2020-07-20  9:27 UTC (permalink / raw)
  To: asomalap, anoobj, roy.fan.zhang, fiona.trahe, rnagadheeraj,
	adwivedi, jianjay.zhou, pablo.de.lara.guarch, adamx.dybkowski,
	ruifeng.wang
  Cc: declan.doherty, dev

Hi All,

> blockcipher cases are either returning TEST_SUCCESS
> or TEST_FAILED as status, but the test may not be
> supported by the PMD which is also a success case
> for the PMD. Hence checking for status == TEST_FAILED
> for setting the overall status as failed.
> 
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---

Any comments on this patch?

Regards,
Akhil

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

* Re: [dpdk-dev] [PATCH v2] test/crypto: skip unsupported cases
  2020-07-20  9:27   ` Akhil Goyal
@ 2020-07-20  9:42     ` Bruce Richardson
  2020-07-20 10:18     ` Ankur Dwivedi
  1 sibling, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2020-07-20  9:42 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: asomalap, anoobj, roy.fan.zhang, fiona.trahe, rnagadheeraj,
	adwivedi, jianjay.zhou, pablo.de.lara.guarch, adamx.dybkowski,
	ruifeng.wang, declan.doherty, dev

On Mon, Jul 20, 2020 at 09:27:57AM +0000, Akhil Goyal wrote:
> Hi All,
> 
> > blockcipher cases are either returning TEST_SUCCESS
> > or TEST_FAILED as status, but the test may not be
> > supported by the PMD which is also a success case
> > for the PMD. Hence checking for status == TEST_FAILED
> > for setting the overall status as failed.
> > 
> > Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> > ---
> 
> Any comments on this patch?
> 
Not an expert on the crypto area, but on code-review the changes look good
to me as it makes the return value match the output describing what is
happening.

Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [dpdk-dev] [PATCH v2] test/crypto: skip unsupported cases
  2020-07-20  9:27   ` Akhil Goyal
  2020-07-20  9:42     ` Bruce Richardson
@ 2020-07-20 10:18     ` Ankur Dwivedi
  2020-07-20 10:20       ` Akhil Goyal
  1 sibling, 1 reply; 7+ messages in thread
From: Ankur Dwivedi @ 2020-07-20 10:18 UTC (permalink / raw)
  To: Akhil Goyal, asomalap, Anoob Joseph, roy.fan.zhang, fiona.trahe,
	Nagadheeraj Rottela, jianjay.zhou, pablo.de.lara.guarch,
	adamx.dybkowski, ruifeng.wang
  Cc: declan.doherty, dev



>-----Original Message-----
>From: Akhil Goyal <akhil.goyal@nxp.com>
>Sent: Monday, July 20, 2020 2:58 PM
>To: asomalap@amd.com; Anoob Joseph <anoobj@marvell.com>;
>roy.fan.zhang@intel.com; fiona.trahe@intel.com; Nagadheeraj Rottela
><rnagadheeraj@marvell.com>; Ankur Dwivedi <adwivedi@marvell.com>;
>jianjay.zhou@huawei.com; pablo.de.lara.guarch@intel.com;
>adamx.dybkowski@intel.com; ruifeng.wang@arm.com
>Cc: declan.doherty@intel.com; dev@dpdk.org
>Subject: [EXT] RE: [PATCH v2] test/crypto: skip unsupported cases
>
>External Email
>
>----------------------------------------------------------------------
>Hi All,
>
>> blockcipher cases are either returning TEST_SUCCESS or TEST_FAILED as
>> status, but the test may not be supported by the PMD which is also a
>> success case for the PMD. Hence checking for status == TEST_FAILED for
>> setting the overall status as failed.
>>
>> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
>> ---
>
>Any comments on this patch?
Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
>
>Regards,
>Akhil

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

* Re: [dpdk-dev] [PATCH v2] test/crypto: skip unsupported cases
  2020-07-20 10:18     ` Ankur Dwivedi
@ 2020-07-20 10:20       ` Akhil Goyal
  0 siblings, 0 replies; 7+ messages in thread
From: Akhil Goyal @ 2020-07-20 10:20 UTC (permalink / raw)
  To: Ankur Dwivedi, asomalap, Anoob Joseph, roy.fan.zhang,
	fiona.trahe, Nagadheeraj Rottela, jianjay.zhou,
	pablo.de.lara.guarch, adamx.dybkowski, ruifeng.wang
  Cc: declan.doherty, dev

> >Hi All,
> >
> >> blockcipher cases are either returning TEST_SUCCESS or TEST_FAILED as
> >> status, but the test may not be supported by the PMD which is also a
> >> success case for the PMD. Hence checking for status == TEST_FAILED for
> >> setting the overall status as failed.
> >>
> >> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> >> ---
> >
> >Any comments on this patch?
> Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
> >

Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2020-07-20 10:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 15:26 [dpdk-dev] [PATCH] test/crypto: skip unsupported cases akhil.goyal
2020-05-21  7:52 ` Ruifeng Wang
2020-07-16 19:07 ` [dpdk-dev] [PATCH v2] " Akhil Goyal
2020-07-20  9:27   ` Akhil Goyal
2020-07-20  9:42     ` Bruce Richardson
2020-07-20 10:18     ` Ankur Dwivedi
2020-07-20 10:20       ` Akhil Goyal

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git