From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3FA5041DC6; Fri, 3 Mar 2023 10:38:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CFF24282D; Fri, 3 Mar 2023 10:38:32 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 18FCB427EE; Fri, 3 Mar 2023 10:38:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677836310; x=1709372310; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vs7nivvI13qbDYhQGrkLD4pE+5Dor6/5WomCVeiy+VU=; b=JZbLiyU653BNTWZDuRgQA5n0wVQ/TRwSXRsQadryzpjcaJ9rLfE7GnGc 9aIjZ3MhlBAyw9zsJxsJ4l0Xb+PODi0yIDWwq9Tv+Ut3N7ERv5eI4RpA3 CHLN1dkcXZuUH2TbhCc9BLM1Tk0JpBu3vubd2v337wSXosP2yvEMXZqNo BOAGCcW4u8JT5iBaYuAELb+cW7V+vABnjMvtZOY4sXb8qtT+5qLtw0Aro xgZCz7rIjqBCMZcaxUyolpw22uWQHRfZBTeqhms/4W8DT1dn9Akjv7CPW bxzkAgDtFejiFKLuajteg+SWb5Gevhc1AiVK5P5RijN+BczxvAxzkDn42 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="362600843" X-IronPort-AV: E=Sophos;i="5.98,230,1673942400"; d="scan'208";a="362600843" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2023 01:38:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="739444742" X-IronPort-AV: E=Sophos;i="5.98,230,1673942400"; d="scan'208";a="739444742" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.80]) by fmsmga008.fm.intel.com with ESMTP; 03 Mar 2023 01:38:27 -0800 From: Ciara Power To: Akhil Goyal , Fan Zhang Cc: dev@dpdk.org, kai.ji@intel.com, pablo.de.lara.guarch@intel.com, Ciara Power , vvelumuri@marvell.com, stable@dpdk.org, Brian Dooley Subject: [PATCH v2 2/5] test/crypto: fix ZUC digest length in comparison Date: Fri, 3 Mar 2023 09:38:18 +0000 Message-Id: <20230303093821.2367309-3-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230303093821.2367309-1-ciara.power@intel.com> References: <20230301163916.2248543-1-ciara.power@intel.com> <20230303093821.2367309-1-ciara.power@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Brian Dooley --- 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