Skip to content

[Nexthop] Fix AgentQueuePerHost tests for G202X - #1448

Open
vvasavada-nexthop wants to merge 2 commits into
facebook:mainfrom
nexthop-ai:add-special-casing-g202x-as-well-as
Open

[Nexthop] Fix AgentQueuePerHost tests for G202X#1448
vvasavada-nexthop wants to merge 2 commits into
facebook:mainfrom
nexthop-ai:add-special-casing-g202x-as-well-as

Conversation

@vvasavada-nexthop

Copy link
Copy Markdown

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

On some platforms, split horizon check is after ACL matching. Thus, the counter increment can happen one additional time for the looped back packet in queue per host tests. For G202X, we need to do a fix similar to https://github.com/facebook/fboss/blob/main/fboss/agent/test/agent_hw_tests/AgentQueuePerHostL2Tests.cpp#L114-L136 in other queue per host tests.

Since the pattern would be repeated in many queue per host tests, we just implement a helper getQueuePerHostExpectedLoopbackPktCount and let all the tests use that helper to verify pkt count. getQueuePerHostExpectedLoopbackPktCount return double the expected pkt count passed for EBRO, P200, YUBA and G202X ASICs while returns it as is for other ASICs.

Test Plan

The tests pass after the fix.

[ PASSED ] cold_boot.AgentAclTableGroupTrafficTest.VerifyQueuePerHostAclTableAndTtlAclTable (20247 ms)
[ PASSED ] warm_boot.AgentAclTableGroupTrafficTest.VerifyQueuePerHostAclTableAndTtlAclTable (8808 ms)
Summary:
   PASSED : 2
[ PASSED ] cold_boot.AgentQueuePerHostRouteTest.VerifyHostToQueueMappingClassID (33264 ms)
[ PASSED ] warm_boot.AgentQueuePerHostRouteTest.VerifyHostToQueueMappingClassID (14852 ms)
[ PASSED ] cold_boot.AgentQueuePerHostRouteTest.VerifyHostToQueueMappingClassIDBlock (29255 ms)
[ PASSED ] warm_boot.AgentQueuePerHostRouteTest.VerifyHostToQueueMappingClassIDBlock (9793 ms)
Summary:
   PASSED : 4
[ PASSED ] cold_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsAfterResolve (20491 ms)
[ PASSED ] warm_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsAfterResolve (8785 ms)
[ PASSED ] cold_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsAfterResolveBlock (16386 ms)
[ PASSED ] warm_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsAfterResolveBlock (4693 ms)
[ PASSED ] cold_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsWithResolve (20490 ms)
[ PASSED ] warm_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsWithResolve (8660 ms)
[ PASSED ] cold_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsWithResolveBlock (16385 ms)
[ PASSED ] warm_boot.AgentQueuePerHostTest.VerifyHostToQueueMappingClassIDsWithResolveBlock (4756 ms)
[ PASSED ] cold_boot.AgentQueuePerHostTest.VerifyTtldCounter (20445 ms)
[ PASSED ] warm_boot.AgentQueuePerHostTest.VerifyTtldCounter (8852 ms)
[ PASSED ] cold_boot.AgentQueuePerHostTest.RemovePendingNeighborDoesNotCrash (16485 ms)
[ PASSED ] warm_boot.AgentQueuePerHostTest.RemovePendingNeighborDoesNotCrash (4743 ms)
Summary:
   PASSED : 12

Also verified that there's no regression in queue per host L2 tests that were changed to use new helper.

[ PASSED ] cold_boot.AgentQueuePerHostL2Test.VerifyHostToQueueMappingClassID (18151 ms)
[ PASSED ] warm_boot.AgentQueuePerHostL2Test.VerifyHostToQueueMappingClassID (6555 ms)
Summary:
   PASSED : 2

@vvasavada-nexthop
vvasavada-nexthop requested a review from a team as a code owner July 31, 2026 22:25
@meta-cla meta-cla Bot added the CLA Signed label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant