test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lijuan Tu <lijuanx.a.tu@intel.com>
To: dts@dpdk.org
Cc: Lijuan Tu <lijuanx.a.tu@intel.com>
Subject: [dts] [PATCH V1 4/8] tests/vf_port_start_stop: make adjustment to dpdk1705
Date: Fri, 12 May 2017 16:18:11 +0800	[thread overview]
Message-ID: <1494577095-45103-5-git-send-email-lijuanx.a.tu@intel.com> (raw)
In-Reply-To: <1494577095-45103-1-git-send-email-lijuanx.a.tu@intel.com>

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 <lijuanx.a.tu@intel.com>
---
 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

  parent reply	other threads:[~2017-05-12  8:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12  8:18 [dts] [PATCH V1 0/8] sync virtual tests " Lijuan Tu
2017-05-12  8:18 ` [dts] [PATCH V1 1/8] tests/vf_packet_rxtx: remove crc-strip parameter Lijuan Tu
2017-05-15  1:56   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 2/8] tests/vf_macfilter: " Lijuan Tu
2017-05-15  1:57   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 3/8] tests/vf_offload: fix variable name typo and " Lijuan Tu
2017-05-15  1:57   ` Liu, Yong
2017-05-12  8:18 ` Lijuan Tu [this message]
2017-05-15  2:00   ` [dts] [PATCH V1 4/8] tests/vf_port_start_stop: make adjustment to dpdk1705 Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 5/8] test/vf_rss: remove crc-strip parameter, and check RSS config command Lijuan Tu
2017-05-15  2:01   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 6/8] test/vf_to_vf_nic_bridge: remove crc-strip parameter and filter misc packets Lijuan Tu
2017-05-15  2:03   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH V1 7/8] tests/vm_power_manager: adjust to dpdk1705 Lijuan Tu
2017-05-15  2:05   ` Liu, Yong
2017-05-12  8:18 ` [dts] [PATCH 8/8] tests/vxlan_sample: " Lijuan Tu
2017-05-15  2:06   ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494577095-45103-5-git-send-email-lijuanx.a.tu@intel.com \
    --to=lijuanx.a.tu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).