patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
To: Declan Doherty <declan.doherty@intel.com>
Cc: stable@dpdk.org, Saoirse O'Donovan <saoirse.odonovan@intel.com>
Subject: [PATCH 20.11] test/crypto: fix return value for SNOW3G
Date: Thu, 15 Jun 2023 12:08:00 +0000	[thread overview]
Message-ID: <20230615120800.22901-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: 326e988672aa ("test/crypto: fix bitwise operator in a SNOW3G case")
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 34d162f48f..2e76763e09 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6386,6 +6386,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;
 
 	/*
@@ -6394,8 +6395,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-06-15 12:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 12:08 Saoirse O'Donovan [this message]
2023-06-15 14:15 ` Luca Boccassi

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=20230615120800.22901-1-saoirse.odonovan@intel.com \
    --to=saoirse.odonovan@intel.com \
    --cc=declan.doherty@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).