test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/tx_preparation:Modify the verification method.
@ 2019-10-14  8:56 zhu,shuai
  2019-10-14  8:55 ` Zhu, WenhuiX
  2019-10-21  2:21 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: zhu,shuai @ 2019-10-14  8:56 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] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14  8:56 [dts] [PATCH V1] tests/tx_preparation:Modify the verification method zhu,shuai
2019-10-14  8:55 ` Zhu, WenhuiX
2019-10-21  2:21 ` 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).