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

Open
ldeep98154deep-jpg wants to merge 1 commit from upstream-pr/2415 into main
ldeep98154deep-jpg commented 2026-11-25 18:10:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ldeep98154deep-jpg on 2026-11-25T18:10:06Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:5496638955 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2415). Originally posted by [ldeep98154deep-jpg](https://github.com/ldeep98154deep-jpg) on 2026-11-25T18:10:06Z. --- 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.
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:29Z.


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:7172529711 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2415#issuecomment-7172529711). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T19:36:29Z. --- 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:16Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7172765516 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2415#issuecomment-7172765516). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-25T19:47:16Z. --- 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.
Anon64 commented 2026-11-27 03:45:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-27T03:45:53Z.


Linux / Wine check of #2415 at head 5e26d80adfea03f97f9eff022b1012c389f11ad4, merged onto main 8b957bec6f82495aec940944c6bf47faa02db590 (no conflicts), against main alone. Reproduces #810.

Setup

  • Ubuntu 24.04 in Docker, Wine 11.0 (WineHQ stable), Xvfb, LANG=C.UTF-8, no GPU.
  • Cross-built with x86_64-pc-windows-gnu (Rust 1.100.0, mingw-w64 GCC 13), debug; tests run through Wine as the target runner.
  • Command: cargo test -p xcl --target x86_64-pc-windows-gnu --test pls_quota

Results

  • main: 0 passed, 1 failed. disk_free_space_ex_reports_pls_quota fails at the missing-path error check (pls_quota.rs:144, assertion left == right), the #810 symptom.
  • main + #2415: 2 passed, 0 failed (disk_free_space_ex_reports_pls_quota, missing_pls_path_error_accepts_wines_code_only_under_wine).

Two setup notes for others on this lane: with Ubuntu's own Wine 9.0 the test stops earlier, at vfs_hooks::install() (kernelbase.dll!CopyFile2 not found), and without a UTF-8 locale it stops at creating the non-ASCII test folders. Neither reaches the line this PR changes; Wine 11 with LANG=C.UTF-8 does.

Not tested

  • Windows (MSVC) builds, the rest of the workspace on this tree.

AI use
Claude Code (Claude Opus 5.5) set up the container, ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7209252760 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2415#issuecomment-7209252760). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-27T03:45:53Z. --- Linux / Wine check of #2415 at head `5e26d80adfea03f97f9eff022b1012c389f11ad4`, merged onto `main` `8b957bec6f82495aec940944c6bf47faa02db590` (no conflicts), against `main` alone. Reproduces #810. **Setup** - Ubuntu 24.04 in Docker, Wine 11.0 (WineHQ stable), Xvfb, `LANG=C.UTF-8`, no GPU. - Cross-built with `x86_64-pc-windows-gnu` (Rust 1.100.0, mingw-w64 GCC 13), debug; tests run through Wine as the target runner. - Command: `cargo test -p xcl --target x86_64-pc-windows-gnu --test pls_quota` **Results** - `main`: 0 passed, 1 failed. `disk_free_space_ex_reports_pls_quota` fails at the missing-path error check (`pls_quota.rs:144`, `assertion left == right`), the #810 symptom. - `main` + #2415: 2 passed, 0 failed (`disk_free_space_ex_reports_pls_quota`, `missing_pls_path_error_accepts_wines_code_only_under_wine`). Two setup notes for others on this lane: with Ubuntu's own Wine 9.0 the test stops earlier, at `vfs_hooks::install()` (`kernelbase.dll!CopyFile2 not found`), and without a UTF-8 locale it stops at creating the non-ASCII test folders. Neither reaches the line this PR changes; Wine 11 with `LANG=C.UTF-8` does. **Not tested** - Windows (MSVC) builds, the rest of the workspace on this tree. **AI use** Claude Code (Claude Opus 5.5) set up the container, ran the tests and wrote this report.
Foniass commented 2026-12-01 07:59:49 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 5e26d80

#937 (closed) and #837 (closed draft) took the same approach. No open PR does, and main's pls_quota.rs still asserts (0, ERROR_PATH_NOT_FOUND) for S:\missing. The Windows assertion stays strict, and the error is read before under_wine() can overwrite it. 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:7304741049 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2415#issuecomment-7304741049). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:59:49Z. --- **Triage (#1607)** – head 5e26d80 #937 (closed) and #837 (closed draft) took the same approach. No open PR does, and main's `pls_quota.rs` still asserts `(0, ERROR_PATH_NOT_FOUND)` for `S:\missing`. The Windows assertion stays strict, and the error is read before `under_wine()` can overwrite it. 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/2415:upstream-pr/2415'
git switch 'upstream-pr/2415'

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/2415'
git switch 'upstream-pr/2415'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2415'
git switch 'upstream-pr/2415'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2415'
git switch 'main'
git merge --squash 'upstream-pr/2415'
git switch 'main'
git merge --ff-only 'upstream-pr/2415'
git switch 'main'
git merge 'upstream-pr/2415'
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!2405
No description provided.