e2e: under Wine, stage the test title under the target directory's drive path #2404

Open
vakaobr wants to merge 1 commit from upstream-pr/2414 into main
vakaobr commented 2026-11-25 18:09:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-25T18:09:47Z.


When the tests are built for Windows on macOS or Linux and run under Wine, CARGO_TARGET_TMPDIR is the host's path (/Users/...). In the Windows test process a path starting with / is a folder of the current drive: from a shell in the home folder (Y: in CrossOver), /Users/me/... is Y:\Users\me\..., the home folder's own Users. So the e2e test's game and data folders landed outside the target directory and were never removed, and the drives XCL mounts from the data path did not resolve. test_title_runs_and_game_folder_is_untouched then failed the test title's storage: save folder + persistent local storage (pls dir S:\) and XPersistentLocalStorage: a drive root checks. This asks Wine for the drive path of a /-path (wine_get_dos_file_name). On Windows kernel32 has no such export and the path is used as before. Test-only: it changes nothing in crates/xcl/src. Part of #258.

What is in it

  • crates/xcl/tests/e2e.rs: target_tmpdir() and wine_dos_path(), used by temp_dir().

Tested

  • MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3.0, D3DMetal 3.0, Rust 1.100.0 x86_64-pc-windows-gnu, debug, on main 68a284a with and without this commit.
  • cargo build --workspace, then e2e --exact test_title_runs_and_game_folder_is_untouched --test-threads=1 in the CrossOver bottle:
    • without it: storage: save folder + persistent local storage and XPersistentLocalStorage: a drive root fail, and the run's folder is left in ~/Users/<me>/code/<target>/…/tmp/;
    • with it: both checks pass, and the run's folder is in the target directory and removed after the run.
    • The test still fails on main under CrossOver either way: the title crashes at its first D3D12.X pipeline check (#750 fixes that), which runs after the storage checks.

Regression run

  • None: test-only, nothing in crates/xcl/src changes.

Not tested

  • Windows (the new code returns early there: kernel32 has no wine_get_dos_file_name), Wine on Linux.
  • The other e2e tests (launcher_uses_configured_exe_in_an_ambiguous_folder, the debug-layer ones), which use the same temp_dir().

AI use

  • Claude Code with Claude Opus 5.5 found the cause, wrote the change, ran the tests above and wrote this description.
<!-- greyfinch-sync:ivall/xcl:issue:5496634562 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2414). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-25T18:09:47Z. --- When the tests are built for Windows on macOS or Linux and run under Wine, `CARGO_TARGET_TMPDIR` is the host's path (`/Users/...`). In the Windows test process a path starting with `/` is a folder of the current drive: from a shell in the home folder (`Y:` in CrossOver), `/Users/me/...` is `Y:\Users\me\...`, the home folder's own `Users`. So the e2e test's game and data folders landed outside the target directory and were never removed, and the drives XCL mounts from the data path did not resolve. `test_title_runs_and_game_folder_is_untouched` then failed the test title's `storage: save folder + persistent local storage` (`pls dir S:\`) and `XPersistentLocalStorage: a drive root` checks. This asks Wine for the drive path of a `/`-path (`wine_get_dos_file_name`). On Windows kernel32 has no such export and the path is used as before. Test-only: it changes nothing in `crates/xcl/src`. Part of #258. **What is in it** - `crates/xcl/tests/e2e.rs`: `target_tmpdir()` and `wine_dos_path()`, used by `temp_dir()`. **Tested** - MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3.0, D3DMetal 3.0, Rust 1.100.0 `x86_64-pc-windows-gnu`, debug, on `main` `68a284a` with and without this commit. - `cargo build --workspace`, then `e2e --exact test_title_runs_and_game_folder_is_untouched --test-threads=1` in the CrossOver bottle: - without it: `storage: save folder + persistent local storage` and `XPersistentLocalStorage: a drive root` fail, and the run's folder is left in `~/Users/<me>/code/<target>/…/tmp/`; - with it: both checks pass, and the run's folder is in the target directory and removed after the run. - The test still fails on `main` under CrossOver either way: the title crashes at its first D3D12.X pipeline check (#750 fixes that), which runs after the storage checks. **Regression run** - None: test-only, nothing in `crates/xcl/src` changes. **Not tested** - Windows (the new code returns early there: kernel32 has no `wine_get_dos_file_name`), Wine on Linux. - The other e2e tests (`launcher_uses_configured_exe_in_an_ambiguous_folder`, the debug-layer ones), which use the same `temp_dir()`. **AI use** - Claude Code with Claude Opus 5.5 found the cause, wrote the change, ran the tests above and wrote this description.
DavidM1911 commented 2026-11-25 20:08:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T19:36:27Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: 1 real failure, deterministic (also fails --test-threads=1, 1219/1):
gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier
  assertion failed: group barriers in the program (lower_dxil.rs:1155)

The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7172529202 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2414#issuecomment-7172529202). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T19:36:27Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **1 real failure**, deterministic (also fails `--test-threads=1`, 1219/1): ``` gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier assertion failed: group barriers in the program (lower_dxil.rs:1155) ``` The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin
pablogonz12 commented 2026-11-25 20:08:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pablogonz12 on 2026-11-25T19:47:18Z.


Test report from Linux + Wine (RADV), which the "Not tested" section asks for. Prepared with AI assistance: DeepSeek V4.1 Flash in OpenCode; the commands below were run by it and the output is pasted verbatim.

Setup

  • CachyOS (Arch), kernel 7.3.6-1-cachyos-eevdf, Mesa 26.3.1-5 (RADV GFX1201), AMD Radeon RX 9070 XT 16 GB, Ryzen 9 9900X.
  • GE-Proton11-14 wine, scratch prefix, WINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b", VKD3D_CONFIG=ignore_shared_fence, WINEDEBUG=-all, DXC 1.9.2609.5.
  • Build: RUSTFLAGS="-C target-feature=+crt-static" cargo xwin test --workspace --release --target x86_64-pc-windows-msvc --no-run, then wine <e2e exe> --test-threads=1.
  • Base = main 2898511 with this PR merged on top (clean merge, only this PR differs), head = 6779e20.

What the change does here

cargo build output, base run:

data:  /home/pgm1207/Desktop/GTA VI/xcl-up-base/target-static/.../tmp\e2e-276-.../data/XCL.TestTitle

same line on this PR:

data:  Z:\home\pgm1207\Desktop\GTA VI\xcl-up-2414\target-static\x86_64-pc-windows-msvc\tmp\e2e-756-...\data\XCL.TestTitle

So the Wine drive path is resolved as described, and the run's folder now sits under the target directory.

Result, e2e integration test

base 2898511 this PR 6779e20
e2e FAILED: 3 passed, 1 failed, 0 ignored (2.37 s) FAILED: 3 passed, 1 failed, 0 ignored (2.10 s)

test_title_runs_and_game_folder_is_untouched is still red in both, at the same assertion (fails.is_empty()), and the test title prints the same 48 [PASS] lines and the same two [FAIL] lines on base and on this PR:

[FAIL] user32: a top-level window made either way (CreateWindowExW / A) is the hidden 1920x1080 console screen: W: not cloaked
[FAIL] XAudio2: console flags/device, XMA2 & Opus voices decoded, PCM passes, callbacks: XMA2 GetState: ctx=0x0, queued=1

Neither is caused by this PR: the XMA2 one is what #2410 changes, and the window-cloak one is a host gap (Wine's DWM does not cloak) that this PR does not touch. The storage / persistent-local-storage checks the description mentions now pass under Wine, which is the point of the change.

The two debug-layer e2e tests are SKIPPED ...: no d3d12SDKLayers.dll here (GPU line: GPU: AMD Radeon RX 9070 XT (RADV GFX1201) (16304 MiB VRAM)).

Not tested

  • No game run; the e2e test title only.
  • Windows and CrossOver (only Wine 11.0 from GE-Proton11-14 on Linux).

AI use

  • DeepSeek V4.1 Flash (OpenCode) built both commits, ran the test above and wrote this report; no code was written or changed by it.
<!-- greyfinch-sync:ivall/xcl:comment:7172766173 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2414#issuecomment-7172766173). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-25T19:47:18Z. --- Test report from Linux + Wine (RADV), which the "Not tested" section asks for. Prepared with AI assistance: DeepSeek V4.1 Flash in OpenCode; the commands below were run by it and the output is pasted verbatim. **Setup** - CachyOS (Arch), kernel 7.3.6-1-cachyos-eevdf, Mesa 26.3.1-5 (`RADV GFX1201`), AMD Radeon RX 9070 XT 16 GB, Ryzen 9 9900X. - GE-Proton11-14 wine, scratch prefix, `WINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b"`, `VKD3D_CONFIG=ignore_shared_fence`, `WINEDEBUG=-all`, DXC 1.9.2609.5. - Build: `RUSTFLAGS="-C target-feature=+crt-static" cargo xwin test --workspace --release --target x86_64-pc-windows-msvc --no-run`, then `wine <e2e exe> --test-threads=1`. - Base = `main` 2898511 with this PR merged on top (clean merge, only this PR differs), head = 6779e20. **What the change does here** `cargo build` output, base run: ``` data: /home/pgm1207/Desktop/GTA VI/xcl-up-base/target-static/.../tmp\e2e-276-.../data/XCL.TestTitle ``` same line on this PR: ``` data: Z:\home\pgm1207\Desktop\GTA VI\xcl-up-2414\target-static\x86_64-pc-windows-msvc\tmp\e2e-756-...\data\XCL.TestTitle ``` So the Wine drive path is resolved as described, and the run's folder now sits under the target directory. **Result, `e2e` integration test** | | base 2898511 | this PR 6779e20 | |---|---|---| | `e2e` | FAILED: 3 passed, 1 failed, 0 ignored (2.37 s) | FAILED: 3 passed, 1 failed, 0 ignored (2.10 s) | `test_title_runs_and_game_folder_is_untouched` is still red in both, at the same assertion (`fails.is_empty()`), and the test title prints the same 48 `[PASS]` lines and the same two `[FAIL]` lines on base and on this PR: ``` [FAIL] user32: a top-level window made either way (CreateWindowExW / A) is the hidden 1920x1080 console screen: W: not cloaked [FAIL] XAudio2: console flags/device, XMA2 & Opus voices decoded, PCM passes, callbacks: XMA2 GetState: ctx=0x0, queued=1 ``` Neither is caused by this PR: the XMA2 one is what #2410 changes, and the window-cloak one is a host gap (Wine's DWM does not cloak) that this PR does not touch. The storage / persistent-local-storage checks the description mentions now pass under Wine, which is the point of the change. The two debug-layer e2e tests are `SKIPPED ...: no d3d12SDKLayers.dll` here (GPU line: `GPU: AMD Radeon RX 9070 XT (RADV GFX1201) (16304 MiB VRAM)`). **Not tested** - No game run; the e2e test title only. - Windows and CrossOver (only Wine 11.0 from GE-Proton11-14 on Linux). **AI use** - DeepSeek V4.1 Flash (OpenCode) built both commits, ran the test above and wrote this report; no code was written or changed by it.
github-actions[bot] commented 2026-11-30 08:39:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:39:34Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273182283 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2414#issuecomment-7273182283). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:39:34Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
vakaobr commented 2026-11-30 13:21:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-30T13:21:57Z.


Still waiting for a maintainer. Under Wine the e2e test still needs its test title staged under the target directory's drive; it merges cleanly with main.

<!-- greyfinch-sync:ivall/xcl:comment:7279739942 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2414#issuecomment-7279739942). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-30T13:21:57Z. --- Still waiting for a maintainer. Under Wine the e2e test still needs its test title staged under the target directory's drive; it merges cleanly with `main`.
Foniass commented 2026-12-01 07:59:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:59:33Z.


Triage (#1607) – head 6779e20

No open or merged PR makes the same change: main's e2e.rs:temp_dir still uses env!("CARGO_TARGET_TMPDIR") as is, and no other PR uses wine_get_dos_file_name. wine_dos_path resolves the export through GetProcAddress, so it does nothing on Windows, and it frees the returned string with HeapFree(GetProcessHeap()) as Wine expects. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304735459 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2414#issuecomment-7304735459). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:59:33Z. --- **Triage (#1607)** – head 6779e20 No open or merged PR makes the same change: main's `e2e.rs:temp_dir` still uses `env!("CARGO_TARGET_TMPDIR")` as is, and no other PR uses `wine_get_dos_file_name`. `wine_dos_path` resolves the export through `GetProcAddress`, so it does nothing on Windows, and it frees the returned string with `HeapFree(GetProcessHeap())` as Wine expects. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2414:upstream-pr/2414'
git switch 'upstream-pr/2414'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2414'
git switch 'upstream-pr/2414'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2414'
git switch 'upstream-pr/2414'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2414'
git switch 'main'
git merge --squash 'upstream-pr/2414'
git switch 'main'
git merge --ff-only 'upstream-pr/2414'
git switch 'main'
git merge 'upstream-pr/2414'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2404
No description provided.