Skip to content

[Test Gap] Add test to validate GCU apply-patch completes within expected time bounds#23847

Open
rimunagala wants to merge 1 commit into
sonic-net:masterfrom
rimunagala:test-gap/gcu-acl-ports-replace
Open

[Test Gap] Add test to validate GCU apply-patch completes within expected time bounds#23847
rimunagala wants to merge 1 commit into
sonic-net:masterfrom
rimunagala:test-gap/gcu-acl-ports-replace

Conversation

@rimunagala

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Adds a new test case to cover the GCU hang/slowness regression where
replacing a large ACL ports list with a much smaller one causes GCU's
internal sort/diff logic to hang.

Fixes #23845

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?

GCU has no test that verifies apply-patch completes within a reasonable
time when processing config changes. GCU performance regressions - including
near-hung behavior - go completely undetected in CI.

How did you do it?

Added test_gcu_acl_ports_replace_large_to_small in
tests/generic_config_updater/test_gcu_acl_ports_replace.py that:

  1. Dynamically fetches all available front-end ports from config_facts
  2. Creates an ACL table bound to all available ports via GCU patch
  3. Applies a replace patch that shrinks the ports field to only 2 ports
  4. Asserts the entire operation completes within get_gcu_timeout(duthost)

How did you verify/test it?

  • FAILS on a build where GCU sorting hangs on large-to-small list replace
  • PASSES after the GCU sorting fix is applied

Any platform specific information?

No - uses topology 'any'

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

any

Documentation

N/A

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rimunagala rimunagala force-pushed the test-gap/gcu-acl-ports-replace branch from d09d375 to 6c6d7c8 Compare April 13, 2026 16:30
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread tests/generic_config_updater/test_gcu_acl_ports_replace.py Fixed
@wangxin wangxin requested a review from qiluo-msft April 15, 2026 07:29
guangyao6 pushed a commit to guangyao6/sonic-mgmt that referenced this pull request Apr 16, 2026
…onic-net#20448)

Summary:
Fixes sonic-net#23847

How did you verify/test it?
RAn test generic_config_updater.test_eth_interface::test_replace_fec
…cted time bounds

Signed-off-by: Rithvick Reddy Munagala <rimunagala@microsoft.com>
@rimunagala rimunagala force-pushed the test-gap/gcu-acl-ports-replace branch from 6c6d7c8 to d32c9a7 Compare April 17, 2026 15:13
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Apr 20, 2026
…onic-net#20448)

Summary:
Fixes sonic-net#23847

How did you verify/test it?
RAn test generic_config_updater.test_eth_interface::test_replace_fec

Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
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.

Test Gap: No test to validate GCU apply-patch completes within expected time bounds

3 participants