Tests: accept Wine's ERROR_FILE_NOT_FOUND in pls_quota #937

Closed
github-bot wants to merge 1 commit from gh-pr/937/head into gh-pr/937/base
Owner

@⁠bigiello on GitHub · 2026-11-24 08:45 UTC · original
fix/pls-quota-wine-error → main · +40 −3 · 1 files · 1 commits · closed without merging

disk_free_space_ex_reports_pls_quota (crates/xcl/tests/pls_quota.rs) failed under Wine when calling GetDiskFreeSpaceExW on S:\missing, because disk_free_ex forwards the translated host path data\pls\missing directly to the host GetDiskFreeSpaceExW, where Windows returns ERROR_PATH_NOT_FOUND (3) and Wine returns ERROR_FILE_NOT_FOUND (2). That early failure also prevented the quota-full checks below it from running under Wine.

Following the test-only xcl::util::under_wine() pattern used in kernelx, vfs, and vfs_hooks (commit 8fde77a), this keeps the strict ERROR_PATH_NOT_FOUND check on native Windows while allowing ERROR_FILE_NOT_FOUND under Wine and verifying that S:\missing forwards the host's exact error code without modifying the output parameters.

Fixes #810

What is in it

  • crates/xcl/tests/pls_quota.rs:
    • Probe GetDiskFreeSpaceExW on the unhooked host path data\pls\missing first, validate the host error code via is_expected_missing_error(err, xcl::util::under_wine()) (strictly ERROR_PATH_NOT_FOUND on Windows; ERROR_PATH_NOT_FOUND or ERROR_FILE_NOT_FOUND under Wine), and assert S:\missing returns (0, host_missing_error) with untouched output parameters.
    • Add missing_pls_path_error_policy_matches_platform unit test covering both the Windows and Wine branches and rejecting unrelated errors (0, ERROR_ACCESS_DENIED).

Tested
Hardware: Windows 11 x64, AMD Ryzen 5 5600, 32 GB RAM, NVIDIA GeForce RTX 4070 SUPER (12 GB VRAM, D3D12 SM 6.6), rustc 1.100.0 (stable-x86_64-pc-windows-msvc), Windows SDK DXC 1.8.2502.11. No XCL_SAMPLE_* variables set.

  • cargo test -p xcl --test pls_quota -- --nocapture: 2 passed, 0 failed, 0 ignored, 0 skipped (both data\pls\missing and S:\missing logged error 3).
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): xcl --lib hit the pre-existing #718 flake under 4 threads (placed_title_textures_share_vram_and_preserve_pixels + 2 PoisonErrors; 672 passed, 3 failed, 21 ignored, 2 GPU skipped: no wave64), stopping before integration tests.
  • cargo test -p xcl --lib -- --test-threads=1: 675 passed, 0 failed, 21 ignored, 2 GPU skipped (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware: no wave64).
  • cargo test --workspace --test "*" -- --test-threads=4: 42 passed, 0 failed, 20 ignored, 0 skipped across all 13 integration test binaries (including pls_quota: 2 passed, 0 failed).
  • cargo test --workspace --bins and cargo test --workspace --doc: 0 passed, 0 failed, 0 ignored.
  • cargo clippy --workspace --all-targets: 0 errors, 0 warnings in crates/xcl/tests/pls_quota.rs (pre-existing workspace warnings untouched).
  • rustfmt --edition 2021 --check crates/xcl/tests/pls_quota.rs: exit 0 (no formatting diffs).

Not tested

  • Linux / Wine execution (not available on this Windows 11 machine; the Wine policy branch is verified by missing_pls_path_error_policy_matches_platform).
  • AMD GPUs (wave64 tests skipped on NVIDIA RTX 4070 SUPER).
  • Retail titles and XCL_SAMPLE_* tests (no game files present; test-only change, no crates/xcl/src/ runtime changes).

AI use
Antigravity, Neon investigated #810 and existing under_wine() tests, updated crates/xcl/tests/pls_quota.rs, ran the test/clippy/rustfmt commands above, and drafted this PR description.

**@⁠bigiello** on GitHub · 2026-11-24 08:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/937) `fix/pls-quota-wine-error` → `main` · +40 −3 · 1 files · 1 commits · closed without merging `disk_free_space_ex_reports_pls_quota` (`crates/xcl/tests/pls_quota.rs`) failed under Wine when calling `GetDiskFreeSpaceExW` on `S:\missing`, because `disk_free_ex` forwards the translated host path `data\pls\missing` directly to the host `GetDiskFreeSpaceExW`, where Windows returns `ERROR_PATH_NOT_FOUND` (3) and Wine returns `ERROR_FILE_NOT_FOUND` (2). That early failure also prevented the quota-full checks below it from running under Wine. Following the test-only `xcl::util::under_wine()` pattern used in `kernelx`, `vfs`, and `vfs_hooks` (commit `8fde77a`), this keeps the strict `ERROR_PATH_NOT_FOUND` check on native Windows while allowing `ERROR_FILE_NOT_FOUND` under Wine and verifying that `S:\missing` forwards the host's exact error code without modifying the output parameters. Fixes #810 **What is in it** - `crates/xcl/tests/pls_quota.rs`: - Probe `GetDiskFreeSpaceExW` on the unhooked host path `data\pls\missing` first, validate the host error code via `is_expected_missing_error(err, xcl::util::under_wine())` (strictly `ERROR_PATH_NOT_FOUND` on Windows; `ERROR_PATH_NOT_FOUND` or `ERROR_FILE_NOT_FOUND` under Wine), and assert `S:\missing` returns `(0, host_missing_error)` with untouched output parameters. - Add `missing_pls_path_error_policy_matches_platform` unit test covering both the Windows and Wine branches and rejecting unrelated errors (`0`, `ERROR_ACCESS_DENIED`). **Tested** Hardware: Windows 11 x64, AMD Ryzen 5 5600, 32 GB RAM, NVIDIA GeForce RTX 4070 SUPER (12 GB VRAM, D3D12 SM 6.6), `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), Windows SDK DXC `1.8.2502.11`. No `XCL_SAMPLE_*` variables set. - `cargo test -p xcl --test pls_quota -- --nocapture`: 2 passed, 0 failed, 0 ignored, 0 skipped (both `data\pls\missing` and `S:\missing` logged error `3`). - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): `xcl --lib` hit the pre-existing `#718` flake under 4 threads (`placed_title_textures_share_vram_and_preserve_pixels` + 2 `PoisonError`s; 672 passed, 3 failed, 21 ignored, 2 GPU skipped: `no wave64`), stopping before integration tests. - `cargo test -p xcl --lib -- --test-threads=1`: 675 passed, 0 failed, 21 ignored, 2 GPU skipped (`gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`: `no wave64`). - `cargo test --workspace --test "*" -- --test-threads=4`: 42 passed, 0 failed, 20 ignored, 0 skipped across all 13 integration test binaries (including `pls_quota`: 2 passed, 0 failed). - `cargo test --workspace --bins` and `cargo test --workspace --doc`: 0 passed, 0 failed, 0 ignored. - `cargo clippy --workspace --all-targets`: 0 errors, 0 warnings in `crates/xcl/tests/pls_quota.rs` (pre-existing workspace warnings untouched). - `rustfmt --edition 2021 --check crates/xcl/tests/pls_quota.rs`: exit 0 (no formatting diffs). **Not tested** - Linux / Wine execution (not available on this Windows 11 machine; the Wine policy branch is verified by `missing_pls_path_error_policy_matches_platform`). - AMD GPUs (wave64 tests skipped on NVIDIA RTX 4070 SUPER). - Retail titles and `XCL_SAMPLE_*` tests (no game files present; test-only change, no `crates/xcl/src/` runtime changes). **AI use** Antigravity, Neon investigated #810 and existing `under_wine()` tests, updated `crates/xcl/tests/pls_quota.rs`, ran the test/clippy/rustfmt commands above, and drafted this PR description.
disk_free_space_ex_reports_pls_quota checks GetDiskFreeSpaceExW on
S:\missing, which disk_free_ex forwards to the host's GetDiskFreeSpaceExW
on data\pls\missing. Windows returns ERROR_PATH_NOT_FOUND (3), while Wine
returns ERROR_FILE_NOT_FOUND (2), causing the test to fail before reaching
the quota-full checks under Wine.

Query the unhooked host path first, keep the strict ERROR_PATH_NOT_FOUND
requirement on native Windows, allow ERROR_FILE_NOT_FOUND as well when
xcl::util::under_wine() is true, and assert that S:\missing forwards the
host's exact error code without clobbering output parameters. Also add a
unit test covering the Windows and Wine error-policy branches.

Fixes #810

Assisted-by: Antigravity (Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:37:33 +00:00
github-bot closed this pull request 2026-11-26 04:37:33 +00:00
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 08:56 UTC · original

Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean main@beaa245 (713 passed, 0 failed, 41 ignored on this box):

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
714 passed; 0 failed; 41 ignored   (exit 0)

One more passing test than main; the PLS quota expectation update is green here.

Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

**@⁠dcastell1** on GitHub · 2026-11-24 08:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/937#issuecomment-7126762306) Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean `main@beaa245` (713 passed, 0 failed, 41 ignored on this box): ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 714 passed; 0 failed; 41 ignored (exit 0) ``` One more passing test than main; the PLS quota expectation update is green here. Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Author
Owner

@⁠ettehn on GitHub · 2026-11-24 08:59 UTC · original

One adjustment would make the #810 comparison independent: capture the host missing-path result and last error before xcl::vfs_hooks::install(). At ff999c1 the native-path lookup happens after installation; on my Windows run XCL logged both that lookup and the S:\missing lookup. On a platform that accepts either 2 or 3, a hook returning the same allowed error for both could pass the comparison even if the host returned the other one.

I moved only the host measurement before installation locally. Both pls_quota tests passed on Windows; the native baseline and the hooked console path both returned 3. This tests error forwarding independently while retaining the platform-specific assertion. I haven't run it on Wine.

OpenAI Codex (GPT-6.2 Astra) assisted with verification.

**@⁠ettehn** on GitHub · 2026-11-24 08:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/937#issuecomment-7126816989) One adjustment would make the #810 comparison independent: capture the host missing-path result and last error before `xcl::vfs_hooks::install()`. At `ff999c1` the native-path lookup happens after installation; on my Windows run XCL logged both that lookup and the `S:\missing` lookup. On a platform that accepts either 2 or 3, a hook returning the same allowed error for both could pass the comparison even if the host returned the other one. I moved only the host measurement before installation locally. Both `pls_quota` tests passed on Windows; the native baseline and the hooked console path both returned 3. This tests error forwarding independently while retaining the platform-specific assertion. I haven't run it on Wine. OpenAI Codex (GPT-6.2 Astra) assisted with verification.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 10:37 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head ff999c1 onto main 9aec53d, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 715 passed, 10 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). pls_quota Wine ERROR_FILE_NOT_FOUND acceptance green first try.

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 10:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/937#issuecomment-7129034432) Linux / AMD RDNA3 datapoint. **Merged state:** head `ff999c1` onto main `9aec53d`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **715 passed, 10 failed, 41 ignored**; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). pls_quota Wine ERROR_FILE_NOT_FOUND acceptance green first try. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 12:40 UTC · original

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug (native Windows — the Wine ERROR_FILE_NOT_FOUND path itself can't be exercised here).

  • cargo test -p xcl --test pls_quota: 2 passed, 0 failed — missing_pls_path_error_policy_matches_platform and disk_free_space_ex_reports_pls_quota both green on Windows.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

**@⁠DavidM1911** on GitHub · 2026-11-24 12:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/937#issuecomment-7131770617) Independent verification, merged onto current `main` `384f7f7` locally (clean merge). **Machine:** Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug (native Windows — the Wine `ERROR_FILE_NOT_FOUND` path itself can't be exercised here). - `cargo test -p xcl --test pls_quota`: **2 passed, 0 failed** — `missing_pls_path_error_policy_matches_platform` and `disk_free_space_ex_reports_pls_quota` both green on Windows. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 13:51 UTC · original

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

  • --test pls_quota: 2 passed, 0 failed.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 13:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/937#issuecomment-7133437455) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - --test pls_quota: 2 passed, 0 failed. Thanks!
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:11 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 03:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/937#issuecomment-7181475566) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.