Tests: accept Wine's missing-path error in pls_quota #2415

Open
github-bot wants to merge 1 commit from github-bot/gh-2415 into main AGit
Owner

@⁠ldeep98154deep-jpg on GitHub · 2026-11-25 18:10 UTC · original
ldeep98154deep-jpg:tests/pls-quota-wine-error → main · +24 −2 · 1 files · 1 commits · open

Fixes #810

disk_free_space_ex_reports_pls_quota asserted ERROR_PATH_NOT_FOUND
unconditionally. On Wine, the forwarded host GetDiskFreeSpaceExW returns
ERROR_FILE_NOT_FOUND, so the test failed before it reached the quota checks.
PR #2197 adds other pls_quota coverage but leaves this assertion unchanged.

What is in it

  • Accept Wine's ERROR_FILE_NOT_FOUND for S:\missing only when under_wine(); Windows still requires ERROR_PATH_NOT_FOUND.
  • Read GetLastError() before calling under_wine(), so its GetProcAddress cannot overwrite the error.
  • Unit test covering both host branches and rejecting an unrelated error code.
  • Test-only diff: no runtime change, so no smoke regression run is needed.

Tested
Local Windows x64, Intel Iris Xe Graphics (16-lane waves),
stable-x86_64-pc-windows-gnu with llvm-mingw; DXC 1.9.2607.0 / DXIL 1.8.2502.11.

  • cargo +stable-x86_64-pc-windows-gnu test -p xcl --test pls_quota -- --nocapture
    — 2 passed, 0 failed.
  • cargo +stable-x86_64-pc-windows-gnu test --workspace -- --test-threads=4 --skip pe::tests::parses_own_test_binary_tls --skip test_title_runs_and_game_folder_is_untouched
    — 703 passed, 0 failed, 41 ignored, 2 filtered out; 87 SKIPPED ...: no wave64.

Not tested

  • Wine was unavailable, so the original Wine failure was not reproduced; its branch is covered by the new unit test only.
  • Wave64 GPU tests were skipped on this adapter. No retail title was run (not needed for a test-only diff).
  • The two skipped tests above are pre-existing toolchain/environment failures.

AI use
Claude: screened open issues and PRs, confirmed #810 had no fix in #2197/#1817/#1411/#1462, wrote the test-only change, and ran the commands above.

**@⁠ldeep98154deep-jpg** on GitHub · 2026-11-25 18:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2415) `ldeep98154deep-jpg:tests/pls-quota-wine-error` → `main` · +24 −2 · 1 files · 1 commits · open Fixes #810 `disk_free_space_ex_reports_pls_quota` asserted `ERROR_PATH_NOT_FOUND` unconditionally. On Wine, the forwarded host `GetDiskFreeSpaceExW` returns `ERROR_FILE_NOT_FOUND`, so the test failed before it reached the quota checks. PR #2197 adds other `pls_quota` coverage but leaves this assertion unchanged. **What is in it** - Accept Wine's `ERROR_FILE_NOT_FOUND` for `S:\missing` only when `under_wine()`; Windows still requires `ERROR_PATH_NOT_FOUND`. - Read `GetLastError()` before calling `under_wine()`, so its `GetProcAddress` cannot overwrite the error. - Unit test covering both host branches and rejecting an unrelated error code. - Test-only diff: no runtime change, so no smoke regression run is needed. **Tested** Local Windows x64, Intel Iris Xe Graphics (16-lane waves), `stable-x86_64-pc-windows-gnu` with llvm-mingw; DXC 1.9.2607.0 / DXIL 1.8.2502.11. - `cargo +stable-x86_64-pc-windows-gnu test -p xcl --test pls_quota -- --nocapture` — 2 passed, 0 failed. - `cargo +stable-x86_64-pc-windows-gnu test --workspace -- --test-threads=4 --skip pe::tests::parses_own_test_binary_tls --skip test_title_runs_and_game_folder_is_untouched` — 703 passed, 0 failed, 41 ignored, 2 filtered out; 87 `SKIPPED ...: no wave64`. **Not tested** - Wine was unavailable, so the original Wine failure was not reproduced; its branch is covered by the new unit test only. - Wave64 GPU tests were skipped on this adapter. No retail title was run (not needed for a test-only diff). - The two skipped tests above are pre-existing toolchain/environment failures. **AI use** Claude: screened open issues and PRs, confirmed #810 had no fix in #2197/#1817/#1411/#1462, wrote the test-only change, and ran the commands above.
Wine's GetDiskFreeSpaceExW answers ERROR_FILE_NOT_FOUND for a missing path
below a mounted PLS drive, where Windows answers ERROR_PATH_NOT_FOUND. The
test asserted 3 unconditionally and failed on Wine (#810); PR #2197 expands
other pls_quota coverage but leaves that assertion unchanged.

Keep the Windows assertion strict, accept Wine's code only under under_wine(),
and read GetLastError() before it so GetProcAddress cannot overwrite the
error. Cover both host branches with a unit test.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:30:14 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 19:36 UTC · original

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

**@⁠DavidM1911** on GitHub · 2026-11-25 19:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/2415#issuecomment-7172529711) 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
Author
Owner

@⁠pablogonz12 on GitHub · 2026-11-25 19:47 UTC · original

Test report from Linux + Wine (RADV). 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 (~/.local/share/Steam/compatibilitytools.d/GE-Proton11-14-x86_64/files/bin/wine), scratch prefix, WINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b", VKD3D_CONFIG=ignore_shared_fence, WINEDEBUG=-all, DXC 1.9.2609.5.
  • Build (Linux cross-compile): RUSTFLAGS="-C target-feature=+crt-static" cargo xwin test --workspace --release --target x86_64-pc-windows-msvc --no-run, then wine <pls_quota exe> --test-threads=1.
  • Base = main 2898511 with this PR merged on top (it merges cleanly, so only this PR differs), head = 5e26d80.

Result, pls_quota integration test

base 2898511 this PR 5e26d80
pls_quota FAILED: 0 passed, 1 failed ok: 2 passed, 0 failed, 0 ignored (0.01 s)

Base, verbatim:

thread 'disk_free_space_ex_reports_pls_quota' (284) panicked at crates/xcl/tests/pls_quota.rs:144:9:
assertion `left == right` failed
  left: (0, 2)
 right: (0, 3)

2 is ERROR_FILE_NOT_FOUND, which is what Wine's GetDiskFreeSpaceExW answers here (GetDiskFreeSpaceExW(s:/<missing>): 0 MiB available of 1 MiB); the PR accepts it only under under_wine() and keeps ERROR_PATH_NOT_FOUND strict elsewhere. So this is the Wine half of #810, confirmed fixed here, and the new missing_pls_path_error_accepts_wines_code_only_under_wine passes on Wine as well.

Not tested

  • No game run; this exercises the test binary only.
  • Windows (the ERROR_FILE_NOT_FOUND branch is not taken there).

AI use

  • DeepSeek V4.1 Flash (OpenCode) built both commits, ran the tests above and wrote this report; no code was written or changed by it.
**@⁠pablogonz12** on GitHub · 2026-11-25 19:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/2415#issuecomment-7172765516) Test report from Linux + Wine (RADV). 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 (`~/.local/share/Steam/compatibilitytools.d/GE-Proton11-14-x86_64/files/bin/wine`), scratch prefix, `WINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b"`, `VKD3D_CONFIG=ignore_shared_fence`, `WINEDEBUG=-all`, DXC 1.9.2609.5. - Build (Linux cross-compile): `RUSTFLAGS="-C target-feature=+crt-static" cargo xwin test --workspace --release --target x86_64-pc-windows-msvc --no-run`, then `wine <pls_quota exe> --test-threads=1`. - Base = `main` 2898511 with this PR merged on top (it merges cleanly, so only this PR differs), head = 5e26d80. **Result, `pls_quota` integration test** | | base 2898511 | this PR 5e26d80 | |---|---|---| | `pls_quota` | FAILED: 0 passed, 1 failed | ok: 2 passed, 0 failed, 0 ignored (0.01 s) | Base, verbatim: ``` thread 'disk_free_space_ex_reports_pls_quota' (284) panicked at crates/xcl/tests/pls_quota.rs:144:9: assertion `left == right` failed left: (0, 2) right: (0, 3) ``` `2` is `ERROR_FILE_NOT_FOUND`, which is what Wine's `GetDiskFreeSpaceExW` answers here (`GetDiskFreeSpaceExW(s:/<missing>)`: `0 MiB available of 1 MiB`); the PR accepts it only under `under_wine()` and keeps `ERROR_PATH_NOT_FOUND` strict elsewhere. So this is the Wine half of #810, confirmed fixed here, and the new `missing_pls_path_error_accepts_wines_code_only_under_wine` passes on Wine as well. **Not tested** - No game run; this exercises the test binary only. - Windows (the `ERROR_FILE_NOT_FOUND` branch is not taken there). **AI use** - DeepSeek V4.1 Flash (OpenCode) built both commits, ran the tests above and wrote this report; no code was written or changed by it.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2415/head:github-bot/gh-2415'
git switch 'github-bot/gh-2415'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2415'
git switch 'github-bot/gh-2415'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2415'
git switch 'github-bot/gh-2415'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2415'
git switch 'main'
git merge --squash 'github-bot/gh-2415'
git switch 'main'
git merge --ff-only 'github-bot/gh-2415'
git switch 'main'
git merge 'github-bot/gh-2415'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.