test(keyboard): verify wrapped history order #17934

Merged
DonRyuzaki merged 1 commit from upstream-pr/17934 into main 2026-11-12 06:37:34 +00:00
DonRyuzaki commented 2026-11-09 23:46:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DonRyuzaki on 2026-11-09T23:46:50Z.


What

Exercise sceKeyboardRead after more than one full 16-entry history buffer of input changes. The test alternates press/release for 20 keys, then checks that chunked reads return the latest 16 snapshots in FIFO order without overwriting past the requested count. This covers ring-head wrap that the existing simultaneous-key test did not reach.

Tested

  • Windows 11, MinGW GCC 15.2, Release: keyboard_tests built and ctest -R '^keyboard_input$' passed (1/1) at final source commit 506b18141e3148029fd3f33a224274a78a5a224b.
  • Negative control: temporarily changed the full-queue head advance from +1 to +2; the focused test failed at the new FIFO assertion in Keyboard.cpp:112. Restored source, rebuilt, and the focused test passed again (1/1). The test-local PRX was refreshed after each rebuild.
  • Based on main 1c288270a7378112e14704deb79edae1d8663204. tools/check_conventions.py --base origin/main and git diff --check origin/main passed; worktree clean.
  • Searched open upstream PRs; no claim found for these exact keyboard read functions. tools/pr_overlap.py could not run locally because gh is absent.
  • No console or game test; this is a focused host regression test only.

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; silent stubs are listed in technical debt
  • No investigation files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none; Fixes: none; Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5233112744 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17934). Originally posted by [DonRyuzaki](https://github.com/DonRyuzaki) on 2026-11-09T23:46:50Z. --- ### What Exercise `sceKeyboardRead` after more than one full 16-entry history buffer of input changes. The test alternates press/release for 20 keys, then checks that chunked reads return the latest 16 snapshots in FIFO order without overwriting past the requested count. This covers ring-head wrap that the existing simultaneous-key test did not reach. ### Tested - Windows 11, MinGW GCC 15.2, Release: `keyboard_tests` built and `ctest -R '^keyboard_input$'` passed (1/1) at final source commit `506b18141e3148029fd3f33a224274a78a5a224b`. - Negative control: temporarily changed the full-queue head advance from `+1` to `+2`; the focused test failed at the new FIFO assertion in `Keyboard.cpp:112`. Restored source, rebuilt, and the focused test passed again (1/1). The test-local PRX was refreshed after each rebuild. - Based on main `1c288270a7378112e14704deb79edae1d8663204`. `tools/check_conventions.py --base origin/main` and `git diff --check origin/main` passed; worktree clean. - Searched open upstream PRs; no claim found for these exact keyboard read functions. `tools/pr_overlap.py` could not run locally because `gh` is absent. - No console or game test; this is a focused host regression test only. ### 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 - [x] Unimplemented paths throw; silent stubs are listed in technical debt - [x] No investigation files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none; Fixes: none; Unblocks: none - [x] GPUs tested: n/a - [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!17934
No description provided.