From 25a88b649bde6c28f0940ea422b52a5ec9a940a1 Mon Sep 17 00:00:00 2001 From: Sonic Build Admin Date: Thu, 19 Feb 2026 17:19:59 +0000 Subject: [PATCH] Fix ACL rule creation in packet trimming tests (Broadcom) ### Description of PR Summary: Fixes # (issue) ### Type of change - [x] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 ### Approach #### What is the motivation for this PR? Packet trimming tests use acl for verifying that the disable trim action works. We couldn't get this testcase to pass on Broadcom th5. One of the issues was that acl rules weren't being created. #### How did you do it? After inspecting the sairedis logs, it was discovered that it was trying and failing to create a counter for the acl rules the test is trying to create. This is because the action list specified in the configuration does not include a counter, but the orchagent seems to attempt to create one anyways. By adding a counter to the action list we no longer fail to create the ACL rule. #### How did you verify/test it? Confirmed `test_acl_action_with_trimming` testcase was passing with the change. #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation --- tests/packet_trimming/packet_trimming_helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/packet_trimming/packet_trimming_helper.py b/tests/packet_trimming/packet_trimming_helper.py index 4e22a0874..91012c2b6 100644 --- a/tests/packet_trimming/packet_trimming_helper.py +++ b/tests/packet_trimming/packet_trimming_helper.py @@ -1426,7 +1426,8 @@ def configure_trimming_acl(duthost, test_ports): "ACL_TABLE_TYPE": { ACL_TABLE_TYPE_NAME: { "ACTIONS": [ - "DISABLE_TRIM_ACTION" + "DISABLE_TRIM_ACTION", + "COUNTER" ], "BIND_POINTS": [ "PORT"