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 8946BA0588; Fri, 17 Apr 2020 05:04:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7798C1DE2B; Fri, 17 Apr 2020 05:04:18 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A5FE01DB26 for ; Fri, 17 Apr 2020 05:04:16 +0200 (CEST) IronPort-SDR: MohU87rHPp709/J51AfhI3efwXdPG27al8THUBZzrXYPPddRdSkMT+jGQxL4llHygql8HegxhC iHACda57rCeA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 20:04:15 -0700 IronPort-SDR: qhu0IJJfJ8ZeIxtnTVncCM07ZcLlQrHrg873NyTqcHwLlJaSt48iLPJqwoI6pUkQceQczTdmSB q1yR8YOlQV+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,393,1580803200"; d="scan'208";a="455491618" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 16 Apr 2020 20:04:15 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Apr 2020 20:04:15 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 17 Apr 2020 11:04:12 +0800 Received: from shsmsx602.ccr.corp.intel.com ([10.109.6.142]) by SHSMSX602.ccr.corp.intel.com ([10.109.6.142]) with mapi id 15.01.1713.004; Fri, 17 Apr 2020 11:04:12 +0800 From: "Zhao, XinfengX" To: "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1]link_status_interrupt: setup link-down-on-close on tester for this suite Thread-Index: AQHWFF+3oTr1TLyXNECZlllx4zggmKh8oE0A Date: Fri, 17 Apr 2020 03:04:12 +0000 Message-ID: References: <1587090033-272429-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1587090033-272429-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1]link_status_interrupt: setup link-down-on-close on tester for this suite 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" Please re-validate your patch with ixgbe card -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai Sent: Friday, April 17, 2020 10:21 AM To: dts@dpdk.org Cc: Xiao, QimaiX Subject: [dts] [PATCH V1]link_status_interrupt: setup link-down-on-close on= tester for this suite *. set up link-down-on-close on tester side to support this suite=20 Signed-off-by: Xiao Qimai --- tests/TestSuite_link_status_interrupt.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_link_status_interrupt.py b/tests/TestSuite_lin= k_status_interrupt.py index 3208d71..097bb8e 100644 --- a/tests/TestSuite_link_status_interrupt.py +++ b/tests/TestSuite_link_status_interrupt.py @@ -70,6 +70,22 @@ class TestLinkStatusInterrupt(TestCase): self.basic_intr_mode =3D ["msix", "legacy"] if self.drivername =3D=3D "vfio-pci": self.basic_intr_mode.append("msi") + self.intfs =3D [self.tester.get_interface(self.tester.get_local_po= rt(i)) for i in self.dut_ports] + # check link-down-on-close flag + self.flag =3D "link-down-on-close" + for intf in self.intfs: + check_flag =3D "ethtool --show-priv-flags %s" % intf + set_flag =3D "ethtool --set-priv-flags %s %s on" % (intf, self= .flag) + out =3D self.tester.send_expect(check_flag, "#") + p =3D re.compile('%s\s+:\s+(\w+)' % self.flag) + res =3D re.search(p, out).group(1) + if res =3D=3D "off": + self.tester.send_expect(set_flag, "#") + time.sleep(0.5) + out =3D self.tester.send_expect(check_flag, "#") + self.verify(re.search(p, out).group(1) =3D=3D "on", "set %= s %s on failed" % (intf, self.flag)) + elif not res: + self.logger.info("NIC %s might not support this case" %=20 + intf) =20 def set_link_status_and_verify(self, dutPort, status): """ @@ -93,7 +109,6 @@ class TestLinkStatusInterrupt(TestCase): """ Verify Link status change =20 """ - if self.drivername =3D=3D "igb_uio": cmdline =3D self.path + " -c %s -n %s -- -p %s " % ( self.coremask, self.dut.get_memory_channels(), self.portma= sk) @@ -191,4 +206,5 @@ class TestLinkStatusInterrupt(TestCase): """ Run after each test suite. """ - pass + for i in self.intfs: + self.tester.send_expect("ethtool --set-priv-flags %s %s=20 + off" % (i, self.flag), "#") -- 1.8.3.1