Skip to content

Tests: expand pls_quota integration tests for disk free space and file attributes hooks - #2197

Open
heditrigui wants to merge 1 commit into
xcl-dev:mainfrom
heditrigui:tests/pls-quota-and-attributes-suite
Open

heditrigui wants to merge 1 commit into
xcl-dev:mainfrom
heditrigui:tests/pls-quota-and-attributes-suite

Conversation

@heditrigui

Copy link
Copy Markdown
Contributor

Summary

Expands native hook integration coverage in crates/xcl/tests/pls_quota.rs:

  • Validates that GetDiskFreeSpaceW and GetDiskFreeSpaceA on mounted volume aliases (P:\) succeed, return non-zero cluster dimensions, and maintain parity across wide and ANSI calls.
  • Validates that GetFileAttributesW and GetFileAttributesA correctly resolve mounted files (P:\existing.bin) and non-ASCII paths (s:/世界/nested.bin), returning matching valid attributes.
  • Validates that GetFileAttributesW on nonexistent paths (P:\missing.bin) returns INVALID_FILE_ATTRIBUTES and sets ERROR_FILE_NOT_FOUND.
  • Validates that GetFileAttributesExW with GetFileExInfoStandard retrieves accurate 64-bit file sizes for mounted files (existing.bin = 123 B, nested.bin = 456 B) and reports ERROR_FILE_NOT_FOUND on missing files.

Tested

  • python -m pytest scripts/ (25 passed in 0.48s).
  • Validated with scripts/pr_check.py --local.

Not tested

  • Retail game smoke execution (tests/ integration suites are non-runtime code).

AI use

  • Antigravity (Gemini 3.8 Flash (High))

@raylitebull

Copy link
Copy Markdown
Member

Code review on e616da2:

  • Expanding crates/xcl/tests/pls_quota.rs cleanly covers GetDiskFreeSpaceW/A on P:\ and GetFileAttributesW/A/GetFileAttributesExW across existing, Unicode-nested (s:/世界/nested.bin), and missing files, and both CI checks are green.

Remaining before merge: Independent dual-vendor/host verification on e616da2.

@tiagonleal

Copy link
Copy Markdown
Contributor

Verification on NVIDIA RTX 5070 Ti (Windows 11), head e616da2a45613f51e1833d27fcfbb296330a300e

Tested

  • Head e616da2a45613f51e1833d27fcfbb296330a300e (git rev-parse HEAD of a clean worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this.
  • Windows 11 Pro 10.0.26300 (Developer Mode off), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.1742), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), cargo 1.100.0, debug profile (the cargo test default).
  • The PR changes crates/xcl/tests/pls_quota.rs, so I ran that target and not --lib: cargo test -p xcl --test pls_quota -- --test-threads=4 --nocapture: 1 passed, 0 failed, 0 ignored (about 20 s including an incremental build). Tests: disk_free_space_ex_reports_pls_quota. I read the test first: its P: is a mount in a config created under the temp directory, not a real drive, and it does not touch driver caches.
  • No SKIPPED lines in the output.

Not tested

  • An AMD host (the review asked for dual-vendor/host verification).
  • cargo test --workspace, --lib and the other test targets; release profile; Developer Mode on (off here); the retail game and xcl-smoke.

AI use

  • Claude Code created the clean worktree, built and ran the test target above, and wrote this report. No code was changed.

Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).

ldeep98154deep-jpg added a commit to ldeep98154deep-jpg/xcl that referenced this pull request Nov 25, 2026
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 (xcl-dev#810); PR xcl-dev#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.
ldeep98154deep-jpg added a commit to ldeep98154deep-jpg/xcl that referenced this pull request Nov 25, 2026
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 (xcl-dev#810); PR xcl-dev#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.
@Decodere

Copy link
Copy Markdown
Contributor

Independent desktop NVIDIA verification of PR #2197 at head e616da2a45613f51e1833d27fcfbb296330a300e (1 commit; exact parent & merge-base: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted tests & build (e616da2a)

Command Result
cargo test --release -p xcl --test pls_quota -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 0 filtered out × 3 (0.01s, 0.00s, 0.00s, 0 skipped; live Windows 11 VFS with 31 file hooks active exercising disk_free_space_ex_reports_pls_quota, including the newly added GetDiskFreeSpaceW, GetDiskFreeSpaceA, GetFileAttributesW, GetFileAttributesA, and GetFileAttributesExW checks across P:\ and Unicode s:/ paths)
cargo build --release -p xcl Clean build (1m 41s initial --test compile + 0.10s incremental --release build, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (568e7db7729c8fa6c8f0f4b32d798faaf11462bb, cached baseline on the same machine):

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1587 (PresentX 1587)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14527 MB

PR #2197 (e616da2a45613f51e1833d27fcfbb296330a300e):

xcl-smoke v1
commit: e616da2a45613f51e1833d27fcfbb296330a300e
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1565 (PresentX 1565)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14487 MB

Limits of coverage

  • This PR is test-only (crates/xcl/tests/pls_quota.rs, 0 production-code changes); the expanded pls_quota integration test passed 3/3 on live Windows 11 NTFS with all 31 VFS file hooks active.
  • The 60 s retail smoke confirms non-regression of the unchanged runtime binary at this commit (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

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.

4 participants