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>
Subject: [PATCH 1/5] test/crypto: improve readability of ZUC256 tests
Date: Wed,  1 Mar 2023 16:39:12 +0000	[thread overview]
Message-ID: <20230301163916.2248543-2-ciara.power@intel.com> (raw)
In-Reply-To: <20230301163916.2248543-1-ciara.power@intel.com>

There were some ZUC256 tests for hash generate and hash verify mixed in
with the ZUC128 tests, with no indication in the test name that they
were for ZUC256.

These are now grouped with other ZUC256 tests, and all ZUC256 hash test
names are modified to be more uniform, and indicate the digest length
as this can vary with ZUC256.

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

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index aa831d79a2..ca7f10557c 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7385,27 +7385,6 @@ test_zuc_hash_generate_test_case_8(void)
 			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
-static int
-test_zuc_hash_generate_test_case_9(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
-static int
-test_zuc_hash_generate_test_case_10(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
-static int
-test_zuc_hash_generate_test_case_11(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
 static int
 test_zuc_hash_verify_test_case_1(void)
 {
@@ -7462,27 +7441,6 @@ test_zuc_hash_verify_test_case_8(void)
 			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
-static int
-test_zuc_hash_verify_test_case_9(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
-static int
-test_zuc_hash_verify_test_case_10(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
-static int
-test_zuc_hash_verify_test_case_11(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
 static int
 test_zuc_cipher_auth_test_case_1(void)
 {
@@ -7608,29 +7566,71 @@ test_zuc256_decryption_test_case_2(void)
 }
 
 static int
-test_zuc256_authentication_test_case_1(void)
+test_zuc256_hash_generate_4b_tag_test_case_1(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_1, 0);
 }
 
 static int
-test_zuc256_authentication_test_case_2(void)
+test_zuc256_hash_generate_4b_tag_test_case_2(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_2, 0);
 }
 
 static int
-test_zuc256_authentication_verify_test_case_1(void)
+test_zuc256_hash_generate_4b_tag_test_case_3(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_generate_8b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_generate_16b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_verify_4b_tag_test_case_1(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_1, 1);
 }
 
 static int
-test_zuc256_authentication_verify_test_case_2(void)
+test_zuc256_hash_verify_4b_tag_test_case_2(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_2, 1);
 }
 
+static int
+test_zuc256_hash_verify_4b_tag_test_case_3(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
+static int
+test_zuc256_hash_verify_8b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
+static int
+test_zuc256_hash_verify_16b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
 static int
 test_mixed_check_if_unsupported(const struct mixed_cipher_auth_test_data *tdata)
 {
@@ -16409,12 +16409,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 			test_zuc_hash_generate_test_case_7),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc_hash_generate_test_case_8),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_9),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_10),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_11),
 
 		/** ZUC verify (EIA3) */
 		TEST_CASE_ST(ut_setup, ut_teardown,
@@ -16433,13 +16427,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 			test_zuc_hash_verify_test_case_7),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc_hash_verify_test_case_8),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_9),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_10),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_11),
-
 
 		/** ZUC alg-chain (EEA3/EIA3) */
 		TEST_CASE_ST(ut_setup, ut_teardown,
@@ -16489,15 +16476,27 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 
 		/** ZUC-256 authentication only **/
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_test_case_1),
+			test_zuc256_hash_generate_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_4b_tag_test_case_2),
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_test_case_2),
+			test_zuc256_hash_generate_4b_tag_test_case_3),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_16b_tag_test_case_1),
 
 		/** ZUC-256 authentication verify only **/
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_verify_test_case_1),
+			test_zuc256_hash_verify_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_4b_tag_test_case_3),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_8b_tag_test_case_1),
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_verify_test_case_2),
+			test_zuc256_hash_verify_16b_tag_test_case_1),
 
 		TEST_CASES_END()
 	}
-- 
2.25.1


  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 ` Ciara Power [this message]
2023-03-01 16:39 ` [PATCH 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
2023-03-01 16:39 ` [PATCH 3/5] test/crypto: fix auth op parameter for ZUC256 tests 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-2-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 \
    /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).