summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests/stl_rx_test.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-29 18:07:33 +0200
committerimarom <imarom@cisco.com>2017-01-29 18:07:33 +0200
commit519ea63d05c655a75602eb8cd77c84e6e49e827d (patch)
treedbfb7325178a86149efce096494535b886907df7 /scripts/automation/regression/stateless_tests/stl_rx_test.py
parent42664b05103d0f4a7ed272301051d58d6e8f3737 (diff)
parentefbe56332fdf6a5c386152e4a2af3a2b56f723b5 (diff)
Merge branch 'master' into capture
Diffstat (limited to 'scripts/automation/regression/stateless_tests/stl_rx_test.py')
-rw-r--r--scripts/automation/regression/stateless_tests/stl_rx_test.py40
1 files changed, 32 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..3d4ed977 100644
--- a/scripts/automation/regression/stateless_tests/stl_rx_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_rx_test.py
@@ -32,6 +32,12 @@ class STLRX_Test(CStlGeneral_Test):
'latency_9k_max_average': 100,
'latency_9k_max_latency': 250,
},
+ 'rte_i40evf_pmd': {
+ 'rate_percent': 80,
+ 'total_pkts': 1000,
+ 'rate_latency': 1,
+ 'latency_9k_enable': False,
+ },
'rte_igb_pmd': {
'rate_percent': 80,
'total_pkts': 500,
@@ -526,19 +532,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