Skip to content

[docs/testplan][bgp]: Add test plan for PrefixListMgr refactor and SUPPRESS_PREFIX#24575

Open
nanali-msft wants to merge 2 commits into
sonic-net:masterfrom
nanali-msft:dev/nanali/prefix-test-plan
Open

[docs/testplan][bgp]: Add test plan for PrefixListMgr refactor and SUPPRESS_PREFIX#24575
nanali-msft wants to merge 2 commits into
sonic-net:masterfrom
nanali-msft:dev/nanali/prefix-test-plan

Conversation

@nanali-msft
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Add a new test plan document docs/testplan/PrefixListMgr-Refactor-Test-Plan.md
that defines regression and feature coverage for sonic-net/sonic-buildimage#26937
("[PrefixListMgr]: Refactor PrefixListMgr to support multiple prefix types via
config registry").

The plan covers:

  • ANCHOR_PREFIX regression on UpstreamLC / UpperSpineRouter (CLI round-trip,
    re-run of existing tests/bgp/test_prefix_list.py, rejection on non-spine,
    persistence across config reload and docker restart bgp, and validation
    that PrefixListMgr is now registered on every device).
  • New SUPPRESS_PREFIX type end-to-end on physical testbeds: CLI add/remove/
    status for IPv4 + IPv6, FRR show <ip|ipv6> prefix-list rendering,
    any-device acceptance, constants.yml name override path, registry-default
    fallback, and persistence.
  • Negative / validation cases: unsupported prefix type via CLI and via direct
    CONFIG_DB write, malformed prefixes, status allowed on every device, and
    unchanged chassis-supervisor skip behavior.

Each test case includes topology, step-by-step procedure, expected results,
pass criteria, and Python skeletons (helpers, fixtures, loganalyzer hookup,
constants.yml override patcher) that map 1:1 to a follow-up
tests/bgp/test_prefix_list_suppress.py implementation. Pytest invocation
commands for physical (t0/t1/t2) and VS testbeds are included.

Fixes # (n/a — doc-only follow-up for sonic-net/sonic-buildimage#26937)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

sonic-net/sonic-buildimage#26937 refactors PrefixListMgr to be data-driven
via a per-prefix-type registry and introduces a new generic SUPPRESS_PREFIX
type. The PR also changes bgpcfgd to register PrefixListMgr
unconditionally and relaxes prefix_list status to be allowed on every
device. We need an explicit test plan to (1) prove no regression for the
existing ANCHOR_PREFIX flow on UpstreamLC / UpperSpineRouter and (2) verify
the new SUPPRESS_PREFIX feature, constants.yml override path, and per-type
device gating on physical testbeds.

How did you do it?

Authored docs/testplan/PrefixListMgr-Refactor-Test-Plan.md with:

  • Scope, PR change summary, risk areas, and testbed coverage matrix.
  • 16 test cases grouped into ANCHOR_PREFIX regression (TC-A1..A5),
    SUPPRESS_PREFIX (TC-S1..S6), and negative/validation (TC-N1..N5).
  • A detailed implementation guide with reusable helpers
    (op_prefix_with_cmd, verify_prefix_list_in_db,
    verify_frr_prefix_list_entry, get_suppress_pl_names), a function-scoped
    cleanup fixture, and a LogAnalyzer fixture so intentional log_warn
    lines for negative cases are expected and any new errors are caught.
  • Concrete pytest invocation commands for physical and VS testbeds.

How did you verify/test it?

Doc-only change; verified internal links and the existing baseline test
(tests/bgp/test_prefix_list.py) referenced by the plan exist in the repo.
The implementation (tests/bgp/test_prefix_list_suppress.py) will be
submitted in a follow-up PR and validated on physical t0/t1/t2 testbeds per
the plan.

Any platform specific information?

None. ANCHOR_PREFIX cases require a chassis with an UpstreamLC line card
(t2). SUPPRESS_PREFIX and negative cases run on any topology (t0/t1/t2/vs).

Supported testbed topology if it's a new test case?

  • ANCHOR_PREFIX regression: t2 (UpstreamLC / UpperSpineRouter).
  • SUPPRESS_PREFIX + negative cases: t0, t1, t2.
  • VS (vms-kvm-t0): smoke-test for CLI plumbing and bgpcfgd startup only.

Documentation

docs/testplan/PrefixListMgr-Refactor-Test-Plan.md

…PPRESS_PREFIX

Signed-off-by: Na Li <nanali19871126@gmail.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@github-actions github-actions Bot requested review from mihirpat1, r12f and wangxin May 13, 2026 02:17
Signed-off-by: Na Li <nanali19871126@gmail.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

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.

2 participants