Agent Scale Test
Overview
Agent Scale Tests stress FBOSS features at production-like scale — for example programming the maximum number of ECMP groups/members and the maximum number of ACL table entries. They share the Agent Hw Test framework (see Agent Hw Test) but link only the scale test cases, so they are a focused way to validate that an ASIC and SDK can hold the resource counts FBOSS expects in the fleet.
Setup
Like agent hw tests, scale tests run on a standalone DUT with no cabling required; dataplane traffic is exercised via front-panel ports in loopback. They use the same per-platform agent config under fboss/oss/hw_test_configs.
Test Cases
All scale test cases can be found at:
https://github.com/facebook/fboss/tree/main/fboss/agent/test/agent_hw_tests (see AgentEcmpScaleTests.cpp and AgentAclScaleTests.cpp)
Run Modes
FBOSS agent runs in one of two modes, and scale tests can run in either:
- multi_switch (recommended) — the SwSwitch control plane and the HwAgent (ASIC) run as separate processes communicating over Thrift, exactly as in production.
run_test.pybrings up thehw_agentservice automatically. Binary:multi_switch_agent_scale_test. - mono (deprecated) — SwSwitch and HwSwitch run in a single process. Binary:
sai_agent_scale_test-sai_impl.
Prefer multi_switch — it mirrors the production process model. mono is deprecated and will be removed in the future. If --agent-run-mode is not specified, run_test.py defaults to multi_switch.
Steps to Run Agent Scale Test
Build and package FBOSS following the build guide and copy the package to the switch per Packaging and Running FBOSS HW Tests on Switch. You must be in the
/opt/fbossdirectory when running tests.Run the full scale suite (recommended).
run_test.pyautomatically discovers and runs all scale tests; pass--skip-known-bad-teststo skip tests known not to pass for your ASIC/SDK (key formatvendor/sdk/sdk/asic/mode):./bin/run_test.py sai_agent_scale \
--config ./share/hw_test_configs/$CONFIG \
--agent-run-mode multi_switch \
--skip-known-bad-tests "<vendor>/<sdk>/<sdk>/<asic>/<mode>"Run a single test (optional).
--filteris only needed to narrow the run; the test name below is for illustration only — use any valid gtest name:# multi_switch (recommended)
./bin/run_test.py sai_agent_scale \
--config ./share/hw_test_configs/$CONFIG \
--agent-run-mode multi_switch \
--filter AgentEcmpTest.CreateMaxEcmpGroups
# mono
./bin/run_test.py sai_agent_scale \
--config ./share/hw_test_configs/$CONFIG \
--agent-run-mode mono \
--filter AgentEcmpTest.CreateMaxEcmpGroups
Common flags:
--filter: GTEST filter passed through to the test binary (doc).--agent-run-mode:monoormulti_switch(defaultmulti_switch).--num-npus {1,2}: number of NPUs to run in multi_switch mode (default 1).--skip-known-bad-tests: ASIC/SDK key used to skip known-bad/unsupported scale tests. Scale tests use the dedicated scale known-bad listfboss/oss/hw_known_bad_tests/sai_agent_scale_known_bad_tests.materialized_JSON(auto-synced from Meta's internal config); unsupported tests still come fromfboss/oss/sai_hw_unsupported_tests.