patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org, Saoirse O'Donovan <saoirse.odonovan@intel.com>,
	kai.ji@intel.com, stable@dpdk.org
Subject: [PATCH] test/crypto: fix return value for snow3g testcase
Date: Fri, 14 Apr 2023 13:55:26 +0000	[thread overview]
Message-ID: <20230414135526.4271-1-saoirse.odonovan@intel.com> (raw)

Unit tests were failing due to the return value of the decryption and
authentication functions not being handled correctly. This has now been
modified to return the expected test status.

Fixes: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case")
Cc: kai.ji@intel.com
Cc: stable@dpdk.org

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.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 9c670e9a35..0713187d14 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6944,6 +6944,7 @@ snow3g_hash_test_vector_setup(const struct snow3g_test_data *pattern,
 static int
 test_snow3g_decryption_with_digest_test_case_1(void)
 {
+	int ret;
 	struct snow3g_hash_test_data snow3g_hash_data;
 	struct rte_cryptodev_info dev_info;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
@@ -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 != 0)
+		return ret;
 
 	return test_snow3g_authentication_verify(&snow3g_hash_data);
 }
-- 
2.25.1


             reply	other threads:[~2023-04-14 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 13:55 Saoirse O'Donovan [this message]
2023-04-14 14:01 ` Power, Ciara
2023-05-03  7:42   ` 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=20230414135526.4271-1-saoirse.odonovan@intel.com \
    --to=saoirse.odonovan@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=stable@dpdk.org \
    /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).