[dts] [PATCH V1 08/17]pvp_qemu_multi_paths_port_restart: change verified mpps value according to linerate
Xiao Qimai
qimaix.xiao at intel.com
Fri May 22 10:31:59 CEST 2020
Signed-off-by: Xiao Qimai <qimaix.xiao at intel.com>
---
tests/TestSuite_pvp_qemu_multi_paths_port_restart.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py b/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py
index 601000e..ad15b2d 100644
--- a/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py
+++ b/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py
@@ -197,6 +197,15 @@ class TestPVPQemuMultiPathPortRestart(TestCase):
results_row.append(Cycle)
self.result_table_add(results_row)
+ @property
+ def check_value(self):
+ check_dict = dict.fromkeys(self.frame_sizes)
+ linerate = {64: 0.085, 128: 0.12, 256: 0.20, 512: 0.35, 1024: 0.50, 1280: 0.55, 1518: 0.60}
+ for size in self.frame_sizes:
+ speed = self.wirespeed(self.nic, size, self.number_of_ports)
+ check_dict[size] = round(speed * linerate[size], 2)
+ return check_dict
+
def calculate_avg_throughput(self, frame_size):
"""
start to send packet and get the throughput
@@ -214,7 +223,9 @@ class TestPVPQemuMultiPathPortRestart(TestCase):
traffic_opt = {'delay': 5}
_, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt)
Mpps = pps / 1000000.0
- self.verify(Mpps > 0, "can not receive packets of frame size %d" % (frame_size))
+ self.verify(Mpps > self.check_value[frame_size],
+ "%s of frame size %d speed verify failed, expect %s, result %s" % (
+ self.running_case, frame_size, self.check_value[frame_size], Mpps))
throughput = Mpps * 100 / \
float(self.wirespeed(self.nic, frame_size, 1))
return Mpps, throughput
--
1.8.3.1
More information about the dts
mailing list