Tests: accept Wine's ERROR_FILE_NOT_FOUND in pls_quota #931

Closed
bigiello wants to merge 1 commit from upstream-pr/937 into main
bigiello commented 2026-11-24 08:45:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bigiello on 2026-11-24T08:45:33Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6577981205 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/937). Originally posted by [bigiello](https://github.com/bigiello) on 2026-11-24T08:45:33Z. --- `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.
dcastell1 commented 2026-11-24 09:07:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T08:56:52Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7126762306 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/937#issuecomment-7126762306). Originally posted by [dcastell1](https://github.com/dcastell1) on 2026-11-24T08:56:52Z. --- 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.
ettehn commented 2026-11-24 09:07:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-24T08:59:31Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7126816989 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/937#issuecomment-7126816989). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-24T08:59:31Z. --- 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.
SlopTart commented 2026-11-24 11:05:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T10:37:46Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7129034432 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/937#issuecomment-7129034432). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T10:37:46Z. --- 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.
DavidM1911 commented 2026-11-24 13:03:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:40:44Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7131770617 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/937#issuecomment-7131770617). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T12:40:44Z. --- 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 commented 2026-11-24 14:06:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:51:21Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7133437455 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/937#issuecomment-7133437455). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:51:21Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - --test pls_quota: 2 passed, 0 failed. Thanks!
upstream-sync closed this pull request 2026-11-24 19:04:57 +00:00
DavidM1911 commented 2026-11-26 04:07:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:11:22Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7181475566 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/937#issuecomment-7181475566). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:11:22Z. --- 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

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!931
No description provided.