test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test
@ 2019-06-06  0:23 Xinfeng Zhao
  2019-06-06  0:23 ` [dts] [PATCH V1 2/3] tests: modify cryptodev suites to avoid Reaching the maximum number of crypto devices Xinfeng Zhao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Xinfeng Zhao @ 2019-06-06  0:23 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

add new case "cryptodev_qat_asym_autotest"

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@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_AESNI_GCM=y/' config/common_base", "# ")
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=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_AESNI_GCM=n/' config/common_base", "# ")
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-12  6:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06  0:23 [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Xinfeng Zhao
2019-06-06  0:23 ` [dts] [PATCH V1 2/3] tests: modify cryptodev suites to avoid Reaching the maximum number of crypto devices Xinfeng Zhao
2019-06-06  0:23 ` [dts] [PATCH V1 3/3] conf: modify the cryptodev conf and specify the qat crypto device Xinfeng Zhao
2019-06-11  7:10 ` [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Zhao, XinfengX
2019-06-12  6:31 ` Tu, Lijuan

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).