test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] Before the exception exit, it needs to be re-bound to the DPDK.
@ 2019-11-04  6:21 Peng Zhihong
  2019-11-05  1:53 ` Ma, LihongX
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Zhihong @ 2019-11-04  6:21 UTC (permalink / raw)
  To: dts; +Cc: Peng Zhihong

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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 116fd3a..16d7f5c 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -335,7 +335,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)
+            if "register" not in out or "CTRL" not in out:
+                portinfo['net_dev'].bind_driver(portinfo['ori_driver'])
+                raise VerifyFailure("Failed to dump %s registers" % intf)
 
         for index in range(len(self.ports)):
             # bind to original driver
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] Before the exception exit, it needs to be re-bound to the DPDK.
  2019-11-04  6:21 [dts] [PATCH V1] Before the exception exit, it needs to be re-bound to the DPDK Peng Zhihong
@ 2019-11-05  1:53 ` Ma, LihongX
  0 siblings, 0 replies; 2+ messages in thread
From: Ma, LihongX @ 2019-11-05  1:53 UTC (permalink / raw)
  To: Peng, ZhihongX, dts; +Cc: Peng, ZhihongX

Hi, zhihong
Please add the prefix 'dir/suite_name' to you subject, like 'tests/userspace_ethtool: Before the exception exit, it needs to be re-bound to the DPDK'
And becasuse the ports number greather than 1, as you modify, if the verify failed on second port, it will only re-bound the second port, the first port is also bind on system driver.
I think you should optimization the code.
By the way, in this suite, case test_dump_driver_info also have this issue, please modify code together.

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Zhihong
Sent: Monday, November 4, 2019 2:21 PM
To: dts@dpdk.org
Cc: Peng, ZhihongX <zhihongx.peng@intel.com>
Subject: [dts] [PATCH V1] Before the exception exit, it needs to be re-bound to the DPDK.

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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 116fd3a..16d7f5c 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -335,7 +335,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)
+            if "register" not in out or "CTRL" not in out:
+                portinfo['net_dev'].bind_driver(portinfo['ori_driver'])
+                raise VerifyFailure("Failed to dump %s registers" % intf)
 
         for index in range(len(self.ports)):
             # bind to original driver
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-05  1:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04  6:21 [dts] [PATCH V1] Before the exception exit, it needs to be re-bound to the DPDK Peng Zhihong
2019-11-05  1:53 ` Ma, LihongX

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