DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>,
	Ciara Power <ciara.power@intel.com>
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>,
	Jerin Jacob <jerinj@marvell.com>,
	 Tejasree Kondoj <ktejasree@marvell.com>,
	Kai Ji <kai.ji@intel.com>, <dev@dpdk.org>
Subject: [PATCH 2/2] test/crypto: handle return code
Date: Fri, 12 May 2023 19:39:46 +0530	[thread overview]
Message-ID: <20230512140946.195-2-anoobj@marvell.com> (raw)
In-Reply-To: <20230512140946.195-1-anoobj@marvell.com>

The sub test case, test_snow3g_decryption, may fail for non-critical
reasons such as lack of support. Handle the return value gracefully to
allow TEST_SKIPPED return value to be propagated correctly.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 86e63a33fc..d212e71ba6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6947,6 +6947,7 @@ test_snow3g_decryption_with_digest_test_case_1(void)
 	struct snow3g_hash_test_data snow3g_hash_data;
 	struct rte_cryptodev_info dev_info;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	int ret;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
 	uint64_t feat_flags = dev_info.feature_flags;
@@ -6962,8 +6963,9 @@ test_snow3g_decryption_with_digest_test_case_1(void)
 	 */
 	snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data);
 
-	if (test_snow3g_decryption(&snow3g_test_case_7))
-		return TEST_FAILED;
+	ret = test_snow3g_decryption(&snow3g_test_case_7);
+	if (ret != TEST_SUCCESS)
+		return ret;
 
 	return test_snow3g_authentication_verify(&snow3g_hash_data);
 }
-- 
2.25.1


  reply	other threads:[~2023-05-12 14:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 14:09 [PATCH 1/2] test/crypto: free memory in error and skip paths Anoob Joseph
2023-05-12 14:09 ` Anoob Joseph [this message]
2023-05-16 10:12   ` [PATCH 2/2] test/crypto: handle return code Akhil Goyal
2023-05-16 10:45     ` Power, Ciara
2023-05-16 10:53       ` Anoob Joseph
2023-05-16 10:06 ` [PATCH 1/2] test/crypto: free memory in error and skip paths Akhil Goyal
2023-05-17 10:55 ` [PATCH v2] " Anoob Joseph
2023-05-17 15:44   ` Power, Ciara
2023-05-24 12:41   ` 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=20230512140946.195-2-anoobj@marvell.com \
    --to=anoobj@marvell.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=ktejasree@marvell.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).