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 5E4A0A0471 for ; Fri, 16 Aug 2019 08:34:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 429561BEE1; Fri, 16 Aug 2019 08:34:26 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D4F6A1BEDC for ; Fri, 16 Aug 2019 08:34:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 23:34:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,391,1559545200"; d="scan'208";a="184832793" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 15 Aug 2019 23:34:22 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 23:34:22 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 23:34:21 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.19]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.215]) with mapi id 14.03.0439.000; Fri, 16 Aug 2019 14:34:19 +0800 From: "Zhao, MeijuanX" To: "dts@dpdk.org" CC: "Zhao, MeijuanX" Thread-Topic: [dts][PATCH V1] tests: kernelpf_iavf fix some issues Thread-Index: AQHVU/yDVTM1YI1hGUGkyCocpI5X2qb9USsw Date: Fri, 16 Aug 2019 06:34:20 +0000 Message-ID: <9866F1E5CE768A45B24F6603C6EF54DE05B2BD65@shsmsx102.ccr.corp.intel.com> References: <20190816143343.26596-1-meijuanx.zhao@intel.com> In-Reply-To: <20190816143343.26596-1-meijuanx.zhao@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 V1] tests: kernelpf_iavf fix some issues 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" Tested-by: Zhao, MeijuanX -----Original Message----- From: Zhao, MeijuanX=20 Sent: Friday, August 16, 2019 10:34 PM To: dts@dpdk.org Cc: Zhao, MeijuanX Subject: [dts][PATCH V1] tests: kernelpf_iavf fix some issues *. change verify result *. add wait time due to receive large pkt *. fix syntax error *. remove use= less setting for testpmd Signed-off-by: zhaomeijuan --- tests/TestSuite_kernelpf_iavf.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_ia= vf.py index 2e500fa..476b899 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -245,7 +245,7 @@ class TestKernelpfIavf(TestCase): stats =3D self.vm_testpmd.get_pmd_stats(0) cap_tcp_num =3D re.findall('(\d+) packets', cap_packet) nums =3D sum(map(int,cap_tcp_num)) - self.verify(stats['TX-packets'] !=3D0 and nums > stats['TX-packets= '], 'vf send packet num is not match') + self.verify(stats['TX-packets'] !=3D0 and nums > 0, 'vf send=20 + packet num is not match') =20 def test_vf_mac_filter(self): """ @@ -521,22 +521,20 @@ class TestKernelpfIavf(TestCase): =20 self.vm_testpmd.start_testpmd("all") self.vm_testpmd.execute_cmd("set fwd mac") - self.vm_testpmd.execute_cmd("set promisc all off") self.vm_testpmd.execute_cmd("start") self.jumboframes_send_packet(ETHER_STANDARD_MTU - 1, True) self.jumboframes_send_packet(ETHER_STANDARD_MTU + 1, False) - self.tester.send_expect("ifconfig %s mtu %s" % (self.tester_intf, = ETHER_STANDARD_MTU)) + self.tester.send_expect("ifconfig %s mtu %s" %=20 + (self.tester_intf, ETHER_STANDARD_MTU), "#") =20 def test_vf_with_jumboframe(self): self.tester.send_expect('ifconfig %s mtu %d' % (self.tester_intf, = ETHER_JUMBO_FRAME_MTU), '#') conf_pkt_len =3D 3000 - self.vm_testpmd.start_testpmd("all", "--max-pkt-len=3D%d" % conf_p= kt_len) + self.vm_testpmd.start_testpmd("all", "--max-pkt-len=3D%d=20 + --port-topology=3Dloop --tx-offloads=3D0x8000" % conf_pkt_len) self.vm_testpmd.execute_cmd("set fwd mac") - self.vm_testpmd.execute_cmd("set promisc all off") self.vm_testpmd.execute_cmd("start") self.jumboframes_send_packet(conf_pkt_len - 1, True) self.jumboframes_send_packet(conf_pkt_len + 1, False) - self.tester.send_expect("ifconfig %s mtu %d" % (self.tester_intf, = ETHER_STANDARD_MTU)) + self.tester.send_expect("ifconfig %s mtu %d" %=20 + (self.tester_intf, ETHER_STANDARD_MTU), "#") =20 def jumboframes_send_packet(self, pktsize, received=3DTrue): """ @@ -563,11 +561,11 @@ class TestKernelpfIavf(TestCase): if received: self.verify((rx_pkts =3D=3D 1) and (tx_pkts =3D=3D 1), "Packet= forward assert error") =20 - self.verify(rx_bytes =3D=3D pktsize, "Rx packet size should be= packet size") + self.verify(rx_bytes + 4 =3D=3D pktsize, "Rx packet size shoul= d=20 + be packet size") =20 - self.verify(tx_bytes =3D=3D pktsize, "Tx packet size should be= packet size") + self.verify(tx_bytes + 4 =3D=3D pktsize, "Tx packet size shoul= d=20 + be packet size") else: - self.verify(rx_err =3D=3D 1 or tx_pkts =3D=3D 0, "Packet drop = assert error") + self.verify(rx_err =3D=3D 1 or tx_pkts =3D=3D -1, "Packet drop= =20 + assert error") =20 def test_vf_rss(self): self.vm_testpmd.start_testpmd("all", "--txq=3D4 --rxq=3D4") @@ -71= 4,7 +712,7 @@ class TestKernelpfIavf(TestCase): 'Raw(RandString(5214))], iface=3D"%s")' % (self.vf_m= ac, self.tester_intf) self.tester.scapy_append(pkt) self.tester.scapy_execute() - time.sleep(2) + time.sleep(5) out =3D self.get_tcpdump_package() self.verify_packet_segmentation(out) self.vm_testpmd.execute_cmd("stop") @@ -726,7 +724,7 @@ class TestKernelpfIavf(TestCase): self.start_tcpdump(self.tester_intf) self.tester.scapy_append(pkt) self.tester.scapy_execute() - time.sleep(2) + time.sleep(5) out =3D self.get_tcpdump_package() self.verify_packet_segmentation(out, seg=3DFalse) =20 -- 2.17.1