Skip to content

[tests] fix race condition in SRP recovery reboot test#3444

Merged
jwhui merged 1 commit into
openthread:mainfrom
jwhui:fix-srp-tc-11-reboot
Jun 24, 2026
Merged

[tests] fix race condition in SRP recovery reboot test#3444
jwhui merged 1 commit into
openthread:mainfrom
jwhui:fix-srp-tc-11-reboot

Conversation

@jwhui

@jwhui jwhui commented Jun 23, 2026

Copy link
Copy Markdown
Member

Resolve a pre-existing race condition in dind_srp_tc_11.exp:

  • After the DUT reboots, the SRP server port changes.
  • The test was checking 'srp client host state' immediately and matching 'Registered' from the pre-reboot state, before the client actually detected the port change and re-registered.
  • Added a loop to wait for the client's registered server port to match the new server port before checking the host state.

gemini-code-assist[bot]

This comment was marked as outdated.

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.75%. Comparing base (2b41187) to head (6a2f528).
⚠️ Report is 1544 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3444       +/-   ##
===========================================
- Coverage   55.77%   33.75%   -22.02%     
===========================================
  Files          87      143       +56     
  Lines        6890    17246    +10356     
  Branches        0     1413     +1413     
===========================================
+ Hits         3843     5822     +1979     
- Misses       3047    11117     +8070     
- Partials        0      307      +307     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from 06a14c6 to 282e954 Compare June 23, 2026 23:04
gemini-code-assist[bot]

This comment was marked as outdated.

@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from 282e954 to 604e95d Compare June 23, 2026 23:12
gemini-code-assist[bot]

This comment was marked as outdated.

@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from 604e95d to 9c0684f Compare June 23, 2026 23:14
gemini-code-assist[bot]

This comment was marked as outdated.

@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from 9c0684f to 4b583e4 Compare June 23, 2026 23:17
gemini-code-assist[bot]

This comment was marked as outdated.

@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from 4b583e4 to 710db6b Compare June 23, 2026 23:21
gemini-code-assist[bot]

This comment was marked as outdated.

@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from 710db6b to ab14ccb Compare June 23, 2026 23:24
gemini-code-assist[bot]

This comment was marked as outdated.

@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from ab14ccb to 425fabc Compare June 24, 2026 00:46
gemini-code-assist[bot]

This comment was marked as outdated.

Resolve a pre-existing race condition in dind_srp_tc_11.exp:
- After the DUT reboots, the SRP server port changes.
- The test was checking 'srp client host state' immediately and
  matching 'Registered' from the pre-reboot state, before the client
  actually detected the port change and re-registered.
- Added a loop to wait for the client's registered server port to
  match the new server port before checking the host state.
@jwhui jwhui force-pushed the fix-srp-tc-11-reboot branch from 425fabc to 6a2f528 Compare June 24, 2026 00:54
@jwhui

jwhui commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the integration test script 'tests/scripts/expect/dind_srp_tc_11.exp' to check if the variable 'port_after' is defined. If it exists, the script parses the port from hexadecimal to decimal, waits for the SRP client server to update to the new port, and verifies the update completes successfully before proceeding with the host state registration check. There are no review comments, so I have no feedback to provide.

@jwhui jwhui marked this pull request as ready for review June 24, 2026 01:51
@jwhui jwhui merged commit 4d94cc4 into openthread:main Jun 24, 2026
40 checks passed
@jwhui jwhui deleted the fix-srp-tc-11-reboot branch June 24, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants