[dts] [PATCH V1] tests/link_flowctrl: fix syntax error
zhaomeijuan
meijuanx.zhao at intel.com
Mon Mar 25 16:42:56 CET 2019
From: "meijuanx.zhao" <meijuanx.zhao at intel.com>
Signed-off-by: meijuanx.zhao <meijuanx.zhao at intel.com>
---
tests/TestSuite_link_flowctrl.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flowctrl.py
index 0057b46..83fd724 100644
--- a/tests/TestSuite_link_flowctrl.py
+++ b/tests/TestSuite_link_flowctrl.py
@@ -339,9 +339,9 @@ class TestLinkFlowctrl(TestCase):
tx_flow_control='on',
pause_frame_fwd='on')
- print "Packet loss: %.3f%%" % result
+ print "Packet loss: %.3f%%" % result[0]
- self.verify(result <= 0.01,
+ self.verify(result[0] <= 0.01,
"Link flow control fail, the loss percent is more than 1%")
def test_perf_flowctrl_on_pause_fwd_off(self):
@@ -353,9 +353,9 @@ class TestLinkFlowctrl(TestCase):
tx_flow_control='on',
pause_frame_fwd='off')
- print "Packet loss: %.3f%%" % result
+ print "Packet loss: %.3f%%" % result[0]
- self.verify(result <= 0.01,
+ self.verify(result[0] <= 0.01,
"Link flow control fail, the loss percent is more than 1%")
def test_perf_flowctrl_rx_on(self):
@@ -367,9 +367,9 @@ class TestLinkFlowctrl(TestCase):
tx_flow_control='on',
pause_frame_fwd='off')
- print "Packet loss: %.3f%%" % result
+ print "Packet loss: %.3f%%" % result[0]
- self.verify(result <= 0.01,
+ self.verify(result[0] <= 0.01,
"Link flow control fail, the loss percent is more than 1%")
def test_perf_flowctrl_off_pause_fwd_on(self):
@@ -381,9 +381,9 @@ class TestLinkFlowctrl(TestCase):
tx_flow_control='off',
pause_frame_fwd='on')
- print "Packet loss: %.3f%%" % result
+ print "Packet loss: %.3f%%" % result[0]
- self.verify(result >= 0.5,
+ self.verify(result[0] >= 0.5,
"Link flow control fail, the loss percent is less than 50%")
def test_perf_flowctrl_off_pause_fwd_off(self):
@@ -395,9 +395,9 @@ class TestLinkFlowctrl(TestCase):
tx_flow_control='off',
pause_frame_fwd='off')
- print "Packet loss: %.3f%%" % result
+ print "Packet loss: %.3f%%" % result[0]
- self.verify(result >= 0.5,
+ self.verify(result[0] >= 0.5,
"Link flow control fail, the loss percent is less than 50%")
def test_perf_flowctrl_tx_on(self):
@@ -409,9 +409,9 @@ class TestLinkFlowctrl(TestCase):
tx_flow_control='on',
pause_frame_fwd='off')
- print "Packet loss: %.3f%%" % result
+ print "Packet loss: %.3f%%" % result[0]
- self.verify(result <= 0.01,
+ self.verify(result[0] <= 0.01,
"Link flow control fail, the loss percent is more than 1%")
def tear_down_all(self):
--
2.17.1
More information about the dts
mailing list