[dts] [PATCH V1 1/2]dpdk_gro_lib: add steps to check iperf data

Xiao Qimai qimaix.xiao at intel.com
Wed Jun 10 07:11:23 CEST 2020


Signed-off-by: Xiao Qimai <qimaix.xiao at intel.com>
---
 tests/TestSuite_dpdk_gro_lib.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index 49a7407..fae453a 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -266,6 +266,7 @@ class TestDPDKGROLib(TestCase):
         iperfdata = re.compile('[\d+]*.[\d+]* [M|G|K]bits/sec').findall(fmsg)
         print(iperfdata)
         self.verify(iperfdata, 'There no data about this case')
+        data_str = iperfdata[-1].strip().split()
         self.result_table_create(['Data', 'Unit'])
         results_row = [run_info]
         results_row.append(iperfdata[-1])
@@ -273,6 +274,14 @@ class TestDPDKGROLib(TestCase):
         self.result_table_print()
         self.output_result = "Iperf throughput is %s" % iperfdata[-1]
         self.logger.info(self.output_result)
+        if self.nic in ['fortville_spirit']:
+            data = data_str[0]
+            unit = data_str[1]
+            self.verify(unit == "Gbits/sec", 'The unit of throughput is not Gbits/sec')
+            if run_info == 'GRO lib':
+                self.verify(float(data) > 28, 'speed not reach the expect')
+            else:
+                self.verify(float(data) > 8, 'speed not reach the expect')
 
     def test_vhost_gro_tcp_lightmode(self):
         self.config_kernel_nic_host(0)
-- 
1.8.3.1



More information about the dts mailing list