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 4A702A00E6 for ; Mon, 2 Sep 2019 09:16:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 19CAD1D411; Mon, 2 Sep 2019 09:16:49 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 188CE1C02B for ; Mon, 2 Sep 2019 09:16:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2019 00:16:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,457,1559545200"; d="scan'208";a="381777801" Received: from dpdk-xinfengx-dut242.sh.intel.com ([10.67.116.235]) by fmsmga005.fm.intel.com with ESMTP; 02 Sep 2019 00:16:45 -0700 From: Xinfeng Zhao To: dts@dpdk.org Cc: Xinfeng Zhao Date: Mon, 2 Sep 2019 07:08:50 +0800 Message-Id: <1567379330-48023-1-git-send-email-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [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" 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 --- 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