Repository navigation
[Nexthop][fboss2-dev] Let fboss2_integration_test list and filter by production features - #2023
Open
hillol-nexthop wants to merge 1 commit into
Open
hillol-nexthop wants to merge 1 commit into
hillol-nexthop wants to merge 1 commit into
Conversation
…n features
Let fboss2_integration_test be filtered by ASIC production features, the
way the agent, qsfp and link tests are. This change is plumbing only: no
fixture declares a feature yet, so nothing is filtered.
Test binary:
- Fboss2IntegrationTest::addProductionFeatures({...}), called from a
fixture's constructor. A derived fixture adds to what its base
declared.
- --list_production_feature prints "Feature List: A,B" per test, the
same format the other test binaries use.
- In list mode the base constructor skips the test, so gtest never calls
SetUp() or TearDown(). This is why features are declared in the
constructor instead of a virtual getProductionFeatures(): many
fixtures override TearDown(), several of them restore config with an
agent restart, and a skip raised in the base SetUp() would not stop
those from running during listing.
- ConfigVlanCreateTest::SetUpTestSuite() returns early in list mode,
since it queries the agent.
run_test.py:
- The production feature filter (arguments, SDK gating, per-test
listing) moves from SaiAgentTestRunner to ProductionFeatureFilterMixin
in runners/production_features.py. sai_agent behaviour is unchanged.
- fboss2_integration uses the mixin and accepts
--enable-production-features <asic>, --production-features <file>,
--list-tests-for-features and --test-config-options.
2 tasks done
This branch has not been deployed
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
Summary
Lets
fboss2_integration_testbe filtered by ASIC production features, the way the agent, qsfp and link tests are. This PR is plumbing only: no fixture declares a feature yet, so nothing is filtered. The first declarations follow in a second PR stacked on this one.Test binary
Fboss2IntegrationTest::addProductionFeatures({...}), called from a fixture's constructor. A derived fixture adds to what its base declared.--list_production_featureprintsFeature List: A,Bper test, the same format the other test binaries use.SetUp()orTearDown(). This is why features are declared in the constructor instead of a virtualgetProductionFeatures(): many fixtures overrideTearDown(), several of them restore config with an agent restart, and a skip raised in the baseSetUp()would not stop those from running during listing.ConfigVlanCreateTest::SetUpTestSuite()returns early in list mode, since it queries the agent.run_test.py
SaiAgentTestRunnertoProductionFeatureFilterMixininrunners/production_features.py.sai_agentbehaviour is unchanged.fboss2_integrationuses the mixin and accepts--enable-production-features <asic>,--production-features <file>,--list-tests-for-featuresand--test-config-options.Test plan
pytest fboss/oss/scripts/run_scripts/fboss_test_runner/unittestson this branch: 454 passed. That includes 5 new cases for the fboss2 runner (SDK gating and--list-tests-for-featuresamong them); the existingsai_agentfilter and SDK gating cases pass against the moved code.fboss2_integration_testcompiles and links. The run as a whole did not finish, becausefboss/agent/hw/sai/api/bcm/SwitchApi.cppfrom currentmaindoes not compile against the prebuilt SAI our CI uses (SAI_SWITCH_ATTR_EXT_STATIC_FDB_REPLACE_DYNAMICundeclared); this PR does not touch that file. The C++ unit test step did not run for the same reason.fboss2_integration_test --list_production_featurewas run with no agent running: it exits 0 in well under a second, and every test prints aFeature List:line and is reported skipped.Review Findings
Pre-publication review of the final diff found no issues.