Repository navigation
test(libkernel): cover sceKernelSendNotificationRequest request validation - #12907
legendary-cookie wants to merge 1 commit into
Conversation
…ation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
The new tests pin exact request-layout and error-code behavior that the PR's own debt entry says is not measured or sourced for PS5.
What I ran
- Reviewed head
159b22e683e0d096d9e5b0211e04c7c81a1d1271against currentmainbb04a4f1ea0175e9e4f149f0359a764d62ff3296. - Current-main merge preview: clean, tree
0d2781914e37f43a1801edd14cc94251cb2777ce. - Environment: Debian GNU/Linux 12, Python 3.11.2, Git 2.39.5. No C++ test or build was run locally.
- Commands:
git merge-tree --write-tree upstream/main upstream/pr-12907
python3 tools/check_conventions.py --base upstream/main --head upstream/pr-12907
git diff --check upstream/main...upstream/pr-12907
gh pr checks 12907 --repo boykopovar/AnyPS5Results
| Check | Result |
|---|---|
| Current-main merge preview | Clean; tree 0d2781914e37f43a1801edd14cc94251cb2777ce |
| Conventions | Passed |
| Diff check | Passed; no output |
| Hosted policy checks | Pending |
| Focused C++ suite | Not run locally; the PR description reports Windows test results |
Unedited output
All conventions checks passed.
0d2781914e37f43a1801edd14cc94251cb2777ce
git diff --check produced no output and exited successfully.
conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40886796453/job/123492583058
eligibility pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40886796895/job/123492582511
intake pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40886796763/job/123492584336
labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40886796637/job/123492583755
Negative control
| Assertion | Change to code under test | Result |
|---|---|---|
Exact size, pointer, device, flags, type, icon-field, and message-termination outcomes in TestNotificationRequest |
Not mutated locally | Not independently exercised; the author reports mutations for size, null handling, flags/icon, and unterminated-message behavior, but the results are author-reported. |
Findings
Blocking
TestNotificationRequest asserts exact return codes for invalid sizes, a null pointer, unsupported device/flags/type/icon values, and an unterminated message, as well as a 3120-byte request layout. The PR's own debt entry says the error codes have no source and the layout comes from OpenOrbis' PS4 OrbisNotificationRequest; neither is measured on a PS5. These tests would make those assumptions durable as expected PS5 behavior. Please provide evidence for the PS5 layout and error results, or omit the assertions that pin unmeasured behavior until such evidence is available.
Non-blocking
The PR reports a passing Windows guest_filesystem run and mutation checks; these are author-reported, not reproduced here. The cited OpenOrbis header documents a PS4 request type and does not establish PS5 error-code behavior.
Sources
- New assertions at the reviewed head
- Debt entry at the reviewed head
- Implementation at current base
- OpenOrbis PS4 request structure at pinned commit
Not verified
I did not run the C++ suite, a Linux/macOS build, or a PS5 firmware/console measurement. Hosted policy checks were pending.
To get this to a good state
Provide PS5-specific evidence for the request layout and each asserted error result, or remove the unmeasured assertions from this test-only change. I will rerun the same merge and convention checks and the focused test on the updated head.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows run of this head (
AI-assisted: yes (Claude Code). |
What
Adds
TestNotificationRequesttoGuestFilesystem.cpp, wheresceKernelDebugOutTextfrom the sameNotification.cppis tested. With a 3120-byte request: sizes 3119 and 3121, device -1 and a message with no terminator in its 1024 bytes return0x80020016; a null request returns0x8002000e; device 1, flags 1, type 1 and a non-zero byte 44 return0x8002002d; and a type-0 request with a short message at offset 45 returns 0.Source: the request layout (type at 0, an icon flag at 44, a 1024-byte message at 45, 3120 bytes) follows OpenOrbis'
OrbisNotificationRequest. The error codes have no source, so a new entry under Unknown function info indocs/dev/debt/libkernel.mdrecords the layout's origin, that only a plain-text request is shown, and that the codes are not measured.Tested
Windows 11, WinLibs GCC 15.2.0 UCRT r7 (the CI toolchain), Release,
BUILD_TESTING=ON, onmain9513717:ctest -R ^guest_filesystem$passes, and the 12 filesystem, Hmd2 and AudioOut2 tests pass with this branch applied together with the other two opened alongside it. Mutation-checked: accepting a larger size, a null request returning another code, ignoring the flags or the icon byte, or another code for an unterminated message, each makes the test fail.tools/check_conventions.py --base origin/mainpasses;tools/pr_overlap.pyreports no overlap. Not run on Linux or macOS.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code