From 5510818b7473851b016e17deb87db37135f96d67 Mon Sep 17 00:00:00 2001 From: Sonic Build Admin Date: Mon, 30 Jun 2025 15:49:40 +0000 Subject: [PATCH] Enhance ACL test on LT2 topology ### Description of PR Summary: This PR is to enhance ACL test on LT2 topology. The change is done by updating port selection logic to include both upstream ports and downstream ports on LT2. Depends on https://github.com/sonic-net/sonic-mgmt/pull/19260 ### Type of change - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [x] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 ### Approach #### What is the motivation for this PR? This PR is to enhance ACL test on LT2 topology. #### How did you do it? The change is done by updating port selection logic to include both upstream ports and downstream ports on LT2. #### How did you verify/test it? The change is verified by running `test_acl` on a physical testbed. #### Any platform specific information? No. #### Supported testbed topology if it's a new test case? Not a new test. ### Documentation --- tests/acl/test_acl.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/acl/test_acl.py b/tests/acl/test_acl.py index 6712451d15..39e21d6e64 100644 --- a/tests/acl/test_acl.py +++ b/tests/acl/test_acl.py @@ -430,6 +430,13 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_unselected_dut, tbinfo, acl_table_ports[''].append(k) elif topo == "t2": acl_table_ports = t2_info['acl_table_ports'] + elif topo == "lt2": + # For LT2, add portchannels for downstream links + for k, v in list(port_channels.items()): + acl_table_ports[v['namespace']].append(k) + # Add RIF for upstream links + for namespace, port in list(upstream_ports.items()): + acl_table_ports[namespace] += port else: for namespace, port in list(upstream_ports.items()): acl_table_ports[namespace] += port