Repository navigation
Fix flaky desktop server tests - #820
Merged
Merged
Conversation
jserv
reviewed
Nov 23, 2026
Contributor
|
Some review comments on this pull request are not settled yet. Please refine the change per the review comments listed below, reply on each thread with what you changed or why you did not, and mark each thread resolved yourself once it is settled (Resolve conversation, at the bottom of the thread). The pull request stays blocked while review threads are open. Not addressed at the current head:
Checked at bdc14b7. |
The two desktop server tests that start a stand-in server script now write the script and start it under one lock, through a shared start_fake helper. Run in parallel, a spawn on one test's thread could fork while the other test's script was still open for writing, and the forked child held that descriptor until it exec'd, so starting the script failed with "Text file busy". Change-Id: Ia5874ad2171235dd731d0c1aa7259e269fa53afe
ColtenOuO
force-pushed
the
fix-desktop-etxtbsy
branch
from
November 23, 2026 05:57
bdc14b7 to
ce07436
Compare
jserv
enabled auto-merge
November 23, 2026 06:08
Contributor
|
Thank @ColtenOuO for contributing! |
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.
Summary
The two desktop server tests that start a stand-in server script ran in parallel, and a spawn on one test's thread could fork while the other test's script was still open for writing. The forked child holds that descriptor until it execs, so starting the script failed with
Text file busy (os error 26)and madegates (rust)fail intermittently.Writing the script and starting it now happen under one lock (
SPAWNING), through a sharedstart_fakehelper that both tests use. Test-only: the real server binary is never freshly written before it is started.Testing
Text file busy, in both tests)Summary by cubic
Fixes flaky
desktop/tests/unit/server.rstests that intermittently failed withText file busywhen run in parallel.The two tests that start a stand-in server script can race: a spawn on one test's thread can fork while the other test's script is still open for writing, and the forked child holds that descriptor until it execs. Writing the script and starting it now happen under one lock,
SPAWNING, through a sharedstart_fakehelper that both tests use. This is test-only; the real server binary is never freshly written before it is started.Written for commit ce07436. Summary will update on new commits.