test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH] tests: fix ethx with i40e diver link down failed
@ 2019-09-01 23:08 Xinfeng Zhao
  2019-09-02  7:17 ` Zhao, XinfengX
  0 siblings, 1 reply; 2+ messages in thread
From: Xinfeng Zhao @ 2019-09-01 23:08 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

When the link-down-on-close private flag is set to "on",
the port's link will go down when the interface is brought down using the ifconfig ethX down command.

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 tests/TestSuite_link_status_interrupt.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_link_status_interrupt.py b/tests/TestSuite_link_status_interrupt.py
index 82cefce..9909d78 100644
--- a/tests/TestSuite_link_status_interrupt.py
+++ b/tests/TestSuite_link_status_interrupt.py
@@ -75,10 +75,15 @@ class TestLinkStatusInterrupt(TestCase):
         """
         set link status verify results
         """
-        self.intf = self.tester.get_interface(
-            self.tester.get_local_port(dutPort))
+        tester_port = self.tester.get_local_port(dutPort)
+        self.intf = self.tester.get_interface(tester_port)
+        tester_driver = self.tester.ports_info[tester_port]['port'].get_nic_driver()
+        if tester_driver == "i40e":
+            self.tester.send_expect("ethtool --set-priv-flags %s link-down-on-close on" %
+                                    self.intf, "# ", 10)
         self.tester.send_expect("ifconfig %s %s" %
                                 (self.intf, status.lower()), "# ", 10)
+
         verify_point = "Port %s Link %s" % (dutPort, status) 
         out = self.dut.get_session_output(timeout=60)
         self.verify(verify_point in out, "link status update error")
-- 
2.17.1


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

* Re: [dts] [PATCH] tests: fix ethx with i40e diver link down failed
  2019-09-01 23:08 [dts] [PATCH] tests: fix ethx with i40e diver link down failed Xinfeng Zhao
@ 2019-09-02  7:17 ` Zhao, XinfengX
  0 siblings, 0 replies; 2+ messages in thread
From: Zhao, XinfengX @ 2019-09-02  7:17 UTC (permalink / raw)
  To: dts; +Cc: Chen, Zhaoyan

Tested-by: Zhao, XinfengX <xinfengx.zhao@intel.com>

-----Original Message-----
From: Zhao, XinfengX 
Sent: Monday, September 2, 2019 7:09 AM
To: dts@dpdk.org
Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
Subject: [dts][PATCH] tests: fix ethx with i40e diver link down failed

When the link-down-on-close private flag is set to "on", the port's link will go down when the interface is brought down using the ifconfig ethX down command.

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 tests/TestSuite_link_status_interrupt.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_link_status_interrupt.py b/tests/TestSuite_link_status_interrupt.py
index 82cefce..9909d78 100644
--- a/tests/TestSuite_link_status_interrupt.py
+++ b/tests/TestSuite_link_status_interrupt.py
@@ -75,10 +75,15 @@ class TestLinkStatusInterrupt(TestCase):
         """
         set link status verify results
         """
-        self.intf = self.tester.get_interface(
-            self.tester.get_local_port(dutPort))
+        tester_port = self.tester.get_local_port(dutPort)
+        self.intf = self.tester.get_interface(tester_port)
+        tester_driver = self.tester.ports_info[tester_port]['port'].get_nic_driver()
+        if tester_driver == "i40e":
+            self.tester.send_expect("ethtool --set-priv-flags %s link-down-on-close on" %
+                                    self.intf, "# ", 10)
         self.tester.send_expect("ifconfig %s %s" %
                                 (self.intf, status.lower()), "# ", 10)
+
         verify_point = "Port %s Link %s" % (dutPort, status) 
         out = self.dut.get_session_output(timeout=60)
         self.verify(verify_point in out, "link status update error")
--
2.17.1


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-01 23:08 [dts] [PATCH] tests: fix ethx with i40e diver link down failed Xinfeng Zhao
2019-09-02  7:17 ` Zhao, XinfengX

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