test(libkernel): audit socket broadcast, debug, and route option bounds #21149

Merged
slopgobblercobbler merged 1 commit from upstream-pr/21149 into main 2026-11-20 04:42:45 +00:00
slopgobblercobbler commented 2026-11-15 21:07:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-11-15T21:07:43Z.


What

Add non-GTest standalone test GuestKernelSocketBroadcastDebugRouteBounds.cpp verifying getsockopt and setsockopt with SOL_SOCKET options SO_BROADCAST, SO_DEBUG, SO_DONTROUTE and error precedence in accordance with docs/dev/debt/libkernel.md.

Tested

ctest --test-dir build -R guest_kernel_socket_broadcast_debug_route_bounds_tests

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:5327208516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21149). Originally posted by [slopgobblercobbler](https://github.com/slopgobblercobbler) on 2026-11-15T21:07:43Z. --- ### What Add non-GTest standalone test `GuestKernelSocketBroadcastDebugRouteBounds.cpp` verifying `getsockopt` and `setsockopt` with `SOL_SOCKET` options `SO_BROADCAST`, `SO_DEBUG`, `SO_DONTROUTE` and error precedence in accordance with docs/dev/debt/libkernel.md. ### Tested ctest --test-dir build -R guest_kernel_socket_broadcast_debug_route_bounds_tests ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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-19 07:55:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T07:55:24Z.

Review: APPROVED


Reviewed — looks good

The changed test and its CMake registration were reviewed at head 665a67def59a9a694c4949c132acc2ba4fbaf630; the available source supports merging, but the test was not run.

What I ran

Read the prepared description, commits, manifest, and diff, then inspected both changed files and the socket option implementation and callers at the pinned head. No test command was run. The prepared review folder did not expose files.json through the reader.

Results

Check Result Note
Changed code review passed Both changed files were read
Reported CTest command not run No test execution available
Excluded file list not run files.json was not accessible

Findings

Blocking

None.

Non-blocking

None.

Not verified

The author reports running ctest --test-dir build -R guest_kernel_socket_broadcast_debug_route_bounds_tests; I did not run it. The excluded file list could not be read, so any exclusions and their reasons are not verified. No other files were read beyond the two changed files and targeted socket option implementation/caller context.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5971219679 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21149#pullrequestreview-5971219679). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T07:55:24Z. **Review:** APPROVED --- # Reviewed — looks good The changed test and its CMake registration were reviewed at head `665a67def59a9a694c4949c132acc2ba4fbaf630`; the available source supports merging, but the test was not run. ## What I ran Read the prepared description, commits, manifest, and diff, then inspected both changed files and the socket option implementation and callers at the pinned head. No test command was run. The prepared review folder did not expose `files.json` through the reader. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Both changed files were read | | Reported CTest command | not run | No test execution available | | Excluded file list | not run | `files.json` was not accessible | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The author reports running `ctest --test-dir build -R guest_kernel_socket_broadcast_debug_route_bounds_tests`; I did not run it. The excluded file list could not be read, so any exclusions and their reasons are not verified. No other files were read beyond the two changed files and targeted socket option implementation/caller context. ## To get this to a good state Nothing is required.
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!21149
No description provided.