[dts] [PATCH V1] tests/tx_preparation:Modify the verification method.

Zhu, WenhuiX wenhuix.zhu at intel.com
Mon Oct 14 10:55:58 CEST 2019


Tested-by: Zhu, WenhuiX <wenhuix.zhu at intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of zhu,shuai
Sent: Monday, October 14, 2019 4:57 PM
To: dts at dpdk.org
Cc: Zhu, ShuaiX <shuaix.zhu at intel.com>
Subject: [dts] [PATCH V1] tests/tx_preparation:Modify the verification method.



Signed-off-by: zhu,shuai <shuaix.zhu at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestTX_preparation.log
Type: application/octet-stream
Size: 61525 bytes
Desc: TestTX_preparation.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20191014/2a6e3a1d/attachment.obj>


More information about the dts mailing list