test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V2] tests/tx_preparation:Modify the verification parameters.
@ 2019-10-21  2:40 zhu,shuai
  2019-10-21  3:25 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: zhu,shuai @ 2019-10-21  2:40 UTC (permalink / raw)
  To: dts; +Cc: zhu,shuai



Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 tests/TestSuite_tx_preparation.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_tx_preparation.py b/tests/TestSuite_tx_preparation.py
index 6d12724..cea3777 100644
--- a/tests/TestSuite_tx_preparation.py
+++ b/tests/TestSuite_tx_preparation.py
@@ -57,6 +57,7 @@ import random
 Normal_mtu = 1500
 Max_mtu = 9000
 TSO_value = 1460
+count = 4
 
 
 class TestTX_preparation(TestCase):
@@ -139,7 +140,7 @@ class TestTX_preparation(TestCase):
         for packet_type in pkts.keys():
             self.start_tcpdump(self.tester_intf)
             self.tester.scapy_append(
-                'sendp([%s], iface="%s", count=4)' % (pkts[packet_type], self.tester_intf))
+                'sendp([%s], iface="%s", count=%d)' % (pkts[packet_type], self.tester_intf, count))
             self.tester.scapy_execute()
             out = self.get_tcpdump_package()
             if packet_type == 'IPv6/cksum UDP':
@@ -156,11 +157,11 @@ class TestTX_preparation(TestCase):
                     segnum = LrgLength / TSO_value 
                     LastLength = LrgLength % TSO_value
                     num = out.count('length %s' %TSO_value)
-                    self.verify("length %s" %TSO_value in out and num == segnum,
+                    self.verify("length %s" %TSO_value in out and num == segnum * count,
                         "Failed to verify TSO correctness for large packets!!!")
                     if LastLength != 0 :
                         num = out.count('length %s' %LastLength)
-                        self.verify("length %s" %LastLength in out and num == 1 , 
+                        self.verify("length %s" %LastLength in out and num == count,
                         "Failed to verify TSO correctness for large packets!!!")
     
 
-- 
2.17.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-21  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21  2:40 [dts] [PATCH V2] tests/tx_preparation:Modify the verification parameters zhu,shuai
2019-10-21  3:25 ` Tu, Lijuan

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).