[dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test

Tu, Lijuan lijuan.tu at intel.com
Wed Jun 12 08:31:06 CEST 2019


Applied the series.

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Xinfeng Zhao
> Sent: Thursday, June 6, 2019 8:23 AM
> To: dts at dpdk.org
> Cc: Zhao, XinfengX <xinfengx.zhao at intel.com>
> Subject: [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test
> 
> add new case "cryptodev_qat_asym_autotest"
> 
> Signed-off-by: Xinfeng Zhao <xinfengx.zhao at intel.com>
> ---
>  tests/TestSuite_unit_tests_cryptodev_func.py |  4 ++++
>  tests/cryptodev_common.py                    | 16 +++++++++++++---
>  2 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py
> b/tests/TestSuite_unit_tests_cryptodev_func.py
> index 3b62e04..d6b01f0 100644
> --- a/tests/TestSuite_unit_tests_cryptodev_func.py
> +++ b/tests/TestSuite_unit_tests_cryptodev_func.py
> @@ -57,6 +57,10 @@ class UnitTestsCryptodev(TestCase):
>          eal_opt_str = cc.get_eal_opt_str(self)
>          self.__run_unit_test("cryptodev_qat_autotest", eal_opt_str)
> 
> +    def test_cryptodev_qat_asym_autotest(self):
> +        eal_opt_str = cc.get_eal_opt_str(self)
> +        self.__run_unit_test("cryptodev_qat_asym_autotest",
> + eal_opt_str)
> +
>      def _test_cryptodev_qat_perftest(self):
>          eal_opt_str = cc.get_eal_opt_str(self)
>          self.__run_unit_test("cryptodev_qat_perftest", eal_opt_str) diff --git
> a/tests/cryptodev_common.py b/tests/cryptodev_common.py index
> 5570f7a..2e86bca 100644
> --- a/tests/cryptodev_common.py
> +++ b/tests/cryptodev_common.py
> @@ -56,6 +56,8 @@ def build_dpdk_with_cryptodev(test_case):
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_
> SYM=y/' config/common_base", "# ")
>      test_case.dut.send_expect(
> +        "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT
> _ASYM=y/' config/common_base", "# ")
> +    test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n$/CONFIG_RTE_LIBRTE_PMD_AE
> SNI_GCM=y/' config/common_base", "# ")
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n$/CONFIG_RTE_LIBRTE_PMD_OPENS
> SL=y/' config/common_base", "# ") @@ -103,6 +105,8 @@ def
> clear_dpdk_config(test_case):
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_
> SYM=n/' config/common_base", "# ")
>      test_case.dut.send_expect(
> +        "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT
> _ASYM=n/' config/common_base", "# ")
> +    test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y$/CONFIG_RTE_LIBRTE_PMD_AES
> NI_GCM=n/' config/common_base", "# ")
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y$/CONFIG_RTE_LIBRTE_PMD_OPENS
> SL=n/' config/common_base", "# ") @@ -124,11 +128,11 @@
> default_eal_opts = {  }
> 
> 
> -def get_eal_opt_str(test_case, override_eal_opts={}):
> -    return get_opt_str(test_case, default_eal_opts, override_eal_opts)
> +def get_eal_opt_str(test_case, override_eal_opts={}, add_port=False):
> +    return get_opt_str(test_case, default_eal_opts, override_eal_opts,
> +add_port)
> 
> 
> -def get_opt_str(test_case, default_opts, override_opts={}):
> +def get_opt_str(test_case, default_opts, override_opts={}, add_port=False):
>      opts = default_opts.copy()
> 
>      # Update options with test suite/case config file @@ -136,6 +140,12 @@
> def get_opt_str(test_case, default_opts, override_opts={}):
>          if key in test_case.get_case_cfg():
>              opts[key] = test_case.get_case_cfg()[key]
> 
> +    pci_list = [port["pci"] for port in test_case.dut.ports_info]
> +    if 'w' in opts.keys() and opts['w']:
> +        pci_list.append(opts['w'])
> +    if add_port and pci_list:
> +        opts['w'] = " -w ".join(pci_list)
> +
>      # Update options with func input
>      opts.update(override_opts)
> 
> --
> 2.7.4



More information about the dts mailing list