test suite reviews and discussions
 help / color / mirror / Atom feed
From: Peng Zhihong <zhihongx.peng@intel.com>
To: dts@dpdk.org
Cc: Peng Zhihong <zhihongx.peng@intel.com>
Subject: [dts] [PATCH V2] tests/TestSuite_userspace_ethtool.py:Before the exception exit, it needs to be re-bound to the DPDK.
Date: Tue,  5 Nov 2019 11:30:42 +0800	[thread overview]
Message-ID: <20191105033042.19599-1-zhihongx.peng@intel.com> (raw)

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


             reply	other threads:[~2019-11-05  3:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05  3:30 Peng Zhihong [this message]
2019-11-22  3:04 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191105033042.19599-1-zhihongx.peng@intel.com \
    --to=zhihongx.peng@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).