From patchwork Thu Jan 16 10:40:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dybkowski, AdamX" X-Patchwork-Id: 64768 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 77116A0352; Thu, 16 Jan 2020 11:40:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ED3351C1C8; Thu, 16 Jan 2020 11:40:48 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4F5681C1B8 for ; Thu, 16 Jan 2020 11:40:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2020 02:40:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,325,1574150400"; d="scan'208";a="248755896" Received: from adamdybx-mobl.ger.corp.intel.com (HELO addy-VirtualBox.imu.intel.com) ([10.103.102.201]) by fmsmga004.fm.intel.com with ESMTP; 16 Jan 2020 02:40:44 -0800 From: Adam Dybkowski To: dev@dpdk.org, fiona.trahe@intel.com, akhil.goyal@nxp.com Cc: Adam Dybkowski Date: Thu, 16 Jan 2020 11:40:40 +0100 Message-Id: <20200116104044.588-1-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191213152245.13477-1-adamx.dybkowski@intel.com> References: <20191213152245.13477-1-adamx.dybkowski@intel.com> Subject: [dpdk-dev] [PATCH v4 0/4] Refactor crypto unit tests. 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" This patch set is a first step to refactor the overly complex symmetric crypto unit tests. It merges many separate arrays of the tests for these PMDs: null, aesni_mb, aesni_gcm, openssl, qat, sw_snow3g, sw_kasumi, sw_zuc into one big array that's then used when running unit tests on these PMDs. Individual test functions check the capabilities and execute the rest of the test or skip (return -ENOTSUP) based on the particular test requirements - e.g. test if PMD supports ZUC algo or even a particular key length in few cases. Few edge cases required to check the PMD itself (e.g. run on QAT only, or skip on AES NI / AES GCM). It's the first step of bigger refactoring. Maintainers of other PMDs are encouraged to add their PMD unit tests also into this big central array and remove individual test macro arrays. This patch doesn't address next refactoring steps to be done in the future: geting rid of many small (usually 1-2 line) test functions, created separately for every test case; and simplifying many bigger functions that currently do similar things but work on different test vector structures. NOTICE: This patch set depends on the series http://patches.dpdk.org/project/dpdk/list/?series=7792 that must be applied first. A simple script to check if symmetric crypto unit tests work properly on multiple PMDs at once, update the PMDs list to your needs: for PMD in null aesni_mb aesni_gcm openssl qat scheduler sw_snow3g sw_kasumi sw_zuc do echo +++++ $PMD +++++ echo cryptodev_${PMD}_autotest | build/app/test -c7 -n1 --log-level=7 | grep ' Tests [Failed|Passed]' done --- v2: * Update the cover letter, regenerate the patch file. v3: * Break very large commit into four smaller commits, easier to review. * Show in the cover letter how to run unit tests on multiple PMDs at once. v4: * Rebase. Adam Dybkowski (4): test/crypto: refactor unit tests test/crypto: refactor unit tests - continuation test/crypto: add capability checks test/crypto: refactor unit tests into one combined array app/test/test_cryptodev.c | 15881 +++++++++---------- app/test/test_cryptodev_blockcipher.c | 2 +- app/test/test_cryptodev_des_test_vectors.h | 6 +- 3 files changed, 7298 insertions(+), 8591 deletions(-)