test suite reviews and discussions
 help / color / mirror / Atom feed
From: <pvukkisala@marvell.com>
To: <dts@dpdk.org>
Cc: <avijay@marvell.com>, <fmasood@marvell.com>,
	Phanendra Vukkisala <pvukkisala@marvell.com>
Subject: [dts] [PATCH] shutdown_api: support vector mode to this test
Date: Sat, 19 Oct 2019 22:26:28 +0530	[thread overview]
Message-ID: <1571504188-29749-1-git-send-email-pvukkisala@marvell.com> (raw)

From: Phanendra Vukkisala <pvukkisala@marvell.com>

Vector mode needs multiple of 4 packets
Make sure link is up at end of tests(even test fails) to avoid further tests failure

Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
---
 tests/TestSuite_shutdown_api.py |   22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
index 32bb765..d7f070f 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -116,7 +116,7 @@ class TestShutdownApi(TestCase):
             pkg = 'Ether(src="%s", dst="%s")/IP()/Raw(load="P" * %d)' % (smac, dmac, padding)
 
         self.tester.scapy_foreground()
-        self.tester.scapy_append('sendp(%s, iface="%s")' % (pkg, itf))
+        self.tester.scapy_append('sendp(%s, iface="%s", count=4)' % (pkg, itf))
         self.tester.scapy_execute()
         time.sleep(3)
 
@@ -131,8 +131,8 @@ class TestShutdownApi(TestCase):
         p1rx_pkts -= gp1rx_pkts
         p1rx_bytes -= gp1rx_bytes
 
-        rx_bytes_exp = pktSize
-        tx_bytes_exp = pktSize
+        rx_bytes_exp = pktSize*4
+        tx_bytes_exp = pktSize*4
 
         if self.kdriver == "fm10k":
             # RRC will always strip rx/tx crc
@@ -144,11 +144,11 @@ class TestShutdownApi(TestCase):
                 tx_bytes_exp -= 4
         else:
             # some NIC will always include tx crc
-            rx_bytes_exp -= 4
-            tx_bytes_exp -= 4
+            rx_bytes_exp -= 16
+            tx_bytes_exp -= 16
             if vlan_strip is True:
                 # vlan strip default is off
-                tx_bytes_exp -= 4
+                tx_bytes_exp -= 16
          
         # fortville nic enable send lldp packet function when port setup
         # now the tx-packets size is lldp_size(110) * n + forward packe size
@@ -548,6 +548,16 @@ class TestShutdownApi(TestCase):
         Run after each test case.
         """
         self.dut.kill_all()
+        self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports), socket=self.ports_socket)
+        ports_num = len(self.ports)
+        # link up test, to avoid failing further tests if link was down
+        for i in range(ports_num):
+            ## sometimes output text messingup testpmd prompt so trimmed prompt
+            self.dut.send_expect("set link-up port %d" % i, ">")
+        # start ports, to avodi failing further tests if ports are stoped
+        self.dut.send_expect("port start all", "testpmd> ", 100)
+        self.dut.send_expect("quit", "# ")
+
 
     def tear_down_all(self):
         """
-- 
1.7.9.5


             reply	other threads:[~2019-10-19 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 16:56 pvukkisala [this message]
2019-10-23  9:51 ` Tu, Lijuan

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=1571504188-29749-1-git-send-email-pvukkisala@marvell.com \
    --to=pvukkisala@marvell.com \
    --cc=avijay@marvell.com \
    --cc=dts@dpdk.org \
    --cc=fmasood@marvell.com \
    /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).