Skip to content

Add pytest.mark.disable_route_check to static route tests#22697

Open
anamehra wants to merge 1 commit intosonic-net:masterfrom
anamehra:anamehra/test_static_route1
Open

Add pytest.mark.disable_route_check to static route tests#22697
anamehra wants to merge 1 commit intosonic-net:masterfrom
anamehra:anamehra/test_static_route1

Conversation

@anamehra
Copy link
Contributor

@anamehra anamehra commented Mar 3, 2026

Description of PR

Summary:
Add pytest.mark.disable_route_check to the generic config updater static route tests so the route-check service is not run for these tests. This avoids failures from routeCheck during teardown/rollback (e.g. on multi-ASIC) that are expected and do not affect the DUT, and matches the pattern used by other GCU tests that change routing state.

  • Static route tests add/update/remove routes and use checkpoint rollback. During rollback, route convergence can briefly make routeCheck fail; those failures are logged but are not real test failures.
  • Marking the module with disable_route_check skips the route-check validation for these tests and prevents those expected convergence-related failures from failing the run.

Summary:
Fixes # (issue)

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?

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

Signed-off-by: Anand Mehra (anamehra) <anamehra@cisco.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@cyw233 cyw233 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the change — looks good. ✅

Summary: Adds pytest.mark.disable_route_check to the static route GCU tests.

  • Correct pattern — Other GCU tests that modify routing state (ECMP, NTP, etc.) already use this marker. This is consistent with the existing convention.
  • Valid rationale — Static route tests add/remove/rollback routes, causing transient route convergence states that trip routeCheck with false failures, especially on multi-ASIC platforms.
  • Minimal & safe — Single-line, low-risk change that only suppresses an irrelevant validation for these specific tests.

No issues found.

@cyw233
Copy link
Contributor

cyw233 commented Mar 4, 2026

Hi @anamehra, do we need to have a test-level disable_route_check_for_duthost() function to disable the route check on host after each test case? I'm asking because if there's a config_reload() on the host, the routeChecker will be re-enabled.

@anamehra
Copy link
Contributor Author

anamehra commented Mar 4, 2026

Hi @anamehra, do we need to have a test-level disable_route_check_for_duthost() function to disable the route check on host after each test case? I'm asking because if there's a config_reload() on the host, the routeChecker will be re-enabled.

Hi @cyw233 , I will review this and get back. Thanks

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