[V1] tests/cryptodev_func: adapt drivername

Message ID 20201012163052.1266901-1-yux.jiang@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/cryptodev_func: adapt drivername |

Commit Message

Yu Jiang Oct. 12, 2020, 4:30 p.m. UTC
  From: JiangYu <yux.jiang@intel.com>

adapt drivername dynamically

Signed-off-by: JiangYu <yux.jiang@intel.com>
---
 tests/TestSuite_ipsec_gw_cryptodev_func.py     | 2 +-
 tests/TestSuite_l2fwd_cryptodev_func.py        | 2 +-
 tests/TestSuite_virtio_ipsec_cryptodev_func.py | 7 +++----
 tests/TestSuite_virtio_perf_cryptodev_func.py  | 7 +++----
 tests/TestSuite_virtio_unit_cryptodev_func.py  | 2 +-
 5 files changed, 9 insertions(+), 11 deletions(-)
  

Comments

Yu Jiang Oct. 12, 2020, 8:32 a.m. UTC | #1
Tested-by: JiangYuX <yux.jiang@intel.com>

    Best Regards
    Jiang yu

> -----Original Message-----
> From: JiangYuX [mailto:yux.jiang@intel.com]
> Sent: Tuesday, October 13, 2020 12:31 AM
> To: dts@dpdk.org
> Cc: Jiang, YuX <yux.jiang@intel.com>
> Subject: [dts] [PATCH V1] tests/cryptodev_func: adapt drivername
  
Tu, Lijuan Oct. 12, 2020, 8:56 a.m. UTC | #2
> adapt drivername dynamically
> 
> Signed-off-by: JiangYu <yux.jiang@intel.com>

Applied
  

Patch

diff --git a/tests/TestSuite_ipsec_gw_cryptodev_func.py b/tests/TestSuite_ipsec_gw_cryptodev_func.py
index 538b939..472b65c 100644
--- a/tests/TestSuite_ipsec_gw_cryptodev_func.py
+++ b/tests/TestSuite_ipsec_gw_cryptodev_func.py
@@ -76,7 +76,7 @@  class TestIPsecGW(TestCase):
         self.verify("Error"not in out,"Compilation error")
         self.verify("No such"not in out,"Compilation error")
 
-        cc.bind_qat_device(self)
+        cc.bind_qat_device(self, self.drivername)
 
         self._default_ipsec_gw_opts = {
             "config": '"(0,0,%s),(1,0,%s)"' % tuple(self.core_list[-2:]),
diff --git a/tests/TestSuite_l2fwd_cryptodev_func.py b/tests/TestSuite_l2fwd_cryptodev_func.py
index 664aa14..8bafb65 100644
--- a/tests/TestSuite_l2fwd_cryptodev_func.py
+++ b/tests/TestSuite_l2fwd_cryptodev_func.py
@@ -87,7 +87,7 @@  class TestL2fwdCrypto(TestCase):
         self.verify("Error" not in out, "Compilation error")
         self.verify("No such" not in out, "Compilation error")
 
-        cc.bind_qat_device(self)
+        cc.bind_qat_device(self, self.drivername)
 
     def set_up(self):
         pass
diff --git a/tests/TestSuite_virtio_ipsec_cryptodev_func.py b/tests/TestSuite_virtio_ipsec_cryptodev_func.py
index 3957ee5..d30e0d7 100644
--- a/tests/TestSuite_virtio_ipsec_cryptodev_func.py
+++ b/tests/TestSuite_virtio_ipsec_cryptodev_func.py
@@ -78,7 +78,7 @@  class VirtioCryptodevIpsecTest(TestCase):
         if not cc.is_build_skip(self):
             self.dut.skip_setup = False
             cc.build_dpdk_with_cryptodev(self)
-        cc.bind_qat_device(self)
+        cc.bind_qat_device(self, self.drivername)
         self.dut.build_dpdk_apps("./examples/vhost_crypto")
         self.bind_vfio_pci()
 
@@ -231,9 +231,8 @@  class VirtioCryptodevIpsecTest(TestCase):
 
         if not self.dut.skip_setup:
             self.build_user_dpdk(vm_dut)
-
-        vm_dut.setup_modules(self.target, "igb_uio", None)
-        vm_dut.bind_interfaces_linux('igb_uio')
+        vm_dut.setup_modules(self.target, self.drivername, None)
+        vm_dut.bind_interfaces_linux(self.drivername)
         vm.virtio_list = self.set_virtio_pci(vm_dut)
         self.logger.info("{} virtio list: {}".format(vm_name, vm.virtio_list))
         vm.cores = vm_dut.get_core_list("all")
diff --git a/tests/TestSuite_virtio_perf_cryptodev_func.py b/tests/TestSuite_virtio_perf_cryptodev_func.py
index e46ee2f..fc319dd 100644
--- a/tests/TestSuite_virtio_perf_cryptodev_func.py
+++ b/tests/TestSuite_virtio_perf_cryptodev_func.py
@@ -86,7 +86,7 @@  class VirtioCryptodevPerfTest(TestCase):
             self.dut.skip_setup = False
             cc.build_dpdk_with_cryptodev(self)
         self.dut.build_dpdk_apps("./examples/vhost_crypto")
-        cc.bind_qat_device(self)
+        cc.bind_qat_device(self, self.drivername)
 
         self.vf_assign_method = "vfio-pci"
         self.dut.setup_modules(None, self.vf_assign_method, None)
@@ -191,9 +191,8 @@  class VirtioCryptodevPerfTest(TestCase):
 
         if not self.dut.skip_setup:
             self.build_user_dpdk(vm_dut)
-
-        vm_dut.setup_modules(self.target, "igb_uio", None)
-        vm_dut.bind_interfaces_linux('igb_uio')
+        vm_dut.setup_modules(self.target, self.drivername, None)
+        vm_dut.bind_interfaces_linux(self.drivername)
         vm.virtio_list = self.set_virtio_pci(vm_dut)
         self.logger.info("{} virtio list: {}".format(vm_name, vm.virtio_list))
         vm.cores = vm_dut.get_core_list("all")
diff --git a/tests/TestSuite_virtio_unit_cryptodev_func.py b/tests/TestSuite_virtio_unit_cryptodev_func.py
index 336af7a..ee42b5d 100644
--- a/tests/TestSuite_virtio_unit_cryptodev_func.py
+++ b/tests/TestSuite_virtio_unit_cryptodev_func.py
@@ -57,7 +57,7 @@  class VirtioCryptodevUnitTest(TestCase):
         if not cc.is_build_skip(self):
             self.dut.skip_setup = False
             cc.build_dpdk_with_cryptodev(self)
-        cc.bind_qat_device(self)
+        cc.bind_qat_device(self, self.drivername)
         self.dut.build_dpdk_apps("./examples/vhost_crypto")
 
         self.vf_assign_method = "vfio-pci"