[dts] [next][PATCH V1] tests/link_flowctrl add transmission packet time and fix description issue

zhaomeijuan meijuanx.zhao at intel.com
Wed Jun 19 17:04:50 CEST 2019


*.add transmission packet time to synchronous etgen 
transmission packet time
*.result[0] is loss packet rate, so it's not necessary
to devide 100 or add percent

Signed-off-by: zhaomeijuan <meijuanx.zhao at intel.com>
---
 tests/TestSuite_link_flowctrl.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flowctrl.py
index 0192498..5a8833d 100644
--- a/tests/TestSuite_link_flowctrl.py
+++ b/tests/TestSuite_link_flowctrl.py
@@ -121,11 +121,12 @@ class TestLinkFlowctrl(TestCase):
         # run packet generator
         streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100,
                                             None, self.tester.pktgen)
-        result = self.tester.pktgen.measure_loss(stream_ids=streams)
+        options = {'duration': 60}
+        result = self.tester.pktgen.measure_loss(stream_ids=streams, options=options)
 
         self.dut.send_expect("stop", "testpmd> ")
 
-        return result[0]/100
+        return result[0]
 
     def get_testpmd_port_stats(self, ports):
         """
@@ -357,7 +358,7 @@ class TestLinkFlowctrl(TestCase):
                                             tx_flow_control='on',
                                             pause_frame_fwd='on')
 
-        self.logger.info("Packet loss: %.3f%%" % result)
+        self.logger.info("Packet loss: %.3f" % result)
 
         self.verify(result <= 0.01,
                     "Link flow control fail, the loss percent is more than 1%")
@@ -371,7 +372,7 @@ class TestLinkFlowctrl(TestCase):
                                             tx_flow_control='on',
                                             pause_frame_fwd='off')
 
-        self.logger.info("Packet loss: %.3f%%" % result)
+        self.logger.info("Packet loss: %.3f" % result)
 
         self.verify(result <= 0.01,
                     "Link flow control fail, the loss percent is more than 1%")
@@ -385,7 +386,7 @@ class TestLinkFlowctrl(TestCase):
                                             tx_flow_control='on',
                                             pause_frame_fwd='off')
 
-        self.logger.info("Packet loss: %.3f%%" % result)
+        self.logger.info("Packet loss: %.3f" % result)
 
         self.verify(result <= 0.01,
                     "Link flow control fail, the loss percent is more than 1%")
@@ -399,7 +400,7 @@ class TestLinkFlowctrl(TestCase):
                                             tx_flow_control='off',
                                             pause_frame_fwd='on')
 
-        self.logger.info("Packet loss: %.3f%%" % result)
+        self.logger.info("Packet loss: %.3f" % result)
 
         self.verify(result >= 0.5,
                     "Link flow control fail, the loss percent is less than 50%")
@@ -413,7 +414,7 @@ class TestLinkFlowctrl(TestCase):
                                             tx_flow_control='off',
                                             pause_frame_fwd='off')
 
-        self.logger.info("Packet loss: %.3f%%" % result)
+        self.logger.info("Packet loss: %.3f" % result)
 
         self.verify(result >= 0.5,
                     "Link flow control fail, the loss percent is less than 50%")
@@ -427,7 +428,7 @@ class TestLinkFlowctrl(TestCase):
                                             tx_flow_control='on',
                                             pause_frame_fwd='off')
 
-        self.logger.info("Packet loss: %.3f%%" % result)
+        self.logger.info("Packet loss: %.3f" % result)
 
         self.verify(result <= 0.01,
                     "Link flow control fail, the loss percent is more than 1%")
-- 
2.17.1



More information about the dts mailing list