From patchwork Tue Oct 1 11:41:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 174841 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8423827ill; Tue, 1 Oct 2019 04:43:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGl0m4pirABNn2TsrjHom/PmK7hvlOsb1MBVFdFDogROYNBnrD7YrOkrNL8THBl0mWMKKs X-Received: by 2002:a50:9250:: with SMTP id j16mr25186279eda.160.1569930232130; Tue, 01 Oct 2019 04:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569930232; cv=none; d=google.com; s=arc-20160816; b=g1AHMRKBKEPBkbiUXITtSW3nyHHRxCbPj7hisC/dyGiq5kORkIhMloJHswgMsBmeMj RDnYkn1Zn/gT1ijX5Q8xqDazIDlS5auNGeAShYn8SzWhTrjG87OIy3Aqqd3yXVtrySNk XtkD1/O5cIsV28ax4nmeSjkIb3s5C3hHWtG82Fs2PRAOpCo9KkRDj9toOVPPAbQXQzpP CPy5cqnR/p6sjeDpDXTe7fzeOqqNJQxVv/QSQ1Ff6e+rWixl/h+Eyun4RJzFoWvbhKsl lHgj9StFL+t7qIAFkmqoLDEtXvXktWodlxJRtiNIQXdJXBJUf3/A/PyR08lsWhwebPxC wwQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=4HjPeZI7SP0/2bUqIvms54WMbpZJs67hKRiCYvWygtU=; b=jDLQb1lDuKtqzPMcbLjJC1TeLILF+18zALiA5vnp5JAmt/J0IKT5wviDSfz3OXx8vY R8fkzKfYRt/NA3Hml9RxAwcYhRFyNlIu87bn9kZpgd2CvSuM3NlZeBYw7nYdtUqgCxFV xizx/fH2XueAMiugvaffMA+oYGXvDsVxGbd/FWtzEok/ngoMhKnkPIb3FpNGSkqT/Fa9 EF8iQcLzi4jnYWlyA1R4gDcDYOTTQAnqKr+9oqlq/xiHCf4Gekttmze8lJHRGSqOfNN+ E0ipaHH8aYWoQUp+wd2dlZ2pUm2xIXvvgGYEwnPgvj7gRfUIBIe2+5bOHbOdPeaK0VEd sULw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id l15si8431943eja.290.2019.10.01.04.43.51; Tue, 01 Oct 2019 04:43:52 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 303931B94A; Tue, 1 Oct 2019 13:43:47 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 184D02BF7 for ; Tue, 1 Oct 2019 13:43:45 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EE2291A0543; Tue, 1 Oct 2019 13:43:44 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2D28E1A0563; Tue, 1 Oct 2019 13:43:43 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 47CA04029A; Tue, 1 Oct 2019 19:43:40 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com, Hemant Agrawal Date: Tue, 1 Oct 2019 17:11:19 +0530 Message-Id: <20191001114119.21896-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001114119.21896-1-hemant.agrawal@nxp.com> References: <20191001114119.21896-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 2/2] test/crypto: add negative test support for dpaaX X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Hemant Agrawal --- app/test/test_cryptodev.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.17.1 Acked-by: Akhil Goyal diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 915acf13c..eb2cfdde6 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -11513,6 +11513,16 @@ static struct unit_test_suite cryptodev_dpaa_sec_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B), + /** Negative tests */ + TEST_CASE_ST(ut_setup, ut_teardown, + authentication_verify_HMAC_SHA1_fail_data_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + authentication_verify_HMAC_SHA1_fail_tag_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), + TEST_CASES_END() /**< NULL terminate unit test array */ } }; @@ -11650,6 +11660,16 @@ static struct unit_test_suite cryptodev_dpaa2_sec_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B), + /** Negative tests */ + TEST_CASE_ST(ut_setup, ut_teardown, + authentication_verify_HMAC_SHA1_fail_data_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + authentication_verify_HMAC_SHA1_fail_tag_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), + TEST_CASES_END() /**< NULL terminate unit test array */ } };