From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id AB2E9DE4 for ; Wed, 4 Feb 2015 04:57:31 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 03 Feb 2015 19:57:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="449502437" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by FMSMGA003.fm.intel.com with ESMTP; 03 Feb 2015 19:43:18 -0800 Received: from kmsmsx154.gar.corp.intel.com (172.21.73.14) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 4 Feb 2015 11:57:27 +0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by KMSMSX154.gar.corp.intel.com (172.21.73.14) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 4 Feb 2015 11:57:27 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.253]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0195.001; Wed, 4 Feb 2015 11:57:26 +0800 From: "Qiu, Michael" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH 4/4] suites: remove nic type check from testsuites Thread-Index: AQHQNuZwtS1eSz3d1E+IjEuhWM6Tsw== Date: Wed, 4 Feb 2015 03:57:25 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CD4322@SHSMSX101.ccr.corp.intel.com> References: <1422001619-27112-1-git-send-email-yong.liu@intel.com> <1422001619-27112-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 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 03:57:32 -0000 On 1/23/2015 4:27 PM, Marvin Liu wrote:=0A= > From: Yong Liu =0A= >=0A= > Signed-off-by: Marvinliu =0A= > ---=0A= > framework/dut.py | 6 +++---=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= > 16 files changed, 30 insertions(+), 31 deletions(-)=0A= >=0A= > diff --git a/framework/dut.py b/framework/dut.py=0A= > index 959f499..1c8367d 100644=0A= > --- a/framework/dut.py=0A= > +++ b/framework/dut.py=0A= > @@ -148,11 +148,11 @@ class Dut(Crb):=0A= > self.pci_devices_information()=0A= > # scan ports before restore interface=0A= > self.scan_ports()=0A= > - # restore dut ports to kernel=0A= > + # restore dut ports to kernel=0A= > self.restore_interfaces()=0A= > - # rescan ports after interface up=0A= > + # rescan ports after interface up=0A= > self.rescan_ports()=0A= > - # load port infor from config file=0A= > + # load port infor from config file=0A= > self.load_portconf()=0A= > self.mount_procfs()=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 9c56799..22c6766 100644=0A= > --- a/tests/TestSuite_ip_pipeline.py=0A= > +++ b/tests/TestSuite_ip_pipeline.py=0A= > @@ -293,7 +293,7 @@ class TestIPPipeline(TestCase):=0A= > =0A= > # Check for port availability=0A= > self.needed_ports =3D {"niantic": 2}=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 0e7df85..1b2bf0d 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 acd6364..a21977b 100644=0A= > --- a/tests/TestSuite_pmd.py=0A= > +++ b/tests/TestSuite_pmd.py=0A= > @@ -104,7 +104,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= > @@ -162,7 +162,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=