Skip to content

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

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Dextroid17:fix/agc-command-tests-full-mode
Oct 7, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Dextroid17:fix/agc-command-tests-full-mode

Conversation

@Dextroid17

Copy link
Copy Markdown
Contributor

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 9c2a756 ("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

…l suite

WriteWait has truncated the reference and mask of a 32-bit wait since
9c2a756 ("relaxed checks for what titles send"), but testMemory still
expected a reference above 32 bits to throw, so agc_command_tests failed
when run without arguments. ctest only registers the "defaults" mode, so
the stale expectation was never noticed.

Update the expectation to the truncating behaviour (the packet keeps the low
halves) and register the full mode as agc_commands so the packet, marker,
flip, register and memory cases are checked again.

Closes boykopovar#1005.
@oneandonlydean
oneandonlydean merged commit e69f196 into boykopovar:main Oct 7, 2026
3 checks passed
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.

agc_command_tests full mode fails on main: stale 32-bit WriteWait expectation

2 participants