test(libkernel): cover null pointer and invalid maxevents in sceKernelWaitEqueue #14680

Closed
slopgobblercobbler wants to merge 1 commit from upstream-pr/14680 into main
slopgobblercobbler commented 2026-11-01 17:02:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-11-01T17:02:53Z.


What

Add negative test coverage in core/libs/tests/GuestEqueueEvents.cpp verifying null event list pointer and invalid maxevents in sceKernelWaitEqueue.

Tested

Ran python tools/check_conventions.py --base upstream/main --head HEAD with 0 findings.

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 under Silent stubs in their library's technical debt file
  • 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
  • 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:5109576144 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14680). Originally posted by [slopgobblercobbler](https://github.com/slopgobblercobbler) on 2026-11-01T17:02:53Z. --- ### What Add negative test coverage in core/libs/tests/GuestEqueueEvents.cpp verifying null event list pointer and invalid maxevents in sceKernelWaitEqueue. ### Tested Ran python tools/check_conventions.py --base upstream/main --head HEAD with 0 findings. ### 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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 - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-01 17:05:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T17:05:21Z.

Review: COMMENTED


Reviewed — no blocking findings

The new cases match the current sceKernelWaitEqueue error paths and are registered in the existing equeue test target.

What I ran

Reviewed head 491799b852da793002ef163cce06178f7072548d against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the no-build preview is clean. Environment: Debian 12 x86_64, Python 3.11.2, GCC 12.2.0. No compiler or C++ test binary was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14680
git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...491799b852da793002ef163cce06178f7072548d
python3 tools/pr_stack_check.py 14680 --repo boykopovar/AnyPS5
git show refs/review/queue/20261101/14680:core/libs/tests/GuestEqueueEvents.cpp
git show refs/review/queue/20261101/14680:core/libs/prx/libkernel/Equeue/Equeue.cpp
git show refs/review/queue/20261101/14680:core/libs/tests/GuestKernelErrors.cpp
gh pr checks 14680 --repo boykopovar/AnyPS5

Results

Check Result Note
Patch and conventions passed No whitespace or convention issue found.
Merge preview passed Clean against the current base SHA above.
Source and test registration passed Error codes match implementation; test target is registered.
Hosted checks not run Five checks were queued.
C++ test execution not run Requires a build; no build was run.
Test-quality helper not run Helper is missing from the isolated precheck snapshot.
Unedited check output
All conventions checks passed.

Conclusion: checks failed
Head unchanged at completion: True
Base unchanged at completion: True
| diff_check | passed | git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...491799b852da793002ef163cce06178f7072548d |
| conventions_and_pr_template | passed | /usr/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 491799b852da793002ef163cce06178f7072548d --title test(libkernel): cover null pointer and invalid maxevents in sceKernelWaitEqueue --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14680-491799b852da/pr-body.md |
| live_dependency_and_mergeability_check | passed | /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14680 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14680-491799b852da/stack |
| test_quality_heuristics | failed | /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14680-491799b852da/head-491799b852da-f1a12258/tools/pr_test_quality.py': [Errno 2] No such file or directory
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41329427681/job/124916202219
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41329428031/job/124916202317
intake	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41329427647/job/124916202048
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41329427634/job/124916202248
library-portability	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41329428054/job/124916202090

Negative control

Assertion Change to code under test Did the new test fail?
Invalid maxevents and output pointer are rejected No mutation or binary run. Not run.

Findings

Blocking

None found in the changed test.

Non-blocking

The null-event-pointer and zero-count cases already exist in GuestKernelErrors.cpp; this addition also checks a negative count and null output pointer, so it adds distinct boundary coverage.

Sources

Not verified

No C++ build or runtime test was performed. Hosted checks were queued at the time inspected.

To get this to a good state

No source change is needed based on this review. Since hosted checks are pending, I am leaving a comment rather than approving; I will recheck the same head when they complete.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729266300 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14680#pullrequestreview-5729266300). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T17:05:21Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The new cases match the current `sceKernelWaitEqueue` error paths and are registered in the existing equeue test target. ## What I ran Reviewed head `491799b852da793002ef163cce06178f7072548d` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; the no-build preview is clean. Environment: Debian 12 x86_64, Python 3.11.2, GCC 12.2.0. No compiler or C++ test binary was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14680 git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...491799b852da793002ef163cce06178f7072548d python3 tools/pr_stack_check.py 14680 --repo boykopovar/AnyPS5 git show refs/review/queue/20261101/14680:core/libs/tests/GuestEqueueEvents.cpp git show refs/review/queue/20261101/14680:core/libs/prx/libkernel/Equeue/Equeue.cpp git show refs/review/queue/20261101/14680:core/libs/tests/GuestKernelErrors.cpp gh pr checks 14680 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Patch and conventions | passed | No whitespace or convention issue found. | | Merge preview | passed | Clean against the current base SHA above. | | Source and test registration | passed | Error codes match implementation; test target is registered. | | Hosted checks | not run | Five checks were queued. | | C++ test execution | not run | Requires a build; no build was run. | | Test-quality helper | not run | Helper is missing from the isolated precheck snapshot. | <details><summary>Unedited check output</summary> ```text All conventions checks passed. Conclusion: checks failed Head unchanged at completion: True Base unchanged at completion: True | diff_check | passed | git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...491799b852da793002ef163cce06178f7072548d | | conventions_and_pr_template | passed | /usr/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 491799b852da793002ef163cce06178f7072548d --title test(libkernel): cover null pointer and invalid maxevents in sceKernelWaitEqueue --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14680-491799b852da/pr-body.md | | live_dependency_and_mergeability_check | passed | /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14680 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14680-491799b852da/stack | | test_quality_heuristics | failed | /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14680-491799b852da/head-491799b852da-f1a12258/tools/pr_test_quality.py': [Errno 2] No such file or directory conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41329427681/job/124916202219 eligibility pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41329428031/job/124916202317 intake pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41329427647/job/124916202048 labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41329427634/job/124916202248 library-portability pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41329428054/job/124916202090 ``` </details> ## Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | Invalid `maxevents` and output pointer are rejected | No mutation or binary run. | Not run. | ## Findings ### Blocking None found in the changed test. ### Non-blocking The null-event-pointer and zero-count cases already exist in `GuestKernelErrors.cpp`; this addition also checks a negative count and null output pointer, so it adds distinct boundary coverage. ## Sources - [New test cases at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/491799b852da793002ef163cce06178f7072548d/core/libs/tests/GuestEqueueEvents.cpp#L276-L285) - [`sceKernelWaitEqueue` validation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/491799b852da793002ef163cce06178f7072548d/core/libs/prx/libkernel/Equeue/Equeue.cpp#L703-L713) - [Existing test registration at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/491799b852da793002ef163cce06178f7072548d/core/libs/prx/libkernel/CMakeLists.txt#L1509-L1514) ## Not verified No C++ build or runtime test was performed. Hosted checks were queued at the time inspected. ## To get this to a good state No source change is needed based on this review. Since hosted checks are pending, I am leaving a comment rather than approving; I will recheck the same head when they complete.

Pull request closed

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!14680
No description provided.