Fix flaky tests - #1685
Merged
Merged
Fix flaky tests#1685
Conversation
runsh() hides ssh's own errors, so when ssh could not connect right after the previous test rebooted the DUT, the first read came back empty and the test reported /etc/default/chronyd as missing. The removal check had the opposite problem: a failed connection passed as a removed file. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
runsh() hides ssh's own errors, so a failed connection after the reboot read as an empty script list, and the check that the disabled script did not run passed on a failed connection. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused changes correctly use the retry helper for idempotent SSH operations.
Review effort: Balanced
Findings: None
What changed in this PR
Updates /system/advanced tests to tolerate transient SSH transport failures.
Changes:
- Uses
run_retry()for idempotent remote checks. - Validates missing files with exit code
1.
| File | Description |
|---|---|
test/case/system/rc_d/test.py |
Makes rc.d verification retry transient SSH failures. |
test/case/system/etc_default/test.py |
Makes default-file checks retry transient SSH failures. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
With all three DUTs configured at once, a client could send its three discovers before the server answered, then back off for 30 seconds, longer than the test waits for the lease. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
mattiaswal
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR aims to correct:
/system/advancedconfiguration have started to exhibit flaky behaviorChecklist
Tick relevant boxes, this PR is-a or has-a: