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 61BC941DAC; Wed, 1 Mar 2023 17:39:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4F9442B8B; Wed, 1 Mar 2023 17:39:26 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id B4B3B42B71; Wed, 1 Mar 2023 17:39:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677688766; x=1709224766; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/2ZMUKjLMIWQi7wrNJzehcvThTIIrJTZVe4szZBtVgQ=; b=Ert93ZsqxM1HqVmdPcYhM6zAV/R5RI/m/Jk0URrm6xZ+ja9ujdlaUGpk 1sSJcZ0xJBhiPJRFdffaceMhCMHF44n2iEFRu74rU3ySCAQsxBIskJkhJ yI7i5zu8ipxMVoaF8LTfsI0qSBf/ee/cHSt2ddBTxGujfIJe6Ik14Pqej DHHRTAqjWdF3W707KKKW0P6q0VjSCOPX9qPi8d+3rv1OnOOEdSDo6geKK 2j3opapX9cNIDfii85kDqj6eJv0F2kYHov534ph3BOqSdPt0Mdic2wBTW Obo97Jq5bFCvUUxiWVQ0wFrt/TFXA/NillIf/+RVK2JhWL79g9ehTp5UU A==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="362039459" X-IronPort-AV: E=Sophos;i="5.98,225,1673942400"; d="scan'208";a="362039459" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 08:39:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="667922816" X-IronPort-AV: E=Sophos;i="5.98,225,1673942400"; d="scan'208";a="667922816" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.80]) by orsmga007.jf.intel.com with ESMTP; 01 Mar 2023 08:39:22 -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 Subject: [PATCH 2/5] test/crypto: fix ZUC digest length in comparison Date: Wed, 1 Mar 2023 16:39:13 +0000 Message-Id: <20230301163916.2248543-3-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230301163916.2248543-1-ciara.power@intel.com> References: <20230301163916.2248543-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 --- 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