Tests: xcl rpf --find prints only the records its fragment matches #868

Open
Koro4e wants to merge 1 commit from upstream-pr/874 into main
Koro4e commented 2026-11-24 07:10:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Koro4e on 2026-11-24T07:10:55Z.


tests/rpf_e2e.rs covered --find only as a --probe conflict rejection; the actual filtering path (--find FRAGMENT prints only the records whose name contains the fragment) had no test. This adds one that builds a small RPF9 archive with two plain shader records - the format gpu/pack.rs scans without a TOC, using the same record layout its unit tests use - and checks both the hit and the empty case.

Tests only - no code touched.

What is in it

  • crates/xcl/tests/rpf_e2e.rs: find_filters_records_by_name_fragment - an archive with records CS_one_11111111_Wrapped / CS_two_22222222_Wrapped; --find one prints the one record and not the other, --find no_such_name prints neither; both runs exit 0

Tested

  • cargo test -p xcl --test rpf_e2e: 3 passed (the new one plus the two existing), 0 failed, 0 ignored; the debug build is clean apart from the one pre-existing deprecation warning (std::sync::atomic::Atomic::<u32>::fetch_update, hle/xgameruntime/mod.rs)
  • the whole suite was not rerun on this PR: the GPU is busy with another process on this machine and most of the remaining tests need it. The last full-suite run on this machine, on main earlier today: cargo test --workspace --no-fail-fast -- --test-threads=1: 708 passed, 5 failed, 41 ignored, 17 test binaries; the 5 failures are the GPU tests' VRM/device-removed cascade on this 12 GiB RTX 3060 (driver 617.14), each passes when run on its own. Environmental, unrelated to this change.
  • Windows 11 build 26200, Rust 1.100.0 (stable-x86_64-pc-windows-msvc)

Regression run

  • not needed: no change to crates/xcl/src (the test calls the shipped xcl rpf through a fresh debug build)

Not tested

  • AMD GPUs; the retail title

AI use

  • AI-assisted: yes. Written with an AI agent (DeepAI Code) with GLM 5.3 Flash (Z.ai): found the gap, wrote the test and this description.
<!-- greyfinch-sync:ivall/xcl:issue:5467758744 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/874). Originally posted by [Koro4e](https://github.com/Koro4e) on 2026-11-24T07:10:55Z. --- `tests/rpf_e2e.rs` covered `--find` only as a `--probe` conflict rejection; the actual filtering path (`--find FRAGMENT` prints only the records whose name contains the fragment) had no test. This adds one that builds a small RPF9 archive with two plain shader records - the format `gpu/pack.rs` scans without a TOC, using the same record layout its unit tests use - and checks both the hit and the empty case. Tests only - no code touched. **What is in it** - crates/xcl/tests/rpf_e2e.rs: `find_filters_records_by_name_fragment` - an archive with records `CS_one_11111111_Wrapped` / `CS_two_22222222_Wrapped`; `--find one` prints the one record and not the other, `--find no_such_name` prints neither; both runs exit 0 **Tested** - `cargo test -p xcl --test rpf_e2e`: 3 passed (the new one plus the two existing), 0 failed, 0 ignored; the debug build is clean apart from the one pre-existing deprecation warning (`std::sync::atomic::Atomic::<u32>::fetch_update`, hle/xgameruntime/mod.rs) - the whole suite was not rerun on this PR: the GPU is busy with another process on this machine and most of the remaining tests need it. The last full-suite run on this machine, on main earlier today: `cargo test --workspace --no-fail-fast -- --test-threads=1`: 708 passed, 5 failed, 41 ignored, 17 test binaries; the 5 failures are the GPU tests' VRM/device-removed cascade on this 12 GiB RTX 3060 (driver 617.14), each passes when run on its own. Environmental, unrelated to this change. - Windows 11 build 26200, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`) **Regression run** - not needed: no change to `crates/xcl/src` (the test calls the shipped `xcl rpf` through a fresh debug build) **Not tested** - AMD GPUs; the retail title **AI use** - AI-assisted: yes. Written with an AI agent (DeepAI Code) with GLM 5.3 Flash (Z.ai): found the gap, wrote the test and this description.
SlopTart commented 2026-11-24 09:07:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T08:09:12Z.


Linux / AMD RDNA3 datapoint.

Merged state: head 734d7a6 onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 706 passed, 10 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes (new flake, see #718 addendum). xcl rpf --find record-filter tests green.

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:7125788024 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/874#issuecomment-7125788024). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T08:09:12Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `734d7a6` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **706 passed, 10 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` (new flake, see #718 addendum). `xcl rpf --find` record-filter tests green. **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.
JJAutoCompare commented 2026-11-25 06:06:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:50:52Z.


Empirical test report (734d7a6b)

Hardware / environment

  • Windows x64, build 26200. AMD CPU reported as AMD64 Family 23 Model 113 Stepping 0.
  • Rust 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). Cargo used the unoptimized test profile with incremental compilation and debug info disabled.
  • The focused run set XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. Both commands ran outside Invoke-ArcTest.ps1, with zero Arc GPU mutex hold.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test executables.
  • cargo test -p xcl --test rpf_e2e find_filters_records_by_name_fragment -- --nocapture exited 0. The focused log records 1 passed, 0 failed, 0 ignored, 0 SKIPPED lines, and 2 filtered out. The test finished in 3.16 s.
  • Both Cargo commands emitted a deprecation warning for AtomicU32::fetch_update in xgameruntime.

Observed behavior

The integration test wrote a synthetic RPF9 with two plain-name records and ran the compiled xcl binary twice. Both invocations exited successfully. With --find one, stdout contained CS_one_11111111_Wrapped and excluded CS_two_22222222_Wrapped. With --find no_such_name, stdout contained neither record name. The exercised CLI path scanned and inflated archive bytes on the CPU without initializing D3D12.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The focused run used a synthetic fixture.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr874-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154195277 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/874#issuecomment-7154195277). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:50:52Z. --- ### Empirical test report (734d7a6b) **Hardware / environment** - Windows x64, build 26200. AMD CPU reported as AMD64 Family 23 Model 113 Stepping 0. - Rust `1.100.0 (0ef1bc386 2026-11-09)` and DXC `1.9.2609.5 (01b62ad47)`. Cargo used the unoptimized test profile with incremental compilation and debug info disabled. - The focused run set `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. Both commands ran outside `Invoke-ArcTest.ps1`, with zero Arc GPU mutex hold. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test executables. - `cargo test -p xcl --test rpf_e2e find_filters_records_by_name_fragment -- --nocapture` exited 0. The focused log records 1 passed, 0 failed, 0 ignored, 0 `SKIPPED` lines, and 2 filtered out. The test finished in 3.16 s. - Both Cargo commands emitted a deprecation warning for `AtomicU32::fetch_update` in `xgameruntime`. **Observed behavior** The integration test wrote a synthetic RPF9 with two plain-name records and ran the compiled `xcl` binary twice. Both invocations exited successfully. With `--find one`, stdout contained `CS_one_11111111_Wrapped` and excluded `CS_two_22222222_Wrapped`. With `--find no_such_name`, stdout contained neither record name. The exercised CLI path scanned and inflated archive bytes on the CPU without initializing D3D12. **Not tested** The full GPU workspace suite and game smoke runs were omitted. The focused run used a synthetic fixture. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr874-focused.log` and published.
DavidM1911 commented 2026-11-25 10:10:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:02:17Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7159137347 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/874#issuecomment-7159137347). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:02:17Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-28 20:19:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:19:39Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7245204352 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/874#issuecomment-7245204352). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:19:39Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:22:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:22:36Z.


Triage (#1607) – head 734d7a6

#2075 (opened later) also tests xcl rpf --find in its combined rpf_listing_filtering_and_extraction test, but not the no-match case this one checks; #895 shares the synthetic-archive fixture but tests --extract. The tests overlap without being the same change, so one of them should take the other's cases or both should land. 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:7300671145 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/874#issuecomment-7300671145). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:22:36Z. --- **Triage (#1607)** – head 734d7a6 #2075 (opened later) also tests `xcl rpf --find` in its combined rpf_listing_filtering_and_extraction test, but not the no-match case this one checks; #895 shares the synthetic-archive fixture but tests --extract. The tests overlap without being the same change, so one of them should take the other's cases or both should land. 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/874:upstream-pr/874'
git switch 'upstream-pr/874'

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