From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D0D03AD9C for ; Wed, 4 Feb 2015 07:51:01 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 03 Feb 2015 22:50:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,517,1418112000"; d="scan'208";a="672454361" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by fmsmga002.fm.intel.com with ESMTP; 03 Feb 2015 22:50:59 -0800 Received: from kmsmsx154.gar.corp.intel.com (172.21.73.14) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 4 Feb 2015 14:50:42 +0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by KMSMSX154.gar.corp.intel.com (172.21.73.14) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 4 Feb 2015 14:50:42 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.253]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.91]) with mapi id 14.03.0195.001; Wed, 4 Feb 2015 14:50:42 +0800 From: "Qiu, Michael" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH v2 4/4] suites: remove nic type check from testsuites Thread-Index: AQHQQEYIvnqAJMewHEWlGAQ+Z0p82g== Date: Wed, 4 Feb 2015 06:50:40 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CD4628@SHSMSX101.ccr.corp.intel.com> References: <1423032214-19856-1-git-send-email-yong.liu@intel.com> <1423032214-19856-5-git-send-email-yong.liu@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 v2 4/4] suites: remove nic type check from testsuites 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: Wed, 04 Feb 2015 06:51:02 -0000 On 2/4/2015 2:44 PM, Yong Liu wrote:=0A= > For all nic in execution file will be used for validation. There's=0A= > no need to check nic type in test suites.=0A= >=0A= > Signed-off-by: Marvinliu =0A= > ---=0A= > tests/TestSuite_blacklist.py | 2 +-=0A= > tests/TestSuite_checksum_offload.py | 2 +-=0A= > tests/TestSuite_fdir.py | 16 ++++++++--------=0A= > tests/TestSuite_ieee1588.py | 6 +++---=0A= > tests/TestSuite_ip_pipeline.py | 2 +-=0A= > tests/TestSuite_ipfrag.py | 2 +-=0A= > tests/TestSuite_jumboframes.py | 2 +-=0A= > tests/TestSuite_l2fwd.py | 2 +-=0A= > tests/TestSuite_l3fwd.py | 6 +++---=0A= > tests/TestSuite_link_flowctrl.py | 2 +-=0A= > tests/TestSuite_multiprocess.py | 2 +-=0A= > tests/TestSuite_pmd.py | 4 ++--=0A= > tests/TestSuite_pmd_bonded.py | 2 +-=0A= > tests/TestSuite_vlan.py | 3 +--=0A= > tests/TestSuite_whitelist.py | 2 +-=0A= > 15 files changed, 27 insertions(+), 28 deletions(-)=0A= >=0A= > diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py= =0A= > index 65c1ec6..8e9debd 100644=0A= > --- a/tests/TestSuite_blacklist.py=0A= > +++ b/tests/TestSuite_blacklist.py=0A= > @@ -54,7 +54,7 @@ class TestBlacklist(TestCase):=0A= > Two Ports=0A= > """=0A= > =0A= > - self.ports =3D self.dut.get_ports(self.nic)=0A= > + self.ports =3D self.dut.get_ports()=0A= > self.verify(len(self.ports) >=3D 2, "Insufficient ports for test= ing")=0A= > [arch, machine, self.env, toolchain] =3D self.target.split('-')= =0A= > =0A= > diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checks= um_offload.py=0A= > index 1ebac0f..05438b2 100644=0A= > --- a/tests/TestSuite_checksum_offload.py=0A= > +++ b/tests/TestSuite_checksum_offload.py=0A= > @@ -54,7 +54,7 @@ class TestChecksumOffload(TestCase):=0A= > Checksum offload prerequisites.=0A= > """=0A= > # Based on h/w type, choose how many ports to use=0A= > - self.dut_ports =3D self.dut.get_ports_performance(self.nic)=0A= > + self.dut_ports =3D self.dut.get_ports_performance()=0A= > =0A= > # Verify that enough ports are available=0A= > self.verify(len(self.dut_ports) >=3D 2, "Insufficient ports for = testing")=0A= > diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py=0A= > index a9f7fa3..1c8d8f7 100644=0A= > --- a/tests/TestSuite_fdir.py=0A= > +++ b/tests/TestSuite_fdir.py=0A= > @@ -48,7 +48,7 @@ class TestFdir(TestCase):=0A= > """=0A= > Run at the start of each test suite.=0A= > """=0A= > - ports =3D self.dut.get_ports(self.nic)=0A= > + ports =3D self.dut.get_ports()=0A= > self.verify(len(ports) >=3D 2, "Not enough ports available")=0A= > =0A= > self.pmdout =3D PmdOutput(self.dut)=0A= > @@ -81,7 +81,7 @@ class TestFdir(TestCase):=0A= > Setting memory reserved for FDir filters.=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > =0A= > self.pmdout.start_testpmd("all", "--rxq=3D2 --txq=3D2 --disable-= rss --pkt-filter-mode=3Dperfect --pkt-filter-size=3D64K")=0A= > out =3D self.dut.send_expect("show port fdir %s" % dutPorts[0], = "testpmd>")=0A= > @@ -111,7 +111,7 @@ class TestFdir(TestCase):=0A= > - Send the ``p_udp`` packet with Scapy on the traffic generato= r and check that FDir information is printed=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > localPort =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(localPort)=0A= > =0A= > @@ -173,7 +173,7 @@ class TestFdir(TestCase):=0A= > - Send the packet and validate the filter function.=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > localPort =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(localPort)=0A= > =0A= > @@ -230,7 +230,7 @@ class TestFdir(TestCase):=0A= > - Send the packet and validate the perfect filter function.=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > localPort =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(localPort)=0A= > =0A= > @@ -261,7 +261,7 @@ class TestFdir(TestCase):=0A= > fields, or parts of fields are used in the matching process.=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > localPort =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(localPort)=0A= > =0A= > @@ -306,7 +306,7 @@ class TestFdir(TestCase):=0A= > to the bytes at offset 36 and 37, as the offset is in 2-byte uni= ts=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > localPort =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(localPort)=0A= > =0A= > @@ -335,7 +335,7 @@ class TestFdir(TestCase):=0A= > FDir VLAN field filtering=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > localPort =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(localPort)=0A= > =0A= > diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py=0A= > index c6fdd61..bf48188 100644=0A= > --- a/tests/TestSuite_ieee1588.py=0A= > +++ b/tests/TestSuite_ieee1588.py=0A= > @@ -52,7 +52,7 @@ class TestIeee1588(TestCase):=0A= > IEEE1588 Prerequisites=0A= > """=0A= > =0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > self.verify(len(dutPorts) > 0, "No ports found for " + self.nic)= =0A= > =0A= > # Change the config file to support IEEE1588 and recompile the p= ackage.=0A= > @@ -82,7 +82,7 @@ class TestIeee1588(TestCase):=0A= > time.sleep(1) # Allow the output from the "start" command to fi= nish before looking for a regexp in expect=0A= > =0A= > # use the first port on that self.nic=0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > port =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(port)=0A= > =0A= > @@ -125,7 +125,7 @@ class TestIeee1588(TestCase):=0A= > time.sleep(3)=0A= > =0A= > # use the first port on that self.nic=0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > port =3D self.tester.get_local_port(dutPorts[0])=0A= > itf =3D self.tester.get_interface(port)=0A= > =0A= > diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline= .py=0A= > index 7da393e..46fdc8d 100644=0A= > --- a/tests/TestSuite_ip_pipeline.py=0A= > +++ b/tests/TestSuite_ip_pipeline.py=0A= > @@ -297,7 +297,7 @@ class TestIPPipeline(TestCase):=0A= > "I217LM": 1,=0A= > "I218V": 1,=0A= > "I218LM": 1}=0A= > - self.dut_ports =3D self.dut.get_ports(self.nic)=0A= > + self.dut_ports =3D self.dut.get_ports()=0A= > self.verify(len(self.dut_ports) >=3D self.needed_ports[self.nic]= ,=0A= > "Insufficient ports for speed testing")=0A= > =0A= > diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py=0A= > index 1f08c85..22a24a6 100644=0A= > --- a/tests/TestSuite_ipfrag.py=0A= > +++ b/tests/TestSuite_ipfrag.py=0A= > @@ -81,7 +81,7 @@ class TestIpfrag(TestCase):=0A= > """=0A= > =0A= > # Based on h/w type, choose how many ports to use=0A= > - ports =3D self.dut.get_ports(self.nic)=0A= > + ports =3D self.dut.get_ports()=0A= > print ports=0A= > =0A= > # Verify that enough ports are available=0A= > diff --git a/tests/TestSuite_jumboframes.py b/tests/TestSuite_jumboframes= .py=0A= > index 2b862af..83b3427 100644=0A= > --- a/tests/TestSuite_jumboframes.py=0A= > +++ b/tests/TestSuite_jumboframes.py=0A= > @@ -113,7 +113,7 @@ class TestJumboframes(TestCase):=0A= > Prerequisite steps for each test suit.=0A= > """=0A= > =0A= > - self.dut_ports =3D self.dut.get_ports(self.nic)=0A= > + self.dut_ports =3D self.dut.get_ports()=0A= > self.verify(len(self.dut_ports) >=3D 2, "Insufficient ports")=0A= > self.rx_port =3D self.dut_ports[0]=0A= > self.tx_port =3D self.dut_ports[1]=0A= > diff --git a/tests/TestSuite_l2fwd.py b/tests/TestSuite_l2fwd.py=0A= > index b75163c..5c79cbf 100644=0A= > --- a/tests/TestSuite_l2fwd.py=0A= > +++ b/tests/TestSuite_l2fwd.py=0A= > @@ -83,7 +83,7 @@ class TestL2fwd(TestCase):=0A= > self.headers_size =3D HEADER_SIZE['eth'] + HEADER_SIZE['ip'] + \= =0A= > HEADER_SIZE['udp']=0A= > =0A= > - self.dut_ports =3D self.dut.get_ports_performance(self.nic)=0A= > + self.dut_ports =3D self.dut.get_ports_performance()=0A= > =0A= > self.verify(len(self.dut_ports) >=3D self.number_of_ports,=0A= > "Not enough ports for " + self.nic)=0A= > diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py=0A= > index f590a52..65fa6f7 100644=0A= > --- a/tests/TestSuite_l3fwd.py=0A= > +++ b/tests/TestSuite_l3fwd.py=0A= > @@ -309,9 +309,9 @@ class TestL3fwd(TestCase):=0A= > L3fwd Prerequisites=0A= > """=0A= > # Based on h/w type, choose how many ports to use=0A= > - ports =3D self.dut.get_ports(self.nic, socket=3D1)=0A= > + ports =3D self.dut.get_ports(socket=3D1)=0A= > if not ports:=0A= > - ports =3D self.dut.get_ports(self.nic, socket=3D0)=0A= > + ports =3D self.dut.get_ports(socket=3D0)=0A= > =0A= > # Verify that enough ports are available=0A= > self.verify(len(ports) >=3D 2, "Insufficient ports for speed tes= ting")=0A= > @@ -473,7 +473,7 @@ class TestL3fwd(TestCase):=0A= > """=0A= > =0A= > # Based on h/w type, choose how many ports to use=0A= > - ports =3D self.dut.get_ports(self.nic)=0A= > + ports =3D self.dut.get_ports()=0A= > # Verify that enough ports are available=0A= > self.verify(len(ports) >=3D 4, "Insufficient ports for speed tes= ting")=0A= > =0A= > diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flow= ctrl.py=0A= > index 3c195c9..e52f95a 100644=0A= > --- a/tests/TestSuite_link_flowctrl.py=0A= > +++ b/tests/TestSuite_link_flowctrl.py=0A= > @@ -64,7 +64,7 @@ class TestLinkFlowctrl(TestCase):=0A= > Link flow control Prerequisites=0A= > """=0A= > =0A= > - self.dutPorts =3D self.dut.get_ports(self.nic)=0A= > + self.dutPorts =3D self.dut.get_ports()=0A= > self.verify(len(self.dutPorts) > 1, "Insuficient ports")=0A= > =0A= > self.rx_port =3D self.dutPorts[0]=0A= > diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiproce= ss.py=0A= > index 2c8eeba..4ef5313 100644=0A= > --- a/tests/TestSuite_multiprocess.py=0A= > +++ b/tests/TestSuite_multiprocess.py=0A= > @@ -191,7 +191,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator)= :=0A= > """=0A= > self.dut.kill_all()=0A= > self.dut.send_expect("fg", "# ")=0A= > - dutPorts =3D self.dut.get_ports(self.nic)=0A= > + dutPorts =3D self.dut.get_ports()=0A= > txPort =3D self.tester.get_local_port(dutPorts[0])=0A= > rxPort =3D self.tester.get_local_port(dutPorts[1])=0A= > mac =3D self.tester.get_mac(txPort)=0A= > diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py=0A= > index b88352f..c5b7e3b 100644=0A= > --- a/tests/TestSuite_pmd.py=0A= > +++ b/tests/TestSuite_pmd.py=0A= > @@ -108,7 +108,7 @@ class TestPmd(TestCase):=0A= > "NIC Unsupported: " + str(self.nic))=0A= > =0A= > # Based on h/w type, choose how many ports to use=0A= > - self.dut_ports =3D self.dut.get_ports(self.nic)=0A= > + self.dut_ports =3D self.dut.get_ports()=0A= > =0A= > # Verify that enough ports are available=0A= > self.verify(len(self.dut_ports) >=3D self.needed_ports[self.nic]= ,=0A= > @@ -166,7 +166,7 @@ class TestPmd(TestCase):=0A= > queues =3D 1=0A= > =0A= > core_mask =3D dts.create_mask(core_list)=0A= > - port_mask =3D dts.create_mask(self.dut.get_ports(self.nic))= =0A= > + port_mask =3D dts.create_mask(self.dut.get_ports())=0A= > =0A= > self.pmdout.start_testpmd("all", "--coremask=3D%s --rxq=3D%d= --txq=3D%d --portmask=3D%s" % (core_mask, queues, queues, port_mask))=0A= > =0A= > diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.p= y=0A= > index e8e61dd..fd15c1d 100644=0A= > --- a/tests/TestSuite_pmd_bonded.py=0A= > +++ b/tests/TestSuite_pmd_bonded.py=0A= > @@ -792,7 +792,7 @@ UDP(sport=3Dsrcport, dport=3Ddestport)/Raw(load=3D"\x= 50"*%s)], iface=3D"%s", count=3D%d)'=0A= > self.ip_head_size =3D 20=0A= > self.udp_header_size =3D 8=0A= > =0A= > - self.dut_ports =3D self.dut.get_ports(self.nic)=0A= > + self.dut_ports =3D self.dut.get_ports()=0A= > =0A= > self.port_mask =3D dts.create_mask(self.dut_ports)=0A= > =0A= > diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py=0A= > index e9813f3..66dc4f3 100644=0A= > --- a/tests/TestSuite_vlan.py=0A= > +++ b/tests/TestSuite_vlan.py=0A= > @@ -53,12 +53,11 @@ class TestVlan(TestCase):=0A= > """=0A= > =0A= > # Based on h/w type, choose how many ports to use=0A= > - ports =3D self.dut.get_ports(self.nic)=0A= > + ports =3D self.dut.get_ports()=0A= > =0A= > # Verify that enough ports are available=0A= > self.verify(len(ports) >=3D 2, "Insufficient ports")=0A= > =0A= > - ports =3D self.dut.get_ports(self.nic)=0A= > global valports=0A= > valports =3D [_ for _ in ports if self.tester.get_local_port(_) = !=3D -1]=0A= > =0A= > diff --git a/tests/TestSuite_whitelist.py b/tests/TestSuite_whitelist.py= =0A= > index a32251d..aedae40 100644=0A= > --- a/tests/TestSuite_whitelist.py=0A= > +++ b/tests/TestSuite_whitelist.py=0A= > @@ -55,7 +55,7 @@ class TestWhitelist(TestCase):=0A= > self.frames_to_send =3D 1=0A= > =0A= > # Based on h/w type, choose how many ports to use=0A= > - self.dutPorts =3D self.dut.get_ports(self.nic)=0A= > + self.dutPorts =3D self.dut.get_ports()=0A= > =0A= > # Verify that enough ports are available=0A= > self.verify(len(self.dutPorts) >=3D 1, "Insufficient ports")=0A= Acked-by: Michael Qiu =0A=