summaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/test/test_acl_plugin_l2l3.py
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2020-11-25 14:42:54 +0000
committerDamjan Marion <dmarion@me.com>2020-12-04 22:50:41 +0000
commit270f5235c04250ee3aafc78bce75f506e9847834 (patch)
tree83ed45568293b29dc95a1ee67fb6d0704bebdc2d /src/plugins/acl/test/test_acl_plugin_l2l3.py
parent6223766f96c469e42d6855c4b5933e7a9e06d621 (diff)
acl: fix acl-plugin testcases packet counting
Counter checks in ACL tests were incorrect if VPP is running with multiple workers Change-Id: Id095d55c6cd3bfee8aaac6d177984e569e87d29b Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/test/test_acl_plugin_l2l3.py')
-rw-r--r--src/plugins/acl/test/test_acl_plugin_l2l3.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/acl/test/test_acl_plugin_l2l3.py b/src/plugins/acl/test/test_acl_plugin_l2l3.py
index 30b53728c63..48faafb7398 100644
--- a/src/plugins/acl/test/test_acl_plugin_l2l3.py
+++ b/src/plugins/acl/test/test_acl_plugin_l2l3.py
@@ -538,8 +538,9 @@ class TestACLpluginL2L3(VppTestCase):
matches = self.statistics.get_counter('/acl/%d/matches' % acl_idx)
self.logger.info("stat seg for ACL %d: %s" % (acl_idx, repr(matches)))
total_count = 0
- for p in matches[0]:
- total_count = total_count + p['packets']
+ for m in matches:
+ for p in m:
+ total_count = total_count + p['packets']
self.assertEqual(total_count, packet_count)
def run_traffic_ip46_x_to_y(self, bridged_to_routed,