[WSLC] Reset WSLC runtime between E2E tests to fix session-state bleed - #695
Draft
Soham Das (SohamDas2021) wants to merge 1 commit into
Draft
[WSLC] Reset WSLC runtime between E2E tests to fix session-state bleed#695Soham Das (SohamDas2021) wants to merge 1 commit into
Soham Das (SohamDas2021) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds WSLC runtime resets and targeted retries to prevent E2E session-state bleed.
Changes:
- Shuts down WSL before each test attempt.
- Retries transient
0x80070057failures once. - Applies reset/retry handling to delegated fixture tests.
Comment on lines
+105
to
+113
| $null = wsl --shutdown 2>&1 | ||
| $deadline = (Get-Date).AddSeconds($TimeoutSeconds) | ||
| while ((Get-Date) -lt $deadline) { | ||
| $running = "" | ||
| try { $running = (& wsl.exe --list --running 2>$null | Out-String) -replace "`0", "" } catch { break } | ||
| if ([string]::IsNullOrWhiteSpace($running) -or $running -match 'no running') { break } | ||
| Start-Sleep -Milliseconds 500 | ||
| } | ||
| Start-Sleep $SettleSeconds |
Soham Das (SohamDas2021)
marked this pull request as draft
July 28, 2026 20:28
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
The WSLC E2E suite (
tests/scripts/run_wslc_all_tests.ps1) flaked on volume-mount tests: running WSLC containers that mount host volumes back-to-back leaves the WSL runtime in a state where the nextWslcCreateContainerreturnsE_INVALIDARG(0x80070057). Each config is individually correct, every affected test passes in isolation after awsl --shutdown, but chained runs would intermittently fail (wslc_filesystem,wslc_readonly_mount,wslc_denied_masking,wslc_most_specific_denied_parent), depending on run order. This resets the runtime between tests.🔗 References
🔍 Validation
✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
GitHub Actions runs the PR validation build automatically. The ADO pipeline
(
MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity with the GitHubActions build; it runs on merge to
main, and Microsoft reviewers with write access can trigger iton a PR with
/azp run. See docs/pull-requests.md.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See docs/pull-requests.md
for the steps.
Microsoft Reviewers: Open in CodeFlow