xtask: wine-test runs the Windows tests on a Linux host under Wine #1218
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1218
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1218"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@neonbyte1 on GitHub · 2026-11-24 16:28 UTC · original
neonbyte1:xtask/wine-test→main· +255 −0 · 3 files · 7 commits · openAdds
cargo xtask wine-test, which runs the Windows test suite on a Linux host under Wine. Several testers in #340 do this by hand today.What it does
x86_64-pc-windows-msvcwithclang-cl,llvm-libandlld-linkagainst anxwin splat(default~/.xwin). The toolchain is set through environment variables only, so Windows builds and.cargo/config.tomlare unchanged.wineas the target runner, in a Wine prefix of its own undertarget/wine-prefix. The user's~/.wineis not touched.--vkd3d-proton <dir>copies that folder'sd3d12.dllandd3d12core.dllinto the prefix and overrides Wine's own D3D12, which lacks shader model 6.6. vkd3d-proton's pipeline cache goes totarget/vkd3d-proton-cache; written to the crate directory, the asset policy would reject it.--workspace --exclude xtask --no-fail-fast. xtask runsgit, so it stays a host-only tool. Arguments after--replace the defaults.victory-loader's two end-to-end tests intests/load_probe.rsbuild their fixture by runningcargo, which they cannot do inside Wine. The default run skips them (-- --skip ...) and says so. The prebuilt-fixture hook (VICTORY_HLE_PROBE) is split out into #3270; with it set, the skips are left out.Result on this branch
Measured before the hook was split out (the run included the two loader tests through the hook), on
mainof that day, Wine 11.22, vkd3d-proton from GE-Proton11-14, RTX 5090: 334 passed, 4 failed, 6 ignored. The four failures are known Wine/vkd3d-proton gaps with open fixes:indirect::tests::argument_clamp_buildsmodules::net::tests::only_loopback_is_reachablepipeline::library::tests::a_rejected_blob_gives_an_empty_libraryemit::tests::stub_pipeline_is_createdWith those PRs merged locally, it was 343 passed, 0 failed, 6 ignored on both an RTX 5090 and an RX 7600. Each GPU was isolated with
VK_DRIVER_FILES.Checks
cargo clippy -p xtask --all-targets --locked -- -D warningsis clean,cargo test -p xtaskpasses (4 tests), andcargo xtask policyis OK.AI-assisted (Claude Code).
@Zipettte on GitHub · 2026-11-24 17:59 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
b3e39e7:cargo test -p victory-loaderpasses, 25 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@BaggyALPHA on GitHub · 2026-11-24 16:35 UTC · original
On
xtask/src/wine.rsline 44 (outdated):An
--xwindirectory containing spaces breaks the fixture build here. Cargo splits the space-separated target rustflags into separate arguments, including the spaces inside each SDK directory name. I reproduced this with the pinned Rust toolchain and the synthetic HLE probe. The build failed with the current flag encoding and succeeded with the same library-search argument passed throughCARGO_ENCODED_RUSTFLAGS.Could the three
-Lnative=...arguments be passed separately viaCARGO_ENCODED_RUSTFLAGS, joined with the unit separator? Including an xwin directory with spaces in the smoke test would also exercise the compiler include flags above.@neonbyte1 on GitHub · 2026-11-24 16:39 UTC · original
On
xtask/src/wine.rsline 44 (outdated):Thanks, fixed in
b3e39e7(xtask: wine-test keeps an xwin directory with spaces in one argument):-Lnative=arguments now go throughCARGO_ENCODED_RUSTFLAGS, joined with\x1f. Every cargo call in the xtask passes--target, so these flags don't reach host build scripts or proc macros./imsvcarguments are shell-quoted, andCC_SHELL_ESCAPED_FLAGS=1makes cc 1.11 parseCFLAGS/CXXFLAGSlike a shell command line. Your second point applied here too: cc split them on spaces the same way.Linux check of the runner itself, with
--xwin "/tmp/xwin dir with space"(a symlink to the splat), Wine 11.22 and vkd3d-proton from GE-Proton11-14:loads_binds_and_calls_probepasses.main: 334 passed, 4 failed, 6 ignored. The four failures are the known Wine/vkd3d-proton gaps listed in the description; #190, #217 and #347 fix three of them.cargo clippy -p xtask --all-targets --locked -- -D warningsis clean.AI-assisted (Claude Code).
@ -0,0 +27,4 @@let xwin = match o.xwin {Some(dir) => dir,None => PathBuf::from(std::env::var_os("HOME").context("HOME is not set")?).join(".xwin"),};@BaggyALPHA on GitHub · 2026-11-24 16:50 UTC · original
A relative
--xwinpath can pass this validation and then point somewhere else when Cargo runs. The directory check uses the invocation directory, while the child command sets its working directory to the repository root. I reproduced this by launching the xtask from another directory with a valid relative SDK path and capturing the child command. Both Cargo invocations received three library paths and four include paths that did not exist relative to their working directory.Could you resolve
xwinto an absolute path before validating it and emitting the flags?std::path::absolute(&xwin)preserves the SDK symlink and keeps the path anchored to the invocation directory.@ -0,0 +27,4 @@let xwin = match o.xwin {Some(dir) => dir,None => PathBuf::from(std::env::var_os("HOME").context("HOME is not set")?).join(".xwin"),};@neonbyte1 on GitHub · 2026-11-24 17:02 UTC · original
Thanks, fixed in
a19107b(xtask: wine-test anchors a relative xwin path to the invocation directory).xwinnow goes throughstd::path::absolutebefore the splat check, so the check, the flags and the error message all use the same absolute path, and the symlink is kept.Linux check: I launched the xtask from
/tmp/xwrelwith--xwin "xwin dir with space", a relative symlink to the splat, and ran-p victory-loader --test load_probe:b3e39e7, the splat check passed, and then building hle-probe failed because the library paths didn't resolve from the repository root.a19107b, the fixture builds and bothload_probetests pass under Wine 11.22.cargo clippy -p xtask --all-targets --locked -- -D warningsis clean,cargo test -p xtaskpasses, andcargo xtask policyis OK.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 01:20 UTC · original · edited 2026-11-26 02:17 UTC
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. Re-reviewed at
6ceba60, which merges cleanly intomain. The new commit adds--dxvk <dir>, which copies DXVK'sdxgi.dllinto the prefix through the sharedcopy_dllshelper. It also adds twowine reg addcalls that turn off the crash debugger and the WineDbg dialog. By reading, those registry writes stay in the tool's ownWINEPREFIXundertarget/, becausecommand()sets it, and.cargo/and the Windows build are still untouched. The verdict has not changed:xtask/src/wine.rs(wine::run) starts external processes (wineboot,wine, a crosscargo test) and puts external DLLs into a prefix. Whether to add a tool like that is the maintainer's call.On your reply: the use case (one reproducible way for Linux testers to run the suite) is clear, and keeping skips as
cargo testarguments is workable. What would still help the maintainer decide: a short list of the known Wine/vkd3d-proton failures on currentmain, and theVICTORY_HLE_PROBEhook split into its own small PR.CI: passing.
Generated by Claude Code
@neonbyte1 on GitHub · 2026-11-25 23:26 UTC · original
Thanks for the review. On the three points:
cargo xtask wine-testgives them one reproducible way to run the existing tests under Wine + vkd3d-proton before posting results. It's opt-in, lives entirely inxtask/src/wine.rs, and doesn't touch the Windows build or CI. I'm happy to maintain it.VICTORY_HLE_PROBE: only that one test reads it. When unset, the test runs the existing fixture. I can move it to a separate PR if you prefer.main(842b0cb) with this PR merged (no conflicts), on an RTX 5090 with Wine 11.22 and vkd3d-proton from GE-Proton11-14.load_probepasses (2/2). The failures are all in code this PR doesn't touch: 30 invictory-gpu, 4 invictory-shader, 2 invictory-hle, 1 invictory-loader. They come from missing pieces in Wine and vkd3d-proton, for example Wine's HLSL compiler (argument_clamp_builds) and root-signature calls.queue::tests::aliased_present_planes_preserve_the_host_texture_statecrashes inside Wine's builtin dxgi, so I skipped it with-- --skip aliased_present_planes. Extra arguments go tocargo test, so known failures can be skipped the same way.AI-assisted (Claude); measured on my machine, no game data shared.
@neonbyte1 on GitHub · 2026-11-26 01:30 UTC · original
Pushed
6ceba60:--dxvk <dir>puts DXVK'sdxgi.dllinto the prefix next to vkd3d-proton's D3D12. That's the setup the title itself needs under Wine; Wine's own DXGI crashes inwined3don the first present.ShowCrashDialog = 0), so a crash no longer leaveswinedbgwaiting and the run hanging.With both DLL sets, one GPU test's process was SIGKILLed at exit on NVIDIA after passing. That's a vkd3d-proton/Wine race on the first present (HansKristian-Work/vkd3d-proton#3524); the fix for that test goes in with the other Wine test fixes.
AI-assisted (Claude).
@BaggyALPHA on GitHub · 2026-11-24 16:35 UTC · original · reviewed
Windows verification on this PR: both loader integration tests passed with the default fixture build and with a separately built synthetic probe supplied through
VICTORY_HLE_PROBE. The xtask tests, xtask Clippy with warnings denied, and asset-policy check also passed. The Linux/Wine runner itself still needs a Linux check.AI-assisted (Codex).
@BaggyALPHA on GitHub · 2026-11-24 16:50 UTC · original · reviewed
I rechecked the updated revision on Windows. Both loader integration tests pass with the default and prebuilt fixtures. The xtask tests, Clippy, and asset policy pass. Capturing the child process environment also confirms that all three library arguments and all four include arguments preserve an absolute SDK directory containing spaces and an apostrophe. The fixture builds with the captured Rust flags on Windows.
AI-assisted (Codex).
@mercuryVM on GitHub · 2026-11-24 18:11 UTC · original · approved these changes
Tested
a19107bdon Windows 11, RTX 5070, MSVC:cargo test -p xtask -p victory-loaderpasses on the head, andcargo xtask wine-test --helpparses.clippy -D warnings(default and all features) are all clean.wine-testitself, since this is a Windows host. My notes on that path are from reading.The Wine path looks careful:
--target, soCARGO_ENCODED_RUSTFLAGSnever reaches host build scripts.target/.VICTORY_HLE_PROBEis read only by the loader test.Small points:
HOMEis required even when--xwinis given? No, it's only read in theNonearm. Fine.wine_pathrelies on the defaultZ:mapping of/. A prefix that removed that mapping would fail later with an unclear error. Probably not worth handling, but a word in the README would help.AI-assisted (Claude Code).
@BaggyALPHA on GitHub · 2026-11-26 00:54 UTC · original · reviewed
Edited to correct my own framing: this is a partial review, not a verification of the feature. My first version led with a table of runs and implied more coverage than it had.
I am on Windows (Windows 11, RTX 3080) and cannot run Wine, so the whole
wine-testpath — the xwin cross-build,wineboot, the DLL overrides and the 334/4/6 figures — is unchecked by me and read only. That is roughly 154 of the 193 lines, and it is the point of the pull request.The notes below came from reading the code, not from this machine. Any reviewer on any OS could have found them; what the Windows host added was evidence for one consequence, not the insight.
I should also point at my own earlier passes on this PR rather than let this one look like fresh coverage: the Windows test results here largely repeat what I posted on 2026-11-24 in this review and this one. The second of those is the stronger piece of Windows evidence and is not superseded by anything below — it captured the child process environment and confirmed that all three library arguments and all four include arguments survive an absolute SDK directory containing spaces and an apostrophe, which is the real test of
shell_quoteandCC_SHELL_ESCAPED_FLAGS. I did not re-run that today. What is new here is the three notes, plus the clean merge onto currentmain.What I actually ran today
Merged onto
main63bcca4(clean merge; the PR's baseffe310eis well behind), separate build cache.cargo xtask policy: 192 files ok.vkd3d-proton.cachefile placed by hand in a crate directory: policy refuses it,file type not on the allowlist.load_probewith noVICTORY_HLE_PROBE: 2 passed. In fairness this is near-zero information — the early return makes it a no-op without the variable by inspection.load_probewithVICTORY_HLE_PROBEpointing at a real prebuilt fixture: 2 passed. This only shows the variable is not accidentally Wine-shaped; nobody will set it on Windows.1. A wrong
VICTORY_HLE_PROBEfails illegiblybuild_probereturns the variable unexamined and the first use isstd::fs::read(&dll).unwrap(), so a path that is not there gives (line numbers from the merge above):naming neither the path nor the variable that chose it, where the cargo path it replaces fails with
assert!(status.success(), "building hle-probe failed"). Insidewine-testthe path is always freshly built, so this only reaches someone running the tests by hand with a stale or mistyped value — the audience the variable adds. An existence check or anexpectnaming the path and the variable would keep the new failure mode as legible as the old one.Single call site,
load_probe.rs:111;maps_a_title_dll_the_title_loads_itselfdoes not use the fixture and still passes with a bogus value.Confidence: I reproduced this directly. I saw it on Windows rather than under Wine, but no Wine behaviour is involved in it.
2. The cache redirect is tied to copying the DLLs, not to vkd3d-proton being in use
VKD3D_SHADER_CACHE_PATHand itscreate_dir_allsit insideif let Some(overrides), andoverridesbecomesSomeonly when--vkd3d-proton <dir>is passed.What I verified: that conditional structure, and that the asset policy does refuse such a file.
What I did not verify, and what someone on Linux should confirm before trusting my conclusion — if any of these is false, this note is wrong:
VKD3D_SHADER_CACHE_PATHunset really writes its cache into the working directory;--vkd3d-protonrun, so a later run without the flag still uses it.The run that would settle it:
wine-testwithout--vkd3d-proton, on a prefix that has had it copied in once; then check whether a cache file appears in a crate directory and whethercargo xtask policyfails afterwards.If it holds, setting
VKD3D_SHADER_CACHE_PATHunconditionally closes it at no cost — it is simply an unused variable when vkd3d is not involved.3. Two of the three fixes the table credits are closed, and one deliberately
This is about the Wine side, but it needs no Wine to check — only the state of those pull requests, which has moved since you wrote the table:
indirect::tests::argument_clamp_builds)mainand it was closed insteadmodules::net::tests::only_loopback_is_reachable)pipeline::library::tests::a_rejected_blob_gives_an_empty_library)Neither closed one has a merge commit, so "known gaps with open fixes" now holds only for #347. #217 matters most: if Wine-only fallbacks are deliberately staying in a fork, then that failure is not a gap waiting on a merge — it is permanent on upstream
main, and sowine-teston a clean checkout will always report it alongside thestub_pipeline_is_createdone you already describe as expected.That is worth a line in the README paragraph or the command's output, so the next person does not read two or three expected failures as something they broke. It may also be an argument for marking the known-expected ones rather than leaving them to be rediscovered.
I may be behind here in the other direction: a closed pull request in this repository is often re-landed under a new number, and you know this area better than I do — so please check whether #190 or #217 has a successor before taking the table as stale. What I verified: only the PR states, the absent merge commits and the quoted closing comment. What I did not: whether those four tests still fail under Wine today, which needs your host.
Read, not run, and looking fine
CARGO_ENCODED_RUSTFLAGSreplaces rather than extends configured rustflags, but.cargo/config.tomlhere sets none (only thextaskalias), so nothing is silently dropped. The mixed{}/{0}in the xwinensure!is legal and both refer to the same argument.probe_dir.join(TARGET).join("debug")is the right output path for a--targetbuild.Not reviewed at all
For whoever picks this up: whether the cross-build produces working binaries, whether the prefix and DLL overrides take effect, whether the tests genuinely run under Wine rather than silently skipping, whether 334 passed / 4 failed / 6 ignored still reproduces on current
main, and whether each of the four failures is really the cited gap rather than something the harness causes. All of that needs a Linux host with a GPU, and none of it is covered here.Not approving, for the plain reason that I have reviewed the small Windows-facing part and only read the rest.
No game data: the fixture is the repository's own
hle-probe, and the figures are test counts plus one policy violation I induced on purpose.AI-assisted (Claude Code); every figure is from the runs described on this host.
@neonbyte1 on GitHub · 2026-11-26 15:14 UTC · original
Thanks for the triage. The
VICTORY_HLE_PROBEhook is now its own PR, #3270: one commit, the loader test only.This branch has a follow-up commit,
a7f16eb, that removes the fixture cross-build and the hook's environment variable instead of rewriting history. Until #3270 lands:cargo xtask wine-testwith no arguments after--skips exactly the two loader end-to-end tests that need the hook (they can't start the hostcargofrom inside Wine), and prints the reason.--still go straight tocargo test, and no skip is added whenVICTORY_HLE_PROBEis set.Once #3270 merges, I'll remove the skip.
Checked: with the hook from #3270, both loader tests pass under Wine. Windows-target clippy (with and without
--all-features) andcargo xtask policypass on this branch.AI-assisted (Claude); measured on my machine, no game data shared.
@BaggyALPHA on GitHub · 2026-11-26 23:41 UTC · original · reviewed
Re-reading at
a7f16eb, which is newer than my earlier passes on this PR — the loader hook has been split out since then, and the code that replaced it is what this note is about.To be clear about what is mine and what is new: my passes of 2026-11-24 (one, two) and 2026-11-26 covered an earlier revision, and the second of those is still the stronger Windows evidence — it captured the child process environment and confirmed the library and include arguments survive an SDK path with spaces and an apostrophe. I have not re-run it and nothing below supersedes it. I am on Windows and still cannot run Wine, so the cross-build,
wineboot, the DLL overrides and the 334/4/6 figures remain unchecked by me. One finding below is new, and it is in code that did not exist at my last pass.The default path exits before running anything
With the loader hook moved to
pr/hle-probe,wine-testnow skips the two tests instead. WhenVICTORY_HLE_PROBEis unset the command assembles to:There is no
--, so--skipis read as a cargo option, and cargo has none:cargo test ... -- --skip some_test_nameis accepted. Checked on cargo 1.98.1, the pinned toolchain; it is cargo argument parsing, so no Wine or Linux behaviour is involved and the result should hold on a Linux host.That makes a bare
cargo xtask wine-testfail on any host whereVICTORY_HLE_PROBEis not set, which is every host that does not also havepr/hle-probe— the default experience for anyone trying this for the first time.--no-fail-fastis a cargo option and stays put; only the skips move behind a separator:I would treat this as blocking, since it is the path the README tells people to use.
A guess at why it has not bitten: with
pr/hle-probechecked out and the variable set, the branch never runs, so the skip path is the one part of the change that no run exercises. A run with the variable deliberately unset would catch it.Confidence: high on the cargo behaviour (reproduced directly, above). I have not run
wine-testitself at all.The description still describes the pre-split shape
Minor, but it will mislead whoever merges. The body says:
At this head the diff touches three files —
README.md,xtask/src/main.rs,xtask/src/wine.rs— and novictory-loaderfile;load_probe.rsonmainhasbuild_probebut noVICTORY_HLE_PROBE. The xtask does not build the fixture, and without the variable the two tests are skipped rather than behaving as before. The code comment and the README are both already accurate ("are skipped with a message"); only the body was left behind when the hook was split out. Worth a one-line edit, or landingpr/hle-probefirst and making this depend on it — the latter would also let the skip disappear.The
334 passed, 4 failed, 6 ignoredtable presumably predates the split too, so it is worth saying which revision it came from.Two small things, neither blocking
wine_pathbuildsZ:\...by prefixing, which assumes an absolute path; a relativetarget_dirwould giveZ:plus a relative tail. Everything reaching it today comes from an absolutetarget_dir, so this is latent rather than live.Happy to re-read once the separator is in. The feature is clearly worth having, and it still needs what my earlier note asked for: a Linux host with a GPU to confirm the cross-build produces working binaries, that the tests genuinely run rather than silently skipping, and that each of the four failures is the cited gap rather than something the harness causes.
AI use: Claude Code (Claude Opus 5). Static review on Windows; the cargo argument behaviour above was reproduced locally with the pinned toolchain, the Wine path was not run.
@neonbyte1 on GitHub · 2026-11-26 23:49 UTC · original
@BaggyALPHA thanks, the separator bug was real and blocking. Fixed in
48cd0336:--skipafter--: the two skips now go after a--separator, so they reach the test binaries;--no-fail-faststays a cargo option. I ran the default path withVICTORY_HLE_PROBEunset under Wine on Linux: cargo accepted the command and the tests ran, wherecargo test ... --skip xwithout the separator fails withunexpected argument '--skip' foundon the same toolchain. The workspace failures in that run are the known ones from the table, not the harness.tests/load_probe.rs, and the 334/4/6 figure was measured before the split.wine_path: now makes a relative path absolute before prefixingZ:.victory-loader'stests/load_probe.rs), so a rename has a pointer.Clippy (
-p xtask --all-targets -D warnings), rustfmt andcargo xtask policyare clean.AI-assisted (Claude); measured on my machine, no game data shared.
@BaggyALPHA on GitHub · 2026-11-26 23:59 UTC · original · approved these changes
Re-read at
48cd0336. The separator fix is right, and I checked it end to end rather than by eye.The fix
--no-fail-faststays a cargo option and the two skips moved behind--, so the commandwine-testassembles withVICTORY_HLE_PROBEunset is now:I ran that exact invocation with
--no-runadded, on this branch, pinned toolchain (cargo 1.98.1), Windows host: cargo accepts it and builds the Windows-target test binaries. Two--skipoptions after one separator are fine. So the default path no longer exits early, which was the whole of the blocking finding.Your other claims, checked here independently
clippy -p xtask --all-targets -D warningscargo test -p xtaskxtaskcargo xtask policy#3270is the hook PRVICTORY_HLE_PROBEnames a prebuilt hle-probe fixture"tests/load_probe.rs, cites #3270, and says the 334/4/6 run predates the splitwine_pathabsolutestd::path::absolutebefore theZ:prefix; compiles on the pinned toolchainvictory-loader'stests/load_probe.rsFlagging the 334/4/6 figure as pre-split is the part I would have asked for anyway, so that reads well now.
One leftover, trivial
The body cites #3270, but the code and README still point at the branch:
wine.rs:163andwine.rs:169(the latter is the message a user actually sees when the skips kick in) andREADME.md:96all saypr/hle-probe. A branch name is not something a reader can look up;#3270is. Worth swapping if you touch this again — not worth a push on its own.What I did not verify
The substance of the PR. I am on Windows and cannot run Wine, so the xwin cross-build,
wineboot, the DLL overrides,--dxvk, the vkd3d-proton cache redirect in practice, and whether the tests genuinely run under Wine rather than silently skipping are all still unchecked by me. You ran the default path on Linux and reported cargo accepting it with the tests running; I am taking that at your word, and it matches what I see of the command's shape here.What I have is: the blocking bug I raised is fixed and verified on the toolchain, the surrounding claims hold up, and nothing else in the diff changed (still three files, +255/-0, which I have now read in full).
Approving on that basis. The earlier note still stands for whoever has a Linux host — confirming each of the four known failures is really the cited gap rather than something the harness causes is worth doing before anyone treats 334/4/6 as a baseline.
AI use: Claude Code (Claude Opus 5). Verification on Windows with the pinned toolchain; no Wine, no game data.
@neonbyte1 on GitHub · 2026-11-27 00:12 UTC · original
@BaggyALPHA thanks for the approval and the end-to-end check. Took the leftover too:
e247c197now names #3270 instead of the branch in bothwine.rscomments/message and the README. Clippy, rustfmt and policy are clean; no other change.AI-assisted (Claude); no game data shared.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.