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 8C2B2A00BE; Tue, 29 Oct 2019 02:57:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65A741BEDB; Tue, 29 Oct 2019 02:57:46 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B2B1D1BEDA for ; Tue, 29 Oct 2019 02:57:44 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 18:57:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,242,1569308400"; d="scan'208";a="211004642" Received: from unknown (HELO dpdk-zengxx-tester.localdomain) ([10.240.176.145]) by fmsmga001.fm.intel.com with ESMTP; 28 Oct 2019 18:57:42 -0700 From: Xiaoxiao Zeng To: dts@dpdk.org Cc: Xiaoxiao Zeng Date: Tue, 29 Oct 2019 21:57:33 +0800 Message-Id: <20191029135733.17469-1-xiaoxiaox.zeng@intel.com> X-Mailer: git-send-email 2.17.0 Subject: [dts] [PATCH V1] tests/TestSuite_sriov_kvm:modify bug and increase compatibility 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 -b to -w. *.modify verify to suit more scenes. Signed-off-by: Xiaoxiao Zeng --- tests/TestSuite_sriov_kvm.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py index 51fdf68..546b01c 100644 --- a/tests/TestSuite_sriov_kvm.py +++ b/tests/TestSuite_sriov_kvm.py @@ -314,8 +314,7 @@ class TestSriovKvm(TestCase): if driver == 'igb_uio': # start testpmd with the two VFs on the host self.host_testpmd = PmdOutput(self.dut) - eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0': self.sriov_vfs_port[0].pci, - 'vf1': self.sriov_vfs_port[1].pci} + eal_param = '-w %s ' % self.dut.ports_info[0]['pci'] self.host_testpmd.start_testpmd( "1S/2C/2T", "--rxq=4 --txq=4", eal_param=eal_param) self.host_testpmd.execute_cmd('set fwd rxonly') @@ -638,7 +637,7 @@ class TestSriovKvm(TestCase): # verify vm1 receive packets vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - self.verify(vm1_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['TX-packets'] == packet_num, + self.verify(vm1_ret_stats['RX-packets'] >= packet_num and vm1_ret_stats['TX-packets'] >= packet_num, "Uplink mirror failed between VM0 and VM1!") def test_two_vms_downlink_mirror(self): @@ -809,7 +808,7 @@ class TestSriovKvm(TestCase): self.set_port_pool_mirror(port_id_0, '0x1 dst-pool 1 on') self.set_port_downlink_mirror(port_id_0, 'dst-pool 1 on') - if self.nic.startswith('niantic'): + if self.nic.startswith('niantic') or self.nic.startswith('sage'): self.set_port_uplink_mirror(port_id_0, 'dst-pool 1 on') # get vm port stats @@ -857,7 +856,7 @@ class TestSriovKvm(TestCase): vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) try: - if self.nic.startswith('niantic'): + if self.nic.startswith('niantic') or self.nic.startswith('sage'): self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num, "vlan mirror failed between VM0 and VM1") else: @@ -886,8 +885,8 @@ class TestSriovKvm(TestCase): # verify vm1 receive packets vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats) vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm0_ret_stats['TX-packets'] == packet_num and - vm1_ret_stats['RX-packets'] == packet_num, "uplink mirror failed between VM0 and VM1") + self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num, + "uplink mirror failed between VM0 and VM1") def test_two_vms_add_multi_exact_mac_on_vf(self): port_id_0 = 0 -- 2.17.0