test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 4/9] tests/vhost_user_interrupt:modify hard code bind cbdma device to igb_uio by drivername in execution.cfg
@ 2021-03-19  6:46 Ling Wei
  0 siblings, 0 replies; only message in thread
From: Ling Wei @ 2021-03-19  6:46 UTC (permalink / raw)
  To: dts; +Cc: Ling Wei

1.Modify hard code bind cbdma device to igb_uio by drivername
 in execution.cfg.
2.Move bind cbdma to kernel from tear_down_all to tear_down.

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_vhost_user_interrupt.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_vhost_user_interrupt.py b/tests/TestSuite_vhost_user_interrupt.py
index 2a101991..53f407fa 100644
--- a/tests/TestSuite_vhost_user_interrupt.py
+++ b/tests/TestSuite_vhost_user_interrupt.py
@@ -114,6 +114,9 @@ class TestVhostUserInterrupt(TestCase):
         """
         get all cbdma ports
         """
+        # check driver name in execution.cfg
+        self.verify(self.drivername == 'igb_uio',
+                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
         str_info = 'Misc (rawdev) devices using kernel driver'
         out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
         device_info = out.split('\n')
@@ -139,9 +142,7 @@ class TestVhostUserInterrupt(TestCase):
             dmas_info += dmas
         self.dmas_info = dmas_info[:-1]
         self.device_str = ' '.join(used_cbdma)
-        self.dut.setup_modules(self.target, "igb_uio","None")
-        self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s %s' %
-                             ("igb_uio", self.device_str, self.pci_info), '# ', 60)
+        self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s' % (self.drivername, self.device_str), '# ', 60)
 
     def bind_cbdma_device_to_kernel(self):
         if self.device_str is not None:
@@ -285,13 +286,12 @@ class TestVhostUserInterrupt(TestCase):
         self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#")
         self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
         self.dut.kill_all()
+        self.bind_cbdma_device_to_kernel()
 
     def tear_down_all(self):
         """
         Run after each test suite.
         """
         # revert the code
-        self.bind_cbdma_device_to_kernel()
         self.dut.send_expect("mv ./main.c ./examples/l3fwd-power/", "#")
         self.dut.build_dpdk_apps('examples/l3fwd-power')
-        pass
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-19  6:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  6:46 [dts] [PATCH V1 4/9] tests/vhost_user_interrupt:modify hard code bind cbdma device to igb_uio by drivername in execution.cfg Ling Wei

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