[Celestica] Leh800bcls: Fix AgentEcmpTrunkTest initialization and crash on multi-NPU platforms - #1493
Open
gang-tao wants to merge 1 commit into
Open
[Celestica] Leh800bcls: Fix AgentEcmpTrunkTest initialization and crash on multi-NPU platforms#1493gang-tao wants to merge 1 commit into
gang-tao wants to merge 1 commit into
Conversation
…sh on multi-NPU platforms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
When running the test agent case AgentEcmpTrunkTest.*, fboss_hw_agent crashes. The error is:
Root Cause
The overridden initialConfig() method in AgentEcmpTrunkTests.cpp called utility::oneL3IntfNPortConfig without specifying the optional final parameter platformType (falling back to default std::nullopt).
Lacking a valid PlatformType, the config generator genPortVlanCfg fallback to single-NPU generation, producing a switchIdToSwitchInfo dictionary that only contained Switch ID 0 with an empty connectionHandle.
Solution
Modified initialConfig() in class AgentEcmpTrunkTest in fboss/agent/test/agent_hw_tests/AgentEcmpTrunkTests.cpp to pass the ensemble.getSw()->getPlatformType() platformType parameter, ensuring the correct configuration is generated for multi-switch platforms.
Test Plan
Verified on leh800bcls platform that all 6 tests in AgentEcmpTrunkTest successfully pass on both Npu0 and Npu1: