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 1D9CFA0093; Tue, 19 May 2020 03:57:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0C4D11D54F; Tue, 19 May 2020 03:57:42 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 980C31D515 for ; Tue, 19 May 2020 03:57:39 +0200 (CEST) IronPort-SDR: znvCgN+x9E6/Xedziy/xSyl7gM9ZqtSi5hRpWYxoNYLGvFYbabZw/erLEAKEx3ri7Hfl4V27bN uoscLXQHPbCA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 18:57:38 -0700 IronPort-SDR: 9JmuAlheY0IvVgl1MMYLVv2Z45S84NaGVKTIuUDWu+gfh7sOqFqKNgcFbt1dom+xipTXCMsP+m siZCjK7UbAFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,408,1583222400"; d="scan'208";a="288789069" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 18 May 2020 18:57:38 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 18:57:38 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.178]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.232]) with mapi id 14.03.0439.000; Tue, 19 May 2020 09:57:35 +0800 From: "Tu, Lijuan" To: "Zhang, XiX" , "dts@dpdk.org" CC: "Zhang, XiX" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment Thread-Index: AQHWKZvtN45aLg4LX0elWlGisKWnmaiurnww Date: Tue, 19 May 2020 01:57:34 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC3EDA6@SHSMSX101.ccr.corp.intel.com> References: <1589425015-15694-1-git-send-email-xix.zhang@intel.com> In-Reply-To: <1589425015-15694-1-git-send-email-xix.zhang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action 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 V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xizhan4x > Sent: Thursday, May 14, 2020 10:57 AM > To: dts@dpdk.org > Cc: Zhang, XiX > Subject: [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verificati= on > method of blacklist equipment >=20 >=20 >=20 > Echo changes after testpmd starts,Modify the verification method of black= list > equipment >=20 > Signed-off-by: xizhan4x > --- > tests/TestSuite_blacklist.py | 22 ++++++++++------------ > 1 file changed, 10 insertions(+), 12 deletions(-) >=20 > diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py = index > eb56759..64360bb 100644 > --- a/tests/TestSuite_blacklist.py > +++ b/tests/TestSuite_blacklist.py > @@ -36,6 +36,7 @@ Test device blacklisting. > import utils > from test_case import TestCase > from pmd_output import PmdOutput > +from settings import DRIVERS >=20 > class TestBlackList(TestCase): > def set_up_all(self): > @@ -48,11 +49,7 @@ class TestBlackList(TestCase): > self.ports =3D self.dut.get_ports(self.nic) > self.verify(len(self.ports) >=3D 2, "Insufficient ports for test= ing") > [arch, machine, self.env, toolchain] =3D self.target.split('-') > - > - if self.env =3D=3D 'bsdapp': > - self.regexp_blacklisted_port =3D "EAL: PCI device 0000:%02x:= %s on > NUMA socket [-0-9]+[^\n]*\nEAL: Device is blacklisted, not initializing= " > - else: > - self.regexp_blacklisted_port =3D "EAL: PCI device %s on NUMA= socket [- > 0-9]+[^\n]*\nEAL: Device is blacklisted, not initializing" > + self.regexp_blacklisted_port =3D "Probe PCI driver: net_%s \(%s\= ) > device: %s \(socket [-0-9]+\)" > self.pmdout =3D PmdOutput(self.dut) >=20 > def set_up(self): > @@ -73,17 +70,18 @@ class TestBlackList(TestCase): > # Look for the PCI ID of each card followed by > # "Device is blacklisted, not initializing" but avoid to con= sume more > # than one device. > - if self.env =3D=3D 'bsdapp': > - pci =3D self.dut.ports_info[port]['pci'] > - regexp_blacklisted_port =3D self.regexp_blacklisted_port= % > (int(pci.split(':')[0], 16), pci.split(':')[1]) > - else: > - regexp_blacklisted_port =3D self.regexp_blacklisted_port= % > self.dut.ports_info[port]['pci'] > + port_pci =3D self.dut.ports_info[port]['pci'] > + if self.env =3D=3D "bsdapp": > + port_pci =3D ':'.join(["0000", port_pci]) > + regexp_blacklisted_port =3D self.regexp_blacklisted_port % ( > + DRIVERS.get(self.nic), self.dut.ports_info[port]['type']= , > + port_pci) > matching_ports =3D utils.regexp(output, regexp_blacklisted_p= ort, True) > if blacklisted: > - self.verify(len(matching_ports) =3D=3D 1, > + self.verify(len(matching_ports) =3D=3D 0, > "Blacklisted port is being initialized") > else: > - self.verify(len(matching_ports) =3D=3D 0, > + self.verify(len(matching_ports) =3D=3D 1, > "Not blacklisted port is being blacklisted") >=20 > def test_bl_noblacklisted(self): > -- > 2.17.2