test(agc): fix the stale 32-bit WriteWait expectation and run the full suite #1006

Merged
Dextroid17 merged 1 commit from upstream-pr/1006 into main 2026-10-07 00:10:04 +00:00
Dextroid17 commented 2026-10-06 22:59:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-06T22:59:03Z.


What

Fixes the stale expectation in testMemory and registers the full agc_command_tests mode in ctest. Closes #1005.

WriteWait truncates the reference and mask of a 32-bit wait (size == 0) to their low halves since 9c2a7560 ("relaxed checks for what titles send"), but testMemory still expected a reference above 32 bits to throw, so the binary failed when run without arguments:

$ ./build/tests/agc_command_tests
expected an exception

Only agc_initialization (agc_command_tests defaults) is registered in ctest, so the stale expectation went unnoticed and the packet, marker, flip, register and memory cases have not been running.

  • testMemory: the second expectFailure becomes an assertion that the packet keeps the low halves of the reference and mask (0x100000000 → 0, 0xffffffff00000001 → 1). The storage.words == before check now covers only the remaining sceAgcWaitRegMemPatchReference failure.
  • CMakeLists.txt: add agc_commands (agc_command_tests with no arguments) next to agc_initialization, so the full mode runs in CI.

Tested

  • Linux, CachyOS (Arch), GCC 16.2.1, Release.
  • Before: ./build/tests/agc_command_tests → expected an exception, exit 1.
  • After: AGC command tests passed, exit 0.
  • ctest -R '^agc_(initialization|commands)$' → both pass.
  • Full suite: ctest --test-dir build -j 8 --timeout 120 → 370/370 pass.
  • Not tested on a title.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source — not applicable
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4765575537 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1006). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-06T22:59:03Z. --- ### What Fixes the stale expectation in `testMemory` and registers the full `agc_command_tests` mode in ctest. Closes #1005. `WriteWait` truncates the reference and mask of a 32-bit wait (`size == 0`) to their low halves since 9c2a7560 ("relaxed checks for what titles send"), but `testMemory` still expected a reference above 32 bits to throw, so the binary failed when run without arguments: ``` $ ./build/tests/agc_command_tests expected an exception ``` Only `agc_initialization` (`agc_command_tests defaults`) is registered in ctest, so the stale expectation went unnoticed and the packet, marker, flip, register and memory cases have not been running. - `testMemory`: the second `expectFailure` becomes an assertion that the packet keeps the low halves of the reference and mask (`0x100000000` → 0, `0xffffffff00000001` → 1). The `storage.words == before` check now covers only the remaining `sceAgcWaitRegMemPatchReference` failure. - `CMakeLists.txt`: add `agc_commands` (`agc_command_tests` with no arguments) next to `agc_initialization`, so the full mode runs in CI. ### Tested - Linux, CachyOS (Arch), GCC 16.2.1, Release. - Before: `./build/tests/agc_command_tests` → `expected an exception`, exit 1. - After: `AGC command tests passed`, exit 0. - `ctest -R '^agc_(initialization|commands)$'` → both pass. - Full suite: `ctest --test-dir build -j 8 --timeout 120` → 370/370 pass. - Not tested on a title. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source — not applicable - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
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
boykopovar/AnyPS5!1006
No description provided.