[dts] [PATCH V1] tests/*: optimize scripts

Song Jiale songx.jiale at intel.com
Fri Oct 28 16:19:56 CEST 2022


the network card does not support a driver named "default", modify "default" to the actual driver.

Signed-off-by: Song Jiale <songx.jiale at intel.com>
---
 tests/TestSuite_iavf.py          | 2 +-
 tests/TestSuite_kernelpf_iavf.py | 2 +-
 tests/TestSuite_vf_jumboframe.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_iavf.py b/tests/TestSuite_iavf.py
index 5444a7e3..5315c96e 100644
--- a/tests/TestSuite_iavf.py
+++ b/tests/TestSuite_iavf.py
@@ -147,7 +147,7 @@ class TestIavf(TestCase):
             self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_1)
             port = self.dut.ports_info[self.used_dut_port_1]["port"]
             self.used_dut_port_1 = None
-        self.bind_nic_driver(self.dut_ports[:2], driver="default")
+        self.bind_nic_driver(self.dut_ports[:2], driver=self.drivername)
         self.env_done = False
 
     def send_packet(self, mac, itf, tran_type="udp", count=1, pktLength=64, VID=100):
diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 73435339..381c52e4 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -172,7 +172,7 @@ class TestKernelpfIavf(TestCase):
             self.dut.destroy_sriov_vfs_by_port(self.used_dut_port)
             self.used_dut_port = None
 
-        self.bind_nic_driver(self.dut_ports, driver="default")
+        self.bind_nic_driver(self.dut_ports, driver=self.drivername)
 
         self.env_done = False
 
diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py
index 42609e32..a6366b2d 100644
--- a/tests/TestSuite_vf_jumboframe.py
+++ b/tests/TestSuite_vf_jumboframe.py
@@ -117,7 +117,7 @@ class TestVfJumboFrame(TestCase):
         if getattr(self, "used_dut_port", None) != None:
             self.dut.destroy_sriov_vfs_by_port(self.used_dut_port)
             self.used_dut_port = None
-        self.bind_nic_driver(self.dut_ports[:1], driver="default")
+        self.bind_nic_driver(self.dut_ports[:1], driver=self.drivername)
 
         self.env_done = False
 
-- 
2.17.1



More information about the dts mailing list