From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C411F5A0F for ; Thu, 21 May 2015 10:55:19 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 21 May 2015 01:55:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,467,1427785200"; d="scan'208";a="729497846" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2015 01:55:17 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 21 May 2015 16:55:17 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.23]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.50]) with mapi id 14.03.0224.002; Thu, 21 May 2015 16:55:15 +0800 From: "Liu, Yong" To: "Tang, HaifengX" , "dts@dpdk.org" Thread-Topic: [PATCH] blacklist suite: fix cases for framework update Thread-Index: AQHQk5gdfi/+hkuUxkuwnJDOQG7yYJ2GGMcQgAAHscA= Date: Thu, 21 May 2015 08:55:16 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10E31C84@SHSMSX103.ccr.corp.intel.com> References: <1432193456-11681-1-git-send-email-jingguox.fu@intel.com> In-Reply-To: Accept-Language: zh-CN, 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 Cc: "Fu, JingguoX" Subject: Re: [dts] [PATCH] blacklist suite: fix cases for framework update 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: , X-List-Received-Date: Thu, 21 May 2015 08:55:20 -0000 Applied. Thx. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Tang, HaifengX > Sent: Thursday, May 21, 2015 4:34 PM > To: dts@dpdk.org > Cc: Fu, JingguoX > Subject: Re: [dts] [PATCH] blacklist suite: fix cases for framework updat= e >=20 > > > > > >-----Original Message----- > >From: Fu, JingguoX > >Sent: Thursday, May 21, 2015 3:31 PM > >Cc: Tang, HaifengX; Fu, JingguoX > >Subject: [PATCH] blacklist suite: fix cases for framework update > > > >Signed-off-by: Jingguo Fu > >--- > > tests/TestSuite_blacklist.py | 29 +++++------------------------ > > 1 file changed, 5 insertions(+), 24 deletions(-) > > > >diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py > index 8e9debd..04425ba 100644 > >--- a/tests/TestSuite_blacklist.py > >+++ b/tests/TestSuite_blacklist.py > >@@ -31,29 +31,20 @@ > > > > """ > > DPDK Test suite. > >- > > Test device blacklisting. > >- > > """ > >- > > import dts > >- > >- > > from test_case import TestCase > > from pmd_output import PmdOutput > > > >- > >-class TestBlacklist(TestCase): > >- > >+class TestBlackList(TestCase): > > def set_up_all(self): > > """ > > Run at the start of each test suite. > >- > > Blacklist Prerequisites. > > Requirements: > > Two Ports > > """ > >- > > self.ports =3D self.dut.get_ports() > > self.verify(len(self.ports) >=3D 2, "Insufficient ports for > testing") > > [arch, machine, self.env, toolchain] =3D self.target.split('-')= @@ > -87,9 +78,7 @@ class TestBlacklist(TestCase): > > regexp_blacklisted_port =3D self.regexp_blacklisted_por= t % > (int(pci.split(':')[0], 16), pci.split(':')[1]) > > else: > > regexp_blacklisted_port =3D self.regexp_blacklisted_por= t % > self.dut.ports_info[port]['pci'] > >- > > matching_ports =3D dts.regexp(output, regexp_blacklisted_po= rt, > True) > >- > > if blacklisted: > > self.verify(len(matching_ports) =3D=3D 1, > > "Blacklisted port is being initialized") @@ > -101,7 +90,7 @@ class TestBlacklist(TestCase): > > """ > > Run testpmd with no blacklisted device. > > """ > >- out =3D self.pmdout.start_testpmd("all") > >+ out =3D self.pmdout.start_testpmd("Default") > > rexp =3D r"Link" > > match_status =3D dts.regexp(out, rexp, True) > > > >@@ -112,9 +101,7 @@ class TestBlacklist(TestCase): > > Run testpmd with one port blacklisted. > > """ > > self.dut.kill_all() > >- > >- out =3D self.pmdout.start_testpmd("all", eal_param=3D"-b 0000:%= s -- > -i" % self.dut.ports_info[0]['pci']) > >- > >+ out =3D self.pmdout.start_testpmd("Default", eal_param=3D"-b > >+ 0000:%s -- -i" % self.dut.ports_info[0]['pci']) > > self.check_blacklisted_ports(out, self.ports[1:]) > > > > def test_bl_allbutoneportblacklisted(self): > >@@ -122,18 +109,13 @@ class TestBlacklist(TestCase): > > Run testpmd with all but one port blacklisted. > > """ > > self.dut.kill_all() > >- > > ports_to_blacklist =3D self.ports[:-1] > >- > > cmdline =3D "" > > for port in ports_to_blacklist: > > cmdline +=3D " -b 0000:%s" % self.dut.ports_info[port]['pci= '] > >- > >- out =3D self.pmdout.start_testpmd("all", eal_param=3Dcmdline) > >- > >+ out =3D self.pmdout.start_testpmd("Default", eal_param=3Dcmdlin= e) > > blacklisted_ports =3D self.check_blacklisted_ports(out, > >- > ports_to_blacklist, > >- True) > >+ ports_to_blacklist, True) > > > > def tear_down(self): > > """ > >@@ -141,7 +123,6 @@ class TestBlacklist(TestCase): > > Quit testpmd. > > """ > > self.dut.send_expect("quit", "# ", 10) > >- > > def tear_down_all(self): > > """ > > Run after each test suite. > >-- > >2.1.0 > > > > > Acked-by: Haifeng Tang