Skip to content

[decap] Remove orphaned --ttl_uniform / --dscp_uniform options#24627

Merged
Blueve merged 1 commit into
sonic-net:masterfrom
Xichen96:dev/xichenlin/decap-remove-orphan-uniform-flags
May 15, 2026
Merged

[decap] Remove orphaned --ttl_uniform / --dscp_uniform options#24627
Blueve merged 1 commit into
sonic-net:masterfrom
Xichen96:dev/xichenlin/decap-remove-orphan-uniform-flags

Conversation

@Xichen96
Copy link
Copy Markdown
Contributor

Description of PR

Remove the four orphaned pytest CLI options registered in tests/decap/__init__.py:

  • --ttl_uniform
  • --dscp_uniform
  • --no_ttl_uniform
  • --no_dscp_uniform

Why

PR #20304 refactored tests/decap/conftest.py. It removed pytest_generate_tests and build_ttl_dscp_params, and replaced them with the supported_ttl_dscp_params fixture, which returns a single {ttl, dscp, vxlan} dict at runtime based on the DUT's APP_DB / ASIC heuristics. That refactor left the four --*_uniform options registered with no consumer.

The companion conditional_mark cleanup PR (#24626) removes the parametrize-keyed entries these options used to drive. A grep across origin/master and origin/202511 confirms that no file in the public sonic-mgmt repo references --ttl_uniform, --dscp_uniform, --no_ttl_uniform, or --no_dscp_uniform outside the addoption block itself.

Removing the dead options keeps the test surface honest. The --outer_ipv4 / --outer_ipv6 / --inner_ipv4 / --inner_ipv6 options are still in use and remain.

Approach

Pure deletion in tests/decap/__init__.py — −25 lines, no additions.

How to verify it

pytest --collect-only tests/decap/test_decap.py still collects exactly one item (decap/test_decap.py::test_decap), identical to before. After this change, passing --no_dscp_uniform will be rejected by pytest as unrecognized arguments, surfacing dead invocations rather than silently doing nothing.

Related

Backports

Backports handled by automation after master merges.

PR sonic-net#20304 refactored tests/decap/conftest.py. It removed pytest_generate_tests
and build_ttl_dscp_params, and replaced them with the supported_ttl_dscp_params
fixture which returns a single {ttl, dscp, vxlan} dict at runtime based on the
DUT APP_DB / ASIC heuristics. That refactor left four CLI options registered
in tests/decap/__init__.py with no consumer:

  --ttl_uniform
  --dscp_uniform
  --no_ttl_uniform
  --no_dscp_uniform

The companion conditional_mark cleanup PR removes the parametrize-keyed entries
that these options used to drive. The public sonic-mgmt repo has no remaining
consumer of these CLI flags; a grep across origin/master and origin/202511
confirms zero references outside the addoption block itself.

Removing the dead options keeps the test surface honest. The --outer_ipv4 /
--outer_ipv6 / --inner_ipv4 / --inner_ipv6 options are still in use and
remain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xichen Lin <lukelin0907@gmail.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@github-actions github-actions Bot requested a review from arlakshm May 14, 2026 13:36
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@github-actions github-actions Bot requested review from wangxin and xwjiang-ms May 14, 2026 13:36
@Xichen96 Xichen96 added Request for 202511 branch Request to backport a change to 202511 branch and removed Request for 202511 branch Request to backport a change to 202511 branch labels May 14, 2026
@Blueve Blueve merged commit 1889e14 into sonic-net:master May 15, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants