Repository navigation
Tests: expand pls_quota integration tests for disk free space and file attributes hooks - #2197
heditrigui wants to merge 1 commit into
Conversation
…e attributes hooks
|
Code review on
Remaining before merge: Independent dual-vendor/host verification on |
|
Verification on NVIDIA RTX 5070 Ti (Windows 11), head Tested
Not tested
AI use
Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5). |
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.
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.
|
Independent desktop NVIDIA verification of PR #2197 at head Environment
Targeted tests & build (
|
| 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,0production-code changes); the expandedpls_quotaintegration test passed3/3on live Windows 11 NTFS with all31VFS 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).
Summary
Expands native hook integration coverage in
crates/xcl/tests/pls_quota.rs:GetDiskFreeSpaceWandGetDiskFreeSpaceAon mounted volume aliases (P:\) succeed, return non-zero cluster dimensions, and maintain parity across wide and ANSI calls.GetFileAttributesWandGetFileAttributesAcorrectly resolve mounted files (P:\existing.bin) and non-ASCII paths (s:/世界/nested.bin), returning matching valid attributes.GetFileAttributesWon nonexistent paths (P:\missing.bin) returnsINVALID_FILE_ATTRIBUTESand setsERROR_FILE_NOT_FOUND.GetFileAttributesExWwithGetFileExInfoStandardretrieves accurate 64-bit file sizes for mounted files (existing.bin= 123 B,nested.bin= 456 B) and reportsERROR_FILE_NOT_FOUNDon missing files.Tested
python -m pytest scripts/(25 passed in 0.48s).scripts/pr_check.py --local.Not tested
tests/integration suites are non-runtime code).AI use