DPDK patches and discussions
 help / color / mirror / Atom feed
From: akhil.goyal@nxp.com
To: dev@dpdk.org
Cc: 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 <akhil.goyal@nxp.com>
Subject: [dpdk-dev] [PATCH] test/crypto: skip unsupported cases
Date: Wed, 20 May 2020 20:56:12 +0530
Message-ID: <20200520152612.2920-1-akhil.goyal@nxp.com> (raw)

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


             reply	other threads:[~2020-05-20 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 15:26 akhil.goyal [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200520152612.2920-1-akhil.goyal@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=adamx.dybkowski@intel.com \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=asomalap@amd.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=rnagadheeraj@marvell.com \
    --cc=roy.fan.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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