From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 77C45A00E6 for ; Mon, 2 Sep 2019 09:17:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65C321D163; Mon, 2 Sep 2019 09:17:50 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C34ED1C02B for ; Mon, 2 Sep 2019 09:17:48 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2019 00:17:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,457,1559545200"; d="scan'208";a="357413967" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 02 Sep 2019 00:17:47 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 2 Sep 2019 00:17:47 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 2 Sep 2019 00:17:47 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.113]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.32]) with mapi id 14.03.0439.000; Mon, 2 Sep 2019 15:17:45 +0800 From: "Zhao, XinfengX" To: "dts@dpdk.org" CC: "Chen, Zhaoyan" Thread-Topic: [dts][PATCH] tests: fix ethx with i40e diver link down failed Thread-Index: AQHVYV5mBArAWp2+5U+x6ZXD61Jdm6cX+inQ Date: Mon, 2 Sep 2019 07:17:45 +0000 Message-ID: <44051B25D8C8784BB77FFB604D6A70CA12084F3A@shsmsx102.ccr.corp.intel.com> References: <1567379330-48023-1-git-send-email-xinfengx.zhao@intel.com> In-Reply-To: <1567379330-48023-1-git-send-email-xinfengx.zhao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] tests: fix ethx with i40e diver link down failed X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Tested-by: Zhao, XinfengX -----Original Message----- From: Zhao, XinfengX=20 Sent: Monday, September 2, 2019 7:09 AM To: dts@dpdk.org Cc: Zhao, XinfengX 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 wi= ll go down when the interface is brought down using the ifconfig ethX down = command. Signed-off-by: Xinfeng Zhao --- 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_lin= k_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 =3D self.tester.get_interface( - self.tester.get_local_port(dutPort)) + tester_port =3D self.tester.get_local_port(dutPort) + self.intf =3D self.tester.get_interface(tester_port) + tester_driver =3D self.tester.ports_info[tester_port]['port'].get_= nic_driver() + if tester_driver =3D=3D "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 =3D "Port %s Link %s" % (dutPort, status)=20 out =3D self.dut.get_session_output(timeout=3D60) self.verify(verify_point in out, "link status update error") -- 2.17.1