vmm_tests_run: only require --dir when tests need a Windows disk#3926
Merged
Conversation
Previously any WSL-to-Windows VMM test run demanded an output directory on a Windows filesystem, even though most tests work fine from the default WSL-side directory. The Windows-filesystem constraint only applies to disk images that can't be opened over a \\wsl$ 9p path: Hyper-V disks (attached to a real Hyper-V VM) and VHDX / dynamic VHD1 images (opened through the Windows virtual-disk mount API). Streamed disks, fixed VHD1, VMGS, and ISO images all work from the WSL side. Defer the output-directory validation until after test selections are resolved, so we know which disk images are actually needed, and only enforce the Windows-path requirement when the selection includes a Hyper-V test or a .vhdx artifact. The error messages now explain why --dir is required. Documentation, the vmm-tests skill, and the copilot-instructions guidance are updated to match the new behavior.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines cargo xflowey vmm-tests-run behavior when cross-compiling to Windows from WSL2 by making --dir conditional on whether the selected tests actually require disk images that can’t be opened over \\wsl$ (9p). It updates both the implementation and the contributor-facing documentation to reflect the new, more targeted validation.
Changes:
- Defer WSL-to-Windows output directory validation until after test/artifact selection is resolved.
- Require
--dironly when the selection needs a Windows-filesystem-backed disk (Hyper-V tests or.vhdxartifacts). - Update Guide docs, the
vmm-testsskill documentation, and.github/copilot-instructions.mdto match the new behavior and improved error messaging.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Guide/src/dev_guide/tests/vmm.md | Documents that most Windows-from-WSL2 runs work with the default WSL-side output dir and explains when --dir is required. |
| flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs | Moves --dir validation to post-selection and gates it on whether the resolved selection needs Windows-only disk access (Hyper-V or .vhdx). |
| .github/skills/vmm-tests/SKILL.md | Updates contributor guidance to avoid --dir unless the selected tests require Windows-filesystem disk images. |
| .github/copilot-instructions.md | Aligns Copilot guidance with the new conditional --dir requirement and the tool’s auto-detection behavior. |
smalis-msft
approved these changes
Jul 13, 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.
Previously any WSL-to-Windows VMM test run demanded an output directory on a Windows filesystem, even though most tests work fine from the default WSL-side directory. The Windows-filesystem constraint only applies to disk images that can't be opened over a \wsl$ 9p path: Hyper-V disks (attached to a real Hyper-V VM) and VHDX / dynamic VHD1 images (opened through the Windows virtual-disk mount API). Streamed disks, fixed VHD1, VMGS, and ISO images all work from the WSL side.
Defer the output-directory validation until after test selections are resolved, so we know which disk images are actually needed, and only enforce the Windows-path requirement when the selection includes a Hyper-V test or a .vhdx artifact. The error messages now explain why --dir is required. Documentation, the vmm-tests skill, and the copilot-instructions guidance are updated to match the new behavior.