test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Zhao, XinfengX" <xinfengx.zhao@intel.com>
To: "dts@dpdk.org" <dts@dpdk.org>
Cc: "Chen, Zhaoyan" <zhaoyan.chen@intel.com>
Subject: Re: [dts] [PATCH] tests: fix ethx with i40e diver link down failed
Date: Mon, 2 Sep 2019 07:17:45 +0000	[thread overview]
Message-ID: <44051B25D8C8784BB77FFB604D6A70CA12084F3A@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1567379330-48023-1-git-send-email-xinfengx.zhao@intel.com>

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


      reply	other threads:[~2019-09-02  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-01 23:08 Xinfeng Zhao
2019-09-02  7:17 ` Zhao, XinfengX [this message]

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=44051B25D8C8784BB77FFB604D6A70CA12084F3A@shsmsx102.ccr.corp.intel.com \
    --to=xinfengx.zhao@intel.com \
    --cc=dts@dpdk.org \
    --cc=zhaoyan.chen@intel.com \
    /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).