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 3C5BEA0C46; Wed, 9 Jun 2021 08:30:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0603B40E3C; Wed, 9 Jun 2021 08:30:43 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 150EF4069B for ; Wed, 9 Jun 2021 08:30:40 +0200 (CEST) IronPort-SDR: byuv25pNZUE3vVhkYUdqQ3m0c2BRbXEkO7E8wrRC0uJC2dkL7Lw6ppHKh5UdxfHZcl8YY5dptH 21iFVW2mxphg== X-IronPort-AV: E=McAfee;i="6200,9189,10009"; a="268868414" X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="268868414" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 23:30:39 -0700 IronPort-SDR: mhHN3TAqNJjf7peE129EGJU8CAw/bZHCLBX7j26uCgnhMPbgFMr+UOTfW1RNL5dLR8eihchhV8 TXu1gavLsbhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,260,1616482800"; d="scan'208";a="448180474" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 08 Jun 2021 23:30:39 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 8 Jun 2021 23:30:38 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 9 Jun 2021 14:30:36 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.008; Wed, 9 Jun 2021 14:30:36 +0800 From: "Tu, Lijuan" To: "Jiang, YuX" , "dts@dpdk.org" CC: "Jiang, YuX" Thread-Topic: [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: support vdev param Thread-Index: AQHXU5X7e9HQXf2hcUis+x6iwLfcz6sLSpXQ Date: Wed, 9 Jun 2021 06:30:36 +0000 Message-ID: <9e5b14e517794fb2b7d773836d134865@intel.com> References: <20210528075312.23366-1-yux.jiang@intel.com> <20210528075312.23366-3-yux.jiang@intel.com> In-Reply-To: <20210528075312.23366-3-yux.jiang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: support vdev param X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" > -----Original Message----- > From: dts On Behalf Of Yu Jiang > Sent: 2021=1B$BG/=1B(B5=1B$B7n=1B(B28=1B$BF|=1B(B 15:53 > To: dts@dpdk.org > Cc: Jiang, YuX > Subject: [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: support vd= ev > param >=20 > Based on dpdk commit 8bfdd8a7f0f1 ("test/crypto: refactor to use sub test > suites"), unit test support vdev param. >=20 > Signed-off-by: Yu Jiang > --- > conf/unit_tests_cryptodev_func.cfg | 32 ++++++++++++++++++++++= +++ > tests/TestSuite_unit_tests_cryptodev_func.py | 36 > +++++++++++++++++++++++++++- > 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 > conf/unit_tests_cryptodev_func.cfg >=20 > diff --git a/conf/unit_tests_cryptodev_func.cfg > b/conf/unit_tests_cryptodev_func.cfg > new file mode 100644 > index 0000000..0516293 > --- /dev/null > +++ b/conf/unit_tests_cryptodev_func.cfg > @@ -0,0 +1,32 @@ > +[suite] > + > +# vdev which is supported from 21.05rc3 commit id: 8bfdd8a7f0 > +test/crypto: refactor to use sub test suites > +[test_cryptodev_aesni_gcm_autotest] > +devtype=3D"crypto_aesni_gcm" > + > +[test_cryptodev_aesni_mb_autotest] > +devtype=3D"crypto_aesni_mb" > + > +[test_cryptodev_null_autotest] > +devtype=3D"crypto_null" > + > +[test_cryptodev_openssl_autotest] > +devtype=3D"crypto_openssl" > + > +[test_cryptodev_qat_asym_autotest] > +devtype=3D"crypto_qat" > + > +[test_cryptodev_qat_autotest] > +devtype=3D"crypto_qat" > + > +[test_cryptodev_scheduler_autotest] > +devtype=3D"crypto_scheduler" > + > +[test_cryptodev_sw_kasumi_autotest] > +devtype=3D"crypto_kasumi" > + > +[test_cryptodev_sw_snow3g_autotest] > +devtype=3D"crypto_snow3g" > + > +[test_cryptodev_sw_zuc_autotest] > +devtype=3D"crypto_zuc" > diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py > b/tests/TestSuite_unit_tests_cryptodev_func.py > index 98425d4..1564c7f 100644 > --- a/tests/TestSuite_unit_tests_cryptodev_func.py > +++ b/tests/TestSuite_unit_tests_cryptodev_func.py > @@ -53,6 +53,39 @@ class UnitTestsCryptodev(TestCase): > def tear_down_all(self): > cc.clear_dpdk_config(self) >=20 > + def _get_crypto_device(self, num): > + device =3D {} > + if self.get_case_cfg()["devtype"] =3D=3D "crypto_aesni_mb": > + dev =3D "crypto_aesni_mb" > + elif self.get_case_cfg()["devtype"] =3D=3D "crypto_qat": > + w =3D cc.get_qat_devices(self, cpm_num=3D1, num=3Dnum) > +# device["a"] =3D ' -a '.join(w) Please remove some useless comments, thanks > + device["vdev"] =3D None > + elif self.get_case_cfg()["devtype"] =3D=3D "crypto_openssl": > + dev =3D "crypto_openssl" > + elif self.get_case_cfg()["devtype"] =3D=3D "crypto_aesni_gcm": > + dev =3D "crypto_aesni_gcm" > + elif self.get_case_cfg()["devtype"] =3D=3D "crypto_kasumi": > + dev =3D "crypto_kasumi" > + elif self.get_case_cfg()["devtype"] =3D=3D "crypto_snow3g": > + dev =3D "crypto_snow3g" > + elif self.get_case_cfg()["devtype"] =3D=3D "crypto_zuc": > + dev =3D "crypto_zuc" > + elif self.get_case_cfg()["devtype"] =3D=3D "crypto_null": > + dev =3D "crypto_null" > + else: > + return {} > + > + if not device: > + vdev_list =3D [] > + for i in range(num): > + vdev =3D "{}{}".format(dev, i) > + vdev_list.append(vdev) > + # device["a"] =3D "0000:00:00.0" > + device["vdev"] =3D ' --vdev '.join(vdev_list) > + > + return device > + > def test_cryptodev_qat_autotest(self): > self.__run_unit_test("cryptodev_qat_autotest") >=20 > @@ -105,7 +138,8 @@ class UnitTestsCryptodev(TestCase): > self.__run_unit_test("cryptodev_scheduler_autotest") >=20 > def __run_unit_test(self, testsuite, timeout=3D600): > - eal_opt_str =3D cc.get_eal_opt_str(self) > + devices =3D self._get_crypto_device(num=3D1) > + eal_opt_str =3D cc.get_eal_opt_str(self, devices) > w =3D cc.get_qat_devices(self, num=3D1) >=20 > self.logger.info("STEP_TEST: " + testsuite) > -- > 2.7.4