From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E55B45951 for ; Fri, 12 May 2017 10:17:02 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 12 May 2017 01:17:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,328,1491289200"; d="scan'208";a="1129429678" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 12 May 2017 01:16:58 -0700 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Fri, 12 May 2017 16:18:11 +0800 Message-Id: <1494577095-45103-5-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1494577095-45103-1-git-send-email-lijuanx.a.tu@intel.com> References: <1494577095-45103-1-git-send-email-lijuanx.a.tu@intel.com> Subject: [dts] [PATCH V1 4/8] tests/vf_port_start_stop: make adjustment to dpdk1705 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: Fri, 12 May 2017 08:17:03 -0000 1, check the result always in the testing because of testing may failed any time 2, config the mac before start qemu ,because create 2 vfs from 1 pf ,the auto mac may not invild 3, remove crc-strip parameter Signed-off-by: Lijuan Tu --- tests/TestSuite_vf_port_start_stop.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_vf_port_start_stop.py b/tests/TestSuite_vf_port_start_stop.py index a272033..05c4582 100644 --- a/tests/TestSuite_vf_port_start_stop.py +++ b/tests/TestSuite_vf_port_start_stop.py @@ -122,6 +122,24 @@ class TestVfPortStartStop(TestCase): self.verify("Checking link statuses" in out, "ERROR: port start all") testpmd.execute_cmd('start') time.sleep(.5) + + # we should check the result always in the testing. + port_id_0 = 0 + port_id_1 = 1 + vf0_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) + vf1_stats = self.vm0_testpmd.get_pmd_stats(port_id_1) + + vf0_rx_cnt = vf0_stats['RX-packets'] + self.verify(vf0_rx_cnt != 0, "no packet was received by vm0_VF0") + if self.kdriver == "i40e": + vf0_rx_err = vf0_stats['RX-errors'] + self.verify(vf0_rx_err == 0, "vm0_VF0 rx-errors") + + vf1_tx_cnt = vf1_stats['TX-packets'] + self.verify(vf1_tx_cnt != 0, "no packet was transmitted by vm0_VF1") + + vf1_tx_err = vf1_stats['TX-errors'] + self.verify(vf1_tx_err == 0, "vm0_VF0 tx-errors") testpmd.execute_cmd('stop') out = testpmd.execute_cmd('port stop all') self.verify("Checking link statuses" in out, "ERROR: port stop all") @@ -134,8 +152,9 @@ class TestVfPortStartStop(TestCase): vf0_rx_cnt = vf0_stats['RX-packets'] self.verify(vf0_rx_cnt != 0, "no packet was received by vm0_VF0") - vf0_rx_err = vf0_stats['RX-errors'] - self.verify(vf0_rx_err == 0, "vm0_VF0 rx-errors") + if self.kdriver == "i40e": + vf0_rx_err = vf0_stats['RX-errors'] + self.verify(vf0_rx_err == 0, "vm0_VF0 rx-errors") vf1_tx_cnt = vf1_stats['TX-packets'] self.verify(vf1_tx_cnt != 0, "no packet was transmitted by vm0_VF1") @@ -148,6 +167,10 @@ class TestVfPortStartStop(TestCase): self.used_dut_port = self.dut_ports[0] self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 2, driver=driver) self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port]['vfs_port'] + # create 2 vfs from 0 ,the auto mac may not invild. + pf_intf0 = self.dut.ports_info[0]['port'].get_interface_name() + self.pf0_vf0_mac = "00:12:34:56:78:01" + self.dut.send_expect("ip link set %s vf 0 mac %s" %(pf_intf0, self.pf0_vf0_mac), "#") try: @@ -189,6 +212,7 @@ class TestVfPortStartStop(TestCase): self.vm0_dut_ports = None #destroy vm0 self.vm0.stop() + time.sleep(3) self.vm0 = None if getattr(self, 'host_testpmd', None): @@ -214,7 +238,7 @@ class TestVfPortStartStop(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports('any') self.vm0_testpmd = PmdOutput(self.vm_dut_0) - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') + self.vm0_testpmd.start_testpmd(VM_CORES_MASK) self.vm0_testpmd.execute_cmd('set fwd mac') time.sleep(2) -- 1.9.3