diff options
author | 2017-01-23 14:57:29 +0200 | |
---|---|---|
committer | 2017-01-23 14:57:41 +0200 | |
commit | 030c124495335da372a5bb4f537365cce3def3af (patch) | |
tree | 134b3c6fef900ba84a16d41612c6788cb8e64198 /scripts/automation/regression/stateless_tests | |
parent | aee39c9dd61944b3be3c20b4e3f9ec4d57602d01 (diff) |
fix trex-333
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'scripts/automation/regression/stateless_tests')
-rw-r--r-- | scripts/automation/regression/stateless_tests/stl_rx_test.py | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_rx_test.py b/scripts/automation/regression/stateless_tests/stl_rx_test.py index 8812ac48..a3efa01d 100644 --- a/scripts/automation/regression/stateless_tests/stl_rx_test.py +++ b/scripts/automation/regression/stateless_tests/stl_rx_test.py @@ -526,19 +526,37 @@ class STLRX_Test(CStlGeneral_Test): except STLError as e: assert False , '{0}'.format(e) + def _run_fcs_stream (self,is_vm): + """ this test send 1 64 byte packet with latency and check that all counters are reported as 64 bytes""" + res=True + try: + all_ports=list(CTRexScenario.stl_ports_map['map'].keys()); + for port in all_ports: + for l in [True,False]: + print(" test port {0} latency : {1} ".format(port,l)) + self.send_1_burst(port,l,100) + except Exception as e: + if is_vm : + res=False + else: + raise e + return(res); + + def test_fcs_stream(self): """ this test send 1 64 byte packet with latency and check that all counters are reported as 64 bytes""" - if self.is_virt_nics: - self.skip('Skip this for virtual NICs') - - all_ports=list(CTRexScenario.stl_ports_map['map'].keys()); - for port in all_ports: - for l in [True,False]: - print(" test port {0} latency : {1} ".format(port,l)) - self.send_1_burst(port,l,100) + is_vm=self.is_virt_nics # in case of VM and vSwitch there are drop of packets in some cases, let retry number of times + # in this case we just want to check functionality that packet of 64 is reported as 64 in all levels + retry=1 + if is_vm: + retry=4 + for i in range(0,retry): + if self._run_fcs_stream (is_vm): + break; + print("==> retry %d .." %(i)); # this test adds more and more latency streams and re-test with incremental |