HLE: expand synthetic unit tests for apu.rs (1 -> 19 tests) #1212
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1212
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1212"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@geiyiliyabumo on GitHub · 2026-11-24 16:26 UTC · original
geiyiliyabumo:test/hle-apu-audit→main· +679 −0 · 1 files · 1 commits · openSummary
Closes #1120
Full verification details and change notes are documented in #1120 (commit
d10138b, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
@Zipettte on GitHub · 2026-11-24 17:59 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d10138b:
cargo test -p victory-hlepasses, 113 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@upipibi on GitHub · 2026-11-24 20:33 UTC · original
Duplicate check: this PR and #1137 have the same diff (681 changed lines, no differences) and commits by the same author (给伊莉雅补魔). Only one of the two needs review; the other can be closed.
@geiyiliyabumo on GitHub · 2026-11-24 21:07 UTC · original
Thanks @upipibi for flagging this! Just to clarify provenance: this PR (#1212) is the original author PR (authored by
geiyiliyabumo, already reviewed/approved by @mercuryVM). #1137 was opened by another account (@Vittorio17) using our commit from our fork branch, so #1212 is the canonical one to keep.AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 01:18 UTC · original · edited 2026-11-25 03:22 UTC
Automated triage for the maintainers.
Merge candidate. This PR only adds tests to
crates/victory-hle/src/modules/apu.rsand leaves the production code alone. Each assertion agrees withXApuConnect,XApuEnqueueCommand,process,XApuDequeueResultandXApuGetResultCountinmain. The tests cover the connect argument ranges, zeroed memory and the optional event, refused activations,first_frame/frame_count/output-room clamping, deinterleaved and mono output,BAD_PACKET, the decoder history reset, per-stream queue limits and the auto-reset result event. The decode checks compare against an independentOpusDecoder, not against the code's own output. One test pinsE_NOTIMPLfor other processing kinds, whichmainmarks as a shortcut, so it will need updating if that shortcut is ever implemented. CI (check) passes.Generated by Claude Code
@geiyiliyabumo on GitHub · 2026-11-25 02:16 UTC · original
Rebased cleanly onto \main\ (\
ccfb029). \cargo test -p victory-hle --locked modules::apu::tests\ (20 passed, 0 failed), \cargo clippy -p victory-hle --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.@fuzeofficlal on GitHub · 2026-11-26 01:13 UTC · original
Code review and Windows 11 verification at head
b9efa5e5be91merged cleanly ontomain(63bcca43c6a0):crates/victory-hle/src/modules/apu.rs:419-846+):opus_pure::OpusEncodervs referenceOpusDecoder) and synthetic malformed packets, with no external paths or files.XApuConnectvalidation/alignment/zeroing,RESULT_EVENTauto-reset,Activate/ALREADY_ACTIVE, mono/stereo/planar decoding, clamping,Reset, per-stream FIFO/QUEUE_FULL, malformed packet handling, andXApuGetResultCount. Each test uses an isolatedFixturewithDrop -> XApuDisconnectfor clean parallel execution.cargo xtask policy:191 files ok;cargo clippy --locked -p victory-hle --tests -- -D warnings: 0 warningsvictory-hle -- apu: 21/21 passed; fullvictory-hle -- --test-threads=1: 170/170 lib +fidelityfx+no_dll_plantingpassed.LGTM.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.