summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-06-20 12:56:17 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-06-20 12:57:02 +0300
commit35efdda889977a7b0bf5d1cda213d0e7ffcd4367 (patch)
treef4b1ff50b1d7e30d637f0aba893610e0fb1b60e4 /scripts/automation/regression/stateless_tests
parent0bcd7377e8d476a0eb8f7d7f55f59e0c6df91f28 (diff)
Add 4 bytes for each packet rx/tx bytes in flow stats, to artificially count ethernet CRC
Diffstat (limited to 'scripts/automation/regression/stateless_tests')
-rw-r--r--scripts/automation/regression/stateless_tests/stl_rx_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_rx_test.py b/scripts/automation/regression/stateless_tests/stl_rx_test.py
index 80e6bee6..41eabd65 100644
--- a/scripts/automation/regression/stateless_tests/stl_rx_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_rx_test.py
@@ -80,7 +80,7 @@ class STLRX_Test(CStlGeneral_Test):
tmp = 'TX pkts mismatch - got: {0}, expected: {1}'.format(tx_pkts, total_pkts)
assert False, tmp
- if tx_bytes != (total_pkts * pkt_len):
+ if tx_bytes != (total_pkts * (pkt_len + 4)): # + 4 for ethernet CRC
pprint.pprint(flow_stats)
tmp = 'TX bytes mismatch - got: {0}, expected: {1}'.format(tx_bytes, (total_pkts * pkt_len))
assert False, tmp
@@ -92,7 +92,7 @@ class STLRX_Test(CStlGeneral_Test):
if "rx_bytes" in self.cap:
rx_bytes = flow_stats['rx_bytes'].get(self.rx_port, 0)
- if rx_bytes != (total_pkts * pkt_len) and not self.drops_expected:
+ if rx_bytes != (total_pkts * (pkt_len + 4)) and not self.drops_expected: # +4 for ethernet CRC
pprint.pprint(flow_stats)
tmp = 'RX bytes mismatch - got: {0}, expected: {1}'.format(rx_bytes, (total_pkts * pkt_len))
assert False, tmp