test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V2] tests/TestSuite_userspace_ethtool.py:Before the exception exit, it needs to be re-bound to the DPDK.
@ 2019-11-05  3:30 Peng Zhihong
  0 siblings, 0 replies; only message in thread
From: Peng Zhihong @ 2019-11-05  3:30 UTC (permalink / raw)
  To: dts; +Cc: Peng Zhihong

tests/TestSuite_userspace_ethtool.py:Before the exception exit, it needs to be re-bound to the DPDK.

Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
---
 tests/TestSuite_userspace_ethtool.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 92724aa..31f8a87 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -247,12 +247,9 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
             sys_nic_info = self.linux_get_nic_info(intf_name)
             status, msg = self.check_driver_info(intf_name, sys_nic_info, dpdk_nic_infos[str(index)])
             self.logger.info(msg)
-            self.verify(status, msg)
-
-        for index in range(len(self.ports)):
             # bind to original driver
-            portinfo = portsinfo[index]
             portinfo['net_dev'].bind_driver(portinfo['ori_driver'])
+            self.verify(status, msg)
 
         self.dut.send_expect(self.cmd, "EthApp>", 60)
         # ethtool doesn't support port disconnect by tools of linux 
@@ -335,12 +332,9 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
             # get linux interface
             intf = netdev.get_interface_name()
             out = self.dut.send_expect("ethtool -d %s raw off file %s" % (intf, portinfo['reg_file']), "# ")
-            self.verify(("register" in out and "CTRL" in out), "Failed to dump %s registers" % intf)
-
-        for index in range(len(self.ports)):
             # bind to original driver
-            portinfo = portsinfo[index]
             portinfo['net_dev'].bind_driver(portinfo['ori_driver'])
+            self.verify(("register" in out and "CTRL" in out), "Failed to dump %s registers" % intf)
 
     def test_retrieve_eeprom(self):
         """
-- 
2.17.1


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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05  3:30 [dts] [PATCH V2] tests/TestSuite_userspace_ethtool.py:Before the exception exit, it needs to be re-bound to the DPDK Peng Zhihong

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox