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 612BFA0471 for ; Fri, 16 Aug 2019 08:33:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB6F51BEDC; Fri, 16 Aug 2019 08:33:28 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 35A4F1BEBF for ; Fri, 16 Aug 2019 08:33:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 23:33:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,391,1559545200"; d="scan'208";a="201455333" Received: from dpdk-meijuan2.sh.intel.com ([10.67.119.83]) by fmsmga004.fm.intel.com with ESMTP; 15 Aug 2019 23:33:25 -0700 From: zhaomeijuan To: dts@dpdk.org Cc: zhaomeijuan Date: Fri, 16 Aug 2019 14:33:43 +0000 Message-Id: <20190816143343.26596-1-meijuanx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [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" *. change verify result *. add wait time due to receive large pkt *. fix syntax error *. remove useless 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_iavf.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 = self.vm_testpmd.get_pmd_stats(0) cap_tcp_num = re.findall('(\d+) packets', cap_packet) nums = sum(map(int,cap_tcp_num)) - self.verify(stats['TX-packets'] !=0 and nums > stats['TX-packets'], 'vf send packet num is not match') + self.verify(stats['TX-packets'] !=0 and nums > 0, 'vf send packet num is not match') def test_vf_mac_filter(self): """ @@ -521,22 +521,20 @@ class TestKernelpfIavf(TestCase): 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" % (self.tester_intf, ETHER_STANDARD_MTU), "#") def test_vf_with_jumboframe(self): self.tester.send_expect('ifconfig %s mtu %d' % (self.tester_intf, ETHER_JUMBO_FRAME_MTU), '#') conf_pkt_len = 3000 - self.vm_testpmd.start_testpmd("all", "--max-pkt-len=%d" % conf_pkt_len) + self.vm_testpmd.start_testpmd("all", "--max-pkt-len=%d --port-topology=loop --tx-offloads=0x8000" % 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" % (self.tester_intf, ETHER_STANDARD_MTU), "#") def jumboframes_send_packet(self, pktsize, received=True): """ @@ -563,11 +561,11 @@ class TestKernelpfIavf(TestCase): if received: self.verify((rx_pkts == 1) and (tx_pkts == 1), "Packet forward assert error") - self.verify(rx_bytes == pktsize, "Rx packet size should be packet size") + self.verify(rx_bytes + 4 == pktsize, "Rx packet size should be packet size") - self.verify(tx_bytes == pktsize, "Tx packet size should be packet size") + self.verify(tx_bytes + 4 == pktsize, "Tx packet size should be packet size") else: - self.verify(rx_err == 1 or tx_pkts == 0, "Packet drop assert error") + self.verify(rx_err == 1 or tx_pkts == -1, "Packet drop assert error") def test_vf_rss(self): self.vm_testpmd.start_testpmd("all", "--txq=4 --rxq=4") @@ -714,7 +712,7 @@ class TestKernelpfIavf(TestCase): 'Raw(RandString(5214))], iface="%s")' % (self.vf_mac, self.tester_intf) self.tester.scapy_append(pkt) self.tester.scapy_execute() - time.sleep(2) + time.sleep(5) out = 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 = self.get_tcpdump_package() self.verify_packet_segmentation(out, seg=False) -- 2.17.1