* [dts] [PATCH V1 0/2] cryptodev unit test support vdev param @ 2021-05-28 7:53 Yu Jiang 2021-05-28 7:53 ` [dts] [PATCH V1 1/2] tests/virtio_unit_cryptodev_func: " Yu Jiang ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Yu Jiang @ 2021-05-28 7:53 UTC (permalink / raw) To: dts; +Cc: Yu Jiang Based on dpdk commit 8bfdd8a7f0f1 ("test/crypto: refactor to use sub test suites"), unit test support vdev param. Yu Jiang (2): tests/virtio_unit_cryptodev_func: support vdev param tests/unit_tests_cryptodev_func: support vdev param conf/unit_tests_cryptodev_func.cfg | 32 ++++++++++++++++++++++++ tests/TestSuite_unit_tests_cryptodev_func.py | 36 ++++++++++++++++++++++++++- tests/TestSuite_virtio_unit_cryptodev_func.py | 2 +- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 conf/unit_tests_cryptodev_func.cfg -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1 1/2] tests/virtio_unit_cryptodev_func: support vdev param 2021-05-28 7:53 [dts] [PATCH V1 0/2] cryptodev unit test support vdev param Yu Jiang @ 2021-05-28 7:53 ` Yu Jiang 2021-05-28 7:53 ` [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: " Yu Jiang 2021-06-02 2:49 ` [dts] [PATCH V1 0/2] cryptodev unit test " Jiang, YuX 2 siblings, 0 replies; 5+ messages in thread From: Yu Jiang @ 2021-05-28 7:53 UTC (permalink / raw) To: dts; +Cc: Yu Jiang Based on dpdk commit 8bfdd8a7f0f1 ("test/crypto: refactor to use sub test suites"), unit test support vdev param. Signed-off-by: Yu Jiang <yux.jiang@intel.com> --- tests/TestSuite_virtio_unit_cryptodev_func.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestSuite_virtio_unit_cryptodev_func.py b/tests/TestSuite_virtio_unit_cryptodev_func.py index 8d69d5b..bf96b62 100644 --- a/tests/TestSuite_virtio_unit_cryptodev_func.py +++ b/tests/TestSuite_virtio_unit_cryptodev_func.py @@ -158,7 +158,7 @@ class VirtioCryptodevUnitTest(TestCase): return vm, vm_dut def test_cryptodev_virtio_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self, {"a":None, "vdev":None}) + eal_opt_str = cc.get_eal_opt_str(self, {"a":None, "vdev": "crypto_virtio"}) self.__run_unit_test("cryptodev_virtio_autotest", eal_opt_str) def __run_unit_test(self, testsuite, eal_opt_str='', timeout=600): -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: support vdev param 2021-05-28 7:53 [dts] [PATCH V1 0/2] cryptodev unit test support vdev param Yu Jiang 2021-05-28 7:53 ` [dts] [PATCH V1 1/2] tests/virtio_unit_cryptodev_func: " Yu Jiang @ 2021-05-28 7:53 ` Yu Jiang 2021-06-09 6:30 ` Tu, Lijuan 2021-06-02 2:49 ` [dts] [PATCH V1 0/2] cryptodev unit test " Jiang, YuX 2 siblings, 1 reply; 5+ messages in thread From: Yu Jiang @ 2021-05-28 7:53 UTC (permalink / raw) To: dts; +Cc: Yu Jiang Based on dpdk commit 8bfdd8a7f0f1 ("test/crypto: refactor to use sub test suites"), unit test support vdev param. Signed-off-by: Yu Jiang <yux.jiang@intel.com> --- 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 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="crypto_aesni_gcm" + +[test_cryptodev_aesni_mb_autotest] +devtype="crypto_aesni_mb" + +[test_cryptodev_null_autotest] +devtype="crypto_null" + +[test_cryptodev_openssl_autotest] +devtype="crypto_openssl" + +[test_cryptodev_qat_asym_autotest] +devtype="crypto_qat" + +[test_cryptodev_qat_autotest] +devtype="crypto_qat" + +[test_cryptodev_scheduler_autotest] +devtype="crypto_scheduler" + +[test_cryptodev_sw_kasumi_autotest] +devtype="crypto_kasumi" + +[test_cryptodev_sw_snow3g_autotest] +devtype="crypto_snow3g" + +[test_cryptodev_sw_zuc_autotest] +devtype="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) + def _get_crypto_device(self, num): + device = {} + if self.get_case_cfg()["devtype"] == "crypto_aesni_mb": + dev = "crypto_aesni_mb" + elif self.get_case_cfg()["devtype"] == "crypto_qat": + w = cc.get_qat_devices(self, cpm_num=1, num=num) +# device["a"] = ' -a '.join(w) + device["vdev"] = None + elif self.get_case_cfg()["devtype"] == "crypto_openssl": + dev = "crypto_openssl" + elif self.get_case_cfg()["devtype"] == "crypto_aesni_gcm": + dev = "crypto_aesni_gcm" + elif self.get_case_cfg()["devtype"] == "crypto_kasumi": + dev = "crypto_kasumi" + elif self.get_case_cfg()["devtype"] == "crypto_snow3g": + dev = "crypto_snow3g" + elif self.get_case_cfg()["devtype"] == "crypto_zuc": + dev = "crypto_zuc" + elif self.get_case_cfg()["devtype"] == "crypto_null": + dev = "crypto_null" + else: + return {} + + if not device: + vdev_list = [] + for i in range(num): + vdev = "{}{}".format(dev, i) + vdev_list.append(vdev) + # device["a"] = "0000:00:00.0" + device["vdev"] = ' --vdev '.join(vdev_list) + + return device + def test_cryptodev_qat_autotest(self): self.__run_unit_test("cryptodev_qat_autotest") @@ -105,7 +138,8 @@ class UnitTestsCryptodev(TestCase): self.__run_unit_test("cryptodev_scheduler_autotest") def __run_unit_test(self, testsuite, timeout=600): - eal_opt_str = cc.get_eal_opt_str(self) + devices = self._get_crypto_device(num=1) + eal_opt_str = cc.get_eal_opt_str(self, devices) w = cc.get_qat_devices(self, num=1) self.logger.info("STEP_TEST: " + testsuite) -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: support vdev param 2021-05-28 7:53 ` [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: " Yu Jiang @ 2021-06-09 6:30 ` Tu, Lijuan 0 siblings, 0 replies; 5+ messages in thread From: Tu, Lijuan @ 2021-06-09 6:30 UTC (permalink / raw) To: Jiang, YuX, dts; +Cc: Jiang, YuX > -----Original Message----- > From: dts <dts-bounces@dpdk.org> On Behalf Of Yu Jiang > Sent: 2021年5月28日 15:53 > To: dts@dpdk.org > Cc: Jiang, YuX <yux.jiang@intel.com> > Subject: [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: support vdev > param > > Based on dpdk commit 8bfdd8a7f0f1 ("test/crypto: refactor to use sub test > suites"), unit test support vdev param. > > Signed-off-by: Yu Jiang <yux.jiang@intel.com> > --- > 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 > > 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="crypto_aesni_gcm" > + > +[test_cryptodev_aesni_mb_autotest] > +devtype="crypto_aesni_mb" > + > +[test_cryptodev_null_autotest] > +devtype="crypto_null" > + > +[test_cryptodev_openssl_autotest] > +devtype="crypto_openssl" > + > +[test_cryptodev_qat_asym_autotest] > +devtype="crypto_qat" > + > +[test_cryptodev_qat_autotest] > +devtype="crypto_qat" > + > +[test_cryptodev_scheduler_autotest] > +devtype="crypto_scheduler" > + > +[test_cryptodev_sw_kasumi_autotest] > +devtype="crypto_kasumi" > + > +[test_cryptodev_sw_snow3g_autotest] > +devtype="crypto_snow3g" > + > +[test_cryptodev_sw_zuc_autotest] > +devtype="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) > > + def _get_crypto_device(self, num): > + device = {} > + if self.get_case_cfg()["devtype"] == "crypto_aesni_mb": > + dev = "crypto_aesni_mb" > + elif self.get_case_cfg()["devtype"] == "crypto_qat": > + w = cc.get_qat_devices(self, cpm_num=1, num=num) > +# device["a"] = ' -a '.join(w) Please remove some useless comments, thanks > + device["vdev"] = None > + elif self.get_case_cfg()["devtype"] == "crypto_openssl": > + dev = "crypto_openssl" > + elif self.get_case_cfg()["devtype"] == "crypto_aesni_gcm": > + dev = "crypto_aesni_gcm" > + elif self.get_case_cfg()["devtype"] == "crypto_kasumi": > + dev = "crypto_kasumi" > + elif self.get_case_cfg()["devtype"] == "crypto_snow3g": > + dev = "crypto_snow3g" > + elif self.get_case_cfg()["devtype"] == "crypto_zuc": > + dev = "crypto_zuc" > + elif self.get_case_cfg()["devtype"] == "crypto_null": > + dev = "crypto_null" > + else: > + return {} > + > + if not device: > + vdev_list = [] > + for i in range(num): > + vdev = "{}{}".format(dev, i) > + vdev_list.append(vdev) > + # device["a"] = "0000:00:00.0" > + device["vdev"] = ' --vdev '.join(vdev_list) > + > + return device > + > def test_cryptodev_qat_autotest(self): > self.__run_unit_test("cryptodev_qat_autotest") > > @@ -105,7 +138,8 @@ class UnitTestsCryptodev(TestCase): > self.__run_unit_test("cryptodev_scheduler_autotest") > > def __run_unit_test(self, testsuite, timeout=600): > - eal_opt_str = cc.get_eal_opt_str(self) > + devices = self._get_crypto_device(num=1) > + eal_opt_str = cc.get_eal_opt_str(self, devices) > w = cc.get_qat_devices(self, num=1) > > self.logger.info("STEP_TEST: " + testsuite) > -- > 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 0/2] cryptodev unit test support vdev param 2021-05-28 7:53 [dts] [PATCH V1 0/2] cryptodev unit test support vdev param Yu Jiang 2021-05-28 7:53 ` [dts] [PATCH V1 1/2] tests/virtio_unit_cryptodev_func: " Yu Jiang 2021-05-28 7:53 ` [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: " Yu Jiang @ 2021-06-02 2:49 ` Jiang, YuX 2 siblings, 0 replies; 5+ messages in thread From: Jiang, YuX @ 2021-06-02 2:49 UTC (permalink / raw) To: dts >-----Original Message----- >From: Jiang, YuX <yux.jiang@intel.com> >Sent: Friday, May 28, 2021 3:53 PM >To: dts@dpdk.org >Cc: Jiang, YuX <yux.jiang@intel.com> >Subject: [dts][PATCH V1 0/2] cryptodev unit test support vdev param > >Based on dpdk commit 8bfdd8a7f0f1 ("test/crypto: refactor to use sub test >suites"), unit test support vdev param. > >Yu Jiang (2): > tests/virtio_unit_cryptodev_func: support vdev param > tests/unit_tests_cryptodev_func: support vdev param Tested-by: Yu Jiang <YuX.Jiang@intel.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-09 6:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-05-28 7:53 [dts] [PATCH V1 0/2] cryptodev unit test support vdev param Yu Jiang 2021-05-28 7:53 ` [dts] [PATCH V1 1/2] tests/virtio_unit_cryptodev_func: " Yu Jiang 2021-05-28 7:53 ` [dts] [PATCH V1 2/2] tests/unit_tests_cryptodev_func: " Yu Jiang 2021-06-09 6:30 ` Tu, Lijuan 2021-06-02 2:49 ` [dts] [PATCH V1 0/2] cryptodev unit test " Jiang, YuX
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).