DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ciara Power <ciara.power@intel.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org, kai.ji@intel.com, pablo.de.lara.guarch@intel.com,
	Ciara Power <ciara.power@intel.com>,
	vvelumuri@marvell.com, stable@dpdk.org
Subject: [PATCH 2/5] test/crypto: fix ZUC digest length in comparison
Date: Wed,  1 Mar 2023 16:39:13 +0000	[thread overview]
Message-ID: <20230301163916.2248543-3-ciara.power@intel.com> (raw)
In-Reply-To: <20230301163916.2248543-1-ciara.power@intel.com>

The digest length used in ZUC tests for verifying the digest was
hardcoded at 4 bytes, which was suitable for ZUC128 only.
Now that ZUC256 is supported by these test functions, the digest length
can vary.

Using the test vector digest length directly in these
comparisons allows for variable digest length.

Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")
Fixes: fa5bf9345d4e ("test/crypto: add ZUC cases with 256-bit keys")
Cc: vvelumuri@marvell.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ca7f10557c..72d359dd91 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -4853,7 +4853,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			4,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	return 0;
 }
@@ -6499,7 +6499,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
@@ -6706,7 +6706,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
-- 
2.25.1


  parent reply	other threads:[~2023-03-01 16:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
2023-03-01 16:39 ` [PATCH 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
2023-03-01 16:39 ` Ciara Power [this message]
2023-03-01 16:39 ` [PATCH 3/5] test/crypto: fix auth op parameter for " Ciara Power
2023-03-01 16:39 ` [PATCH 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
2023-03-01 16:39 ` [PATCH 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
2023-03-02  9:56   ` De Lara Guarch, Pablo
2023-03-02 10:07 ` [PATCH 0/5] test/crypto: add ZUC256 chained tests Dooley, Brian
2023-03-03  9:38 ` [PATCH v2 " Ciara Power
2023-03-03  9:38   ` [PATCH v2 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
2023-03-03  9:38   ` [PATCH v2 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
2023-03-03  9:38   ` [PATCH v2 3/5] test/crypto: fix auth op parameter for ZUC256 tests Ciara Power
2023-03-03  9:38   ` [PATCH v2 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
2023-03-03  9:38   ` [PATCH v2 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
2023-03-03 16:37   ` [EXT] [PATCH v2 0/5] test/crypto: add ZUC256 chained tests Tejasree Kondoj
2023-03-06  9:32   ` De Lara Guarch, Pablo
2023-03-14 10:27     ` 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=20230301163916.2248543-3-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=stable@dpdk.org \
    --cc=vvelumuri@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).