Skip to content

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

Draft
vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/e2e-wine-dos-paths
Draft

vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/e2e-wine-dos-paths

Conversation

@vakaobr

@vakaobr vakaobr commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

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 (D3D12.X: a stage the PC cannot run goes to the fallback without the driver #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.

…ive path

CARGO_TARGET_TMPDIR is the host's path when the tests are built for
Windows on macOS or Linux (`/Users/...`). The test process runs under
Wine, where 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 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: the test
title's `storage: save folder + persistent local storage` (pls dir S:\)
and `XPersistentLocalStorage: a drive root` checks failed.

target_tmpdir() asks Wine for the drive path of a `/`-path
(kernel32's wine_get_dos_file_name). On Windows kernel32 has no such
export and the path is used as it is.

Measured under CrossOver 26.3 on macOS, test_title_runs_and_game_folder_is_untouched
on main 68a284a: both checks fail without this and pass with it, and the
run's folder is in the target directory and removed afterwards (without
it, it was left in ~/Users/<me>/...).
@DavidM1911

Copy link
Copy Markdown
Contributor

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

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 25, 2026
…#2414, xcl-dev#2415

Integrates per-draw mirror sync fast path (xcl-dev#2437), PresentX compositor
hardening (xcl-dev#2418), XAudio2 GetState buffer context fix (xcl-dev#2410), and Wine
test fixes (xcl-dev#2414, xcl-dev#2415).

Assisted-by: Antigravity (Gemini 4 Neon)
@pablogonz12

Copy link
Copy Markdown
Contributor

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.

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 25, 2026
…#2414, xcl-dev#2415

Integrates per-draw mirror sync fast path (xcl-dev#2437), PresentX compositor
hardening (xcl-dev#2418), XAudio2 GetState buffer context fix (xcl-dev#2410), and Wine
test fixes (xcl-dev#2414, xcl-dev#2415).

Assisted-by: Antigravity (Gemini 4 Neon)
vakaobr added a commit to vakaobr/xcl that referenced this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants