test(libkernel): audit socket FIONREAD data tracking, IPv6 FIONBIO, and closed descriptor precedence #21929

Merged
slopgobblercobbler merged 6 commits from upstream-pr/21929 into main 2026-11-27 03:18:39 +00:00
slopgobblercobbler commented 2026-11-16 22:05:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-11-16T22:05:48Z.


What

Fold unique ioctl audits directly into GuestKernelIoctlFionread.cpp:

  • FIONREAD on a connected stream socket holding data across partial and completed reads, shutdown handling, and UDP datagram queued byte accounting
  • FIONBIO on IPv6 stream and datagram sockets with explicit creation assertions (Require), and large FIONBIO values
  • Null pointer fault precedence (EFAULT) on closed and invalid descriptors (-1) before descriptor validation (EBADF)
  • Drops duplicate test target and redundant checks in accordance with docs/dev/debt/libkernel.md.

Tested

ctest --test-dir build -R guest_kernel_ioctl_fionread

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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

Summary by CodeRabbit

  • Tests
    • Expanded coverage for ioctl behavior involving invalid descriptors, null pointers, and nonzero values.
    • Added checks for the number of bytes queued on stream and datagram sockets, including after receiving data.
    • Added conditional IPv6 stream and datagram coverage when socket creation succeeds.
    • Test failure diagnostics now include the source location of the failed assertion.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5346031161 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929). Originally posted by [slopgobblercobbler](https://github.com/slopgobblercobbler) on 2026-11-16T22:05:48Z. --- ### What Fold unique ioctl audits directly into GuestKernelIoctlFionread.cpp: - FIONREAD on a connected stream socket holding data across partial and completed reads, shutdown handling, and UDP datagram queued byte accounting - FIONBIO on IPv6 stream and datagram sockets with explicit creation assertions (Require), and large FIONBIO values - Null pointer fault precedence (EFAULT) on closed and invalid descriptors (-1) before descriptor validation (EBADF) - Drops duplicate test target and redundant checks in accordance with docs/dev/debt/libkernel.md. ### Tested ctest --test-dir build -R guest_kernel_ioctl_fionread ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Tests** * Expanded coverage for ioctl behavior involving invalid descriptors, null pointers, and nonzero values. * Added checks for the number of bytes queued on stream and datagram sockets, including after receiving data. * Added conditional IPv6 stream and datagram coverage when socket creation succeeds. * Test failure diagnostics now include the source location of the failed assertion. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
PrivacyOnion commented 2026-11-16 22:54:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T22:54:14Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 28d45453f2:

  • Conventions: tools/check_conventions.py failed.
    (pull request): error: [pr-template] Fill in the pull request template: add the '### What' heading of the template; found '## What'
    (pull request): error: [pr-template] Fill in the pull request template: add the '### Tested' heading of the template; found '## Tested'
    (pull request): error: [pr-template] Fill in the pull request template: add the '### Checklist' heading of the template
    3 findings, 3 errors; GitHub shows at most 10 error annotations, the job summary lists all
    
  • Build: guest_kernel_ioctl_fionread_tests built cleanly.
  • CTest (guest_kernel_ioctl_fionread):
    1/1 Test #5450: guest_kernel_ioctl_fionread ......Subprocess aborted***Exception:   0.58 sec
    0% tests passed, 1 tests failed out of 1
    
    The following tests FAILED:
    

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5929349381 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5929349381). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-16T22:54:14Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `28d45453f2`: - **Conventions**: `tools/check_conventions.py` failed. ``` (pull request): error: [pr-template] Fill in the pull request template: add the '### What' heading of the template; found '## What' (pull request): error: [pr-template] Fill in the pull request template: add the '### Tested' heading of the template; found '## Tested' (pull request): error: [pr-template] Fill in the pull request template: add the '### Checklist' heading of the template 3 findings, 3 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` - **Build**: `guest_kernel_ioctl_fionread_tests` built cleanly. - **CTest** (`guest_kernel_ioctl_fionread`): ``` 1/1 Test #5450: guest_kernel_ioctl_fionread ......Subprocess aborted***Exception: 0.58 sec 0% tests passed, 1 tests failed out of 1 ``` ``` The following tests FAILED: ``` Requesting changes for the points above.
MarcZX10 commented 2026-11-16 23:18:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T23:18:18Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this test-only change; the added coverage is consistent with the stated audit goals.

What I ran

Reviewed head 28d45453f2ad4cde3586ba38c72b01b695a96dd8. Read the prepared description, commit summary, manifest, diff, and the full changed test file through repo_read.py; also checked its CMake test registration and the project C++ standard. No test commands were run.

Results

Check Result Note
Diff and changed source review passed One test file reviewed
Test execution not run No test runner available
Test registration and language standard passed Test is registered; C++20 is configured

Findings

Blocking

None.

Non-blocking

  • The IPv6 FIONBIO checks silently skip when socket creation fails, so those paths can go untested on a run without IPv6 support (core/libs/tests/GuestKernelIoctlFionread.cpp:419, core/libs/tests/GuestKernelIoctlFionread.cpp:430). Consider making the skip explicit in test output or splitting them into capability-aware tests.

Not verified

The author reports running ctest --test-dir build -R guest_kernel_ioctl_fionread; this was not run during review. Runtime behavior across host operating systems and actual console behavior were not verified. No files were excluded from the prepared diff; the single changed file in the manifest was read in full.

To get this to a good state

Nothing is required. The IPv6 skip behavior is optional feedback.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5929631050 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5929631050). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T23:18:18Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this test-only change; the added coverage is consistent with the stated audit goals. ## What I ran Reviewed head `28d45453f2ad4cde3586ba38c72b01b695a96dd8`. Read the prepared description, commit summary, manifest, diff, and the full changed test file through `repo_read.py`; also checked its CMake test registration and the project C++ standard. No test commands were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed source review | passed | One test file reviewed | | Test execution | not run | No test runner available | | Test registration and language standard | passed | Test is registered; C++20 is configured | ## Findings ### Blocking None. ### Non-blocking - The IPv6 FIONBIO checks silently skip when socket creation fails, so those paths can go untested on a run without IPv6 support (`core/libs/tests/GuestKernelIoctlFionread.cpp:419`, `core/libs/tests/GuestKernelIoctlFionread.cpp:430`). Consider making the skip explicit in test output or splitting them into capability-aware tests. ## Not verified The author reports running `ctest --test-dir build -R guest_kernel_ioctl_fionread`; this was not run during review. Runtime behavior across host operating systems and actual console behavior were not verified. No files were excluded from the prepared diff; the single changed file in the manifest was read in full. ## To get this to a good state Nothing is required. The IPv6 skip behavior is optional feedback.
PrivacyOnion commented 2026-11-20 01:42:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T01:42:19Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against e22cc30d0e:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_ioctl_fionread_tests built cleanly.
  • CTest (guest_kernel_ioctl_fionread):
    1/1 Test #5886: guest_kernel_ioctl_fionread ......Subprocess aborted***Exception:   1.54 sec
    0% tests passed, 1 tests failed out of 1
    
    The following tests FAILED:
    

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5986271679 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5986271679). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-20T01:42:19Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `e22cc30d0e`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_ioctl_fionread_tests` built cleanly. - **CTest** (`guest_kernel_ioctl_fionread`): ``` 1/1 Test #5886: guest_kernel_ioctl_fionread ......Subprocess aborted***Exception: 1.54 sec 0% tests passed, 1 tests failed out of 1 ``` ``` The following tests FAILED: ``` Requesting changes for the points above.
PrivacyOnion commented 2026-11-20 01:54:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T01:54:00Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 87dbe5e2f0:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_ioctl_fionread_tests built cleanly.
  • CTest (guest_kernel_ioctl_fionread):
    1/1 Test #5886: guest_kernel_ioctl_fionread ......   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Code reading:
    • Verified ioctl FIONBIO and FIONREAD ordering on closed vs negative fd (-1) at core/libs/tests/GuestKernelIoctlFionread.cpp:132-151
    • Verified UDP datagram byte accounting with poll and partial/full recv at core/libs/tests/GuestKernelIoctlFionread.cpp:311-343
    • Verified IPv6 FIONBIO behavior and error code assertions (ENOTCONN, EWOULDBLOCK) at core/libs/tests/GuestKernelIoctlFionread.cpp:419-440
    • Verified compliance with AGENTS.md conventions, commit structure, and test cleanup
  • Concerns:
    • core/libs/tests/GuestKernelIoctlFionread.cpp:132: Inconsistent error precedence expectations between FIONBIO (expects EFAULT on closed descriptor) and FIONREAD (expects EBADF on closed descriptor) when passed a null pointer. Under BSD/FreeBSD/Orbis kernel ioctl handling (sys_ioctl), copyin/fault checks or descriptor lookup precedence must be consistent across ioctl commands taking pointer arguments. In addition, Windows runtime testing (as confirmed by maskym) causes FIONREAD with nullptr on closed fd to fail with EBADF (errno 9) whereas the test asserted EFAULT (14) in prior revisions, and conversely asserting EFAULT for FIONBIO on closed descriptor/negative descriptor (-1) conflicts with descriptor validation precedence (EBADF should precede or follow EFAULT consistently across standard ioctl parameter copyin). Passing -1 to ioctl with nullptr expecting EFAULT at lines 143-146 directly contradicts descriptor lookup occurring prior to argument copyin on invalid descriptor handles.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5986364126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5986364126). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-20T01:54:00Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `87dbe5e2f0`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_ioctl_fionread_tests` built cleanly. - **CTest** (`guest_kernel_ioctl_fionread`): ``` 1/1 Test #5886: guest_kernel_ioctl_fionread ...... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Code reading**: - Verified ioctl FIONBIO and FIONREAD ordering on closed vs negative fd (-1) at core/libs/tests/GuestKernelIoctlFionread.cpp:132-151 - Verified UDP datagram byte accounting with poll and partial/full recv at core/libs/tests/GuestKernelIoctlFionread.cpp:311-343 - Verified IPv6 FIONBIO behavior and error code assertions (ENOTCONN, EWOULDBLOCK) at core/libs/tests/GuestKernelIoctlFionread.cpp:419-440 - Verified compliance with AGENTS.md conventions, commit structure, and test cleanup - **Concerns**: - core/libs/tests/GuestKernelIoctlFionread.cpp:132: Inconsistent error precedence expectations between FIONBIO (expects EFAULT on closed descriptor) and FIONREAD (expects EBADF on closed descriptor) when passed a null pointer. Under BSD/FreeBSD/Orbis kernel ioctl handling (sys_ioctl), copyin/fault checks or descriptor lookup precedence must be consistent across ioctl commands taking pointer arguments. In addition, Windows runtime testing (as confirmed by maskym) causes FIONREAD with nullptr on closed fd to fail with EBADF (errno 9) whereas the test asserted EFAULT (14) in prior revisions, and conversely asserting EFAULT for FIONBIO on closed descriptor/negative descriptor (-1) conflicts with descriptor validation precedence (EBADF should precede or follow EFAULT consistently across standard ioctl parameter copyin). Passing -1 to ioctl with nullptr expecting EFAULT at lines 143-146 directly contradicts descriptor lookup occurring prior to argument copyin on invalid descriptor handles. Requesting changes for the points above.
MarcZX10 commented 2026-11-20 10:33:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T10:33:46Z.

Review: COMMENTED


Reviewed — comments

The added tests improve FIONREAD and FIONBIO coverage, but the IPv6 socket checks are silently skipped when socket creation fails, so the advertised IPv6 coverage is not guaranteed.

What I ran

  • Reviewed head 87dbe5e2f01e8ed145d9c9e04b50d332c5a27825; no build or test commands were run.
  • Read description.md, commits.md, manifest.json, diff.patch, and the complete changed file core/libs/tests/GuestKernelIoctlFionread.cpp through repo_read.py.

Results

Check Result Note
Source review passed Changed test file read in full
Test execution not run Author reports ctest; not independently verified

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestKernelIoctlFionread.cpp:420 and core/libs/tests/GuestKernelIoctlFionread.cpp:431: Both IPv6 test blocks run only if socket creation succeeds; on failure, the test passes without exercising either IPv6 path. Consider failing explicitly or reporting the unsupported environment, so coverage cannot be mistaken for a pass.

Not verified

  • The test was not run; its behavior on the test runtime and the reason IPv6 socket creation may fail are not verified.
  • No other changed files were listed in the manifest; files.json was not available through the review reader.

To get this to a good state

Nothing is required. Optionally make IPv6 socket creation failures visible in test output or make them fail the test.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5991246377 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5991246377). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T10:33:46Z. **Review:** COMMENTED --- # Reviewed — comments The added tests improve FIONREAD and FIONBIO coverage, but the IPv6 socket checks are silently skipped when socket creation fails, so the advertised IPv6 coverage is not guaranteed. ## What I ran - Reviewed head `87dbe5e2f01e8ed145d9c9e04b50d332c5a27825`; no build or test commands were run. - Read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and the complete changed file `core/libs/tests/GuestKernelIoctlFionread.cpp` through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Changed test file read in full | | Test execution | not run | Author reports ctest; not independently verified | ## Findings ### Blocking None. ### Non-blocking - `core/libs/tests/GuestKernelIoctlFionread.cpp:420` and `core/libs/tests/GuestKernelIoctlFionread.cpp:431`: Both IPv6 test blocks run only if socket creation succeeds; on failure, the test passes without exercising either IPv6 path. Consider failing explicitly or reporting the unsupported environment, so coverage cannot be mistaken for a pass. ## Not verified - The test was not run; its behavior on the test runtime and the reason IPv6 socket creation may fail are not verified. - No other changed files were listed in the manifest; `files.json` was not available through the review reader. ## To get this to a good state Nothing is required. Optionally make IPv6 socket creation failures visible in test output or make them fail the test.
PrivacyOnion commented 2026-11-20 20:42:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T20:42:18Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against c3c258e42e:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_ioctl_fionread_tests built cleanly.
  • CTest (guest_kernel_ioctl_fionread):
    1/1 Test #5942: guest_kernel_ioctl_fionread ......   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Code reading:
    • Audited GuestKernelIoctlFionread.cpp lines 137-155: verified EFAULT vs EBADF precedence for NonblockingRequest and ReadableRequest on closed and -1 descriptors against FreeBSD sys_ioctl behavior
    • Audited GuestKernelIoctlFionread.cpp lines 297-308: verified stream socket FIONREAD data tracking across partial recv (3 bytes) and full recv (remaining 3 bytes)
    • Audited GuestKernelIoctlFionread.cpp lines 334-366: verified UDP datagram socket FIONREAD queued datagram byte accounting with loopback sendto, poll, recvfrom, and post-drain validation
    • Audited GuestKernelIoctlFionread.cpp lines 431-433: verified large FIONBIO value (0x12345678) handling on stream socket
    • Audited GuestKernelIoctlFionread.cpp lines 442-459: verified IPv6 stream (ENOTCONN) and datagram (EWOULDBLOCK) FIONBIO and nonblocking I/O checks with explicit Require assertions
    • Verified AGENTS.md compliance: single-file modification, no forbidden comments, no memory leaks or unclosed sockets, C++20 std::source_location conformance

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5999088768 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5999088768). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-20T20:42:18Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `c3c258e42e`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_ioctl_fionread_tests` built cleanly. - **CTest** (`guest_kernel_ioctl_fionread`): ``` 1/1 Test #5942: guest_kernel_ioctl_fionread ...... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Code reading**: - Audited GuestKernelIoctlFionread.cpp lines 137-155: verified EFAULT vs EBADF precedence for NonblockingRequest and ReadableRequest on closed and -1 descriptors against FreeBSD sys_ioctl behavior - Audited GuestKernelIoctlFionread.cpp lines 297-308: verified stream socket FIONREAD data tracking across partial recv (3 bytes) and full recv (remaining 3 bytes) - Audited GuestKernelIoctlFionread.cpp lines 334-366: verified UDP datagram socket FIONREAD queued datagram byte accounting with loopback sendto, poll, recvfrom, and post-drain validation - Audited GuestKernelIoctlFionread.cpp lines 431-433: verified large FIONBIO value (0x12345678) handling on stream socket - Audited GuestKernelIoctlFionread.cpp lines 442-459: verified IPv6 stream (ENOTCONN) and datagram (EWOULDBLOCK) FIONBIO and nonblocking I/O checks with explicit Require assertions - Verified AGENTS.md compliance: single-file modification, no forbidden comments, no memory leaks or unclosed sockets, C++20 std::source_location conformance Looks Good To Me
MarcZX10 commented 2026-11-20 20:53:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T20:53:53Z.

Review: COMMENTED


Reviewed — no blocking findings

The added ioctl tests are consistent with the inspected descriptor and socket paths; the targeted test was not run in this review.

What I ran

Reviewed head c3c258e42e85e44ac2c290dc99ad71c3cbd25ecb. Read the prepared description, commits, manifest, diff, and the complete changed test source, plus targeted ioctl and socket implementation ranges. No commands or tests were run.

Results

Check Result Note
Changed test source passed Read in full
Targeted test not run No execution environment used
File inventory not run files.json was unavailable through the reader

Findings

Blocking

None.

Non-blocking

None.

Not verified

The author's reported ctest --test-dir build -R guest_kernel_ioctl_fionread was not run here. files.json and any excluded-file inventory were not accessible, so completeness against that inventory is not verified. No other changed files were listed in the available manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5999241037 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5999241037). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T20:53:53Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The added ioctl tests are consistent with the inspected descriptor and socket paths; the targeted test was not run in this review. ## What I ran Reviewed head `c3c258e42e85e44ac2c290dc99ad71c3cbd25ecb`. Read the prepared description, commits, manifest, diff, and the complete changed test source, plus targeted ioctl and socket implementation ranges. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Changed test source | passed | Read in full | | Targeted test | not run | No execution environment used | | File inventory | not run | `files.json` was unavailable through the reader | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The author's reported `ctest --test-dir build -R guest_kernel_ioctl_fionread` was not run here. `files.json` and any excluded-file inventory were not accessible, so completeness against that inventory is not verified. No other changed files were listed in the available manifest. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-20 21:57:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T21:57:53Z.

Review: APPROVED


Reviewed — looks good

The added ioctl regression cases appear internally consistent at the reviewed head; the reported test command was not run during this review.

What I ran

Reviewed head d4dd60bdfcb2cf9c875b5df71bb0ea3cc536100d. Read description.md, commits.md, manifest.json, diff.patch, and the full changed file core/libs/tests/GuestKernelIoctlFionread.cpp through repo_read.py. No build or test command was run; the test command in the PR description is author-reported.

Results

Check Result Note
Changed code review passed One changed test file reviewed
Reported ctest not run Reported by author
Negative control not run No test mutation performed

Findings

Blocking

None.

Non-blocking

None.

Not verified

The test suite was not executed, so runtime behavior is not confirmed. The review folder's excluded-file listing was unavailable; the manifest lists one included changed file.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5999939033 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-5999939033). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T21:57:53Z. **Review:** APPROVED --- # Reviewed — looks good The added ioctl regression cases appear internally consistent at the reviewed head; the reported test command was not run during this review. ## What I ran Reviewed head `d4dd60bdfcb2cf9c875b5df71bb0ea3cc536100d`. Read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and the full changed file `core/libs/tests/GuestKernelIoctlFionread.cpp` through `repo_read.py`. No build or test command was run; the test command in the PR description is author-reported. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | One changed test file reviewed | | Reported ctest | not run | Reported by author | | Negative control | not run | No test mutation performed | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The test suite was not executed, so runtime behavior is not confirmed. The review folder's excluded-file listing was unavailable; the manifest lists one included changed file. ## To get this to a good state Nothing is required.
PrivacyOnion commented 2026-11-20 22:20:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T22:20:58Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against d4dd60bdfc:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_ioctl_fionread_tests built cleanly.
  • CTest (guest_kernel_ioctl_fionread):
    1/1 Test #5949: guest_kernel_ioctl_fionread ......   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Code reading:
    • Checked closed and invalid descriptor ioctl precedence in AuditNullAndFaultPointers (lines 137-155): verified FIONBIO and FIONREAD test assertions correctly distinguish EFAULT vs EBADF semantics on closed and -1 descriptors
    • Checked partial stream recv and subsequent FIONREAD query in AuditEmptySocketReadableQuery (lines 300-311) ensuring remaining queued bytes match payloadSize - 3
    • Checked UDP datagram FIONREAD byte accounting with loopback socket pair, sendto, poll, recvfrom, and drained state verification in AuditEmptySocketReadableQuery (lines 334-366)
    • Checked IPv6 FIONBIO tests on stream and datagram sockets in AuditNonblockingModeQueries (lines 442-467) including bind to in6addr_any and error handling (EWOULDBLOCK / EINVAL)
    • Audited AGENTS.md compliance: verified conventional commit formatting, absence of illegal inline comments, and proper use of __error_nid_postfix and standard libkernel test patterns

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6000155863 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-6000155863). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-20T22:20:58Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `d4dd60bdfc`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_ioctl_fionread_tests` built cleanly. - **CTest** (`guest_kernel_ioctl_fionread`): ``` 1/1 Test #5949: guest_kernel_ioctl_fionread ...... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Code reading**: - Checked closed and invalid descriptor ioctl precedence in AuditNullAndFaultPointers (lines 137-155): verified FIONBIO and FIONREAD test assertions correctly distinguish EFAULT vs EBADF semantics on closed and -1 descriptors - Checked partial stream recv and subsequent FIONREAD query in AuditEmptySocketReadableQuery (lines 300-311) ensuring remaining queued bytes match payloadSize - 3 - Checked UDP datagram FIONREAD byte accounting with loopback socket pair, sendto, poll, recvfrom, and drained state verification in AuditEmptySocketReadableQuery (lines 334-366) - Checked IPv6 FIONBIO tests on stream and datagram sockets in AuditNonblockingModeQueries (lines 442-467) including bind to in6addr_any and error handling (EWOULDBLOCK / EINVAL) - Audited AGENTS.md compliance: verified conventional commit formatting, absence of illegal inline comments, and proper use of __error_nid_postfix and standard libkernel test patterns Looks Good To Me
PrivacyOnion commented 2026-11-23 21:03:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-23T21:03:11Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against e92a75642b:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_ioctl_fionread_tests built cleanly.
  • CTest (guest_kernel_ioctl_fionread):
    1/1 Test #6231: guest_kernel_ioctl_fionread ......   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Code reading:
    • Verified FIONREAD data tracking across partial and completed stream reads in AuditEmptySocketReadableQuery (lines 300-311) correctly checks queued byte count decrements.
    • Verified UDP datagram FIONREAD byte accounting with loopback socket pair, sendto, poll, recvfrom, and drained state verification (lines 334-366).
    • Verified error precedence tests for FIONBIO (EFAULT) and FIONREAD (EBADF) on closed and -1 file descriptors (lines 137-155).
    • Verified IPv6 FIONBIO behavior on stream and datagram sockets, nonblocking transitions, ENOTCONN on read, and EWOULDBLOCK on empty datagram recv (lines 442-467).
    • Audited AGENTS.md compliance for comments, conventional commit structure, and test conventions.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6029474121 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-6029474121). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-23T21:03:11Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `e92a75642b`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_ioctl_fionread_tests` built cleanly. - **CTest** (`guest_kernel_ioctl_fionread`): ``` 1/1 Test #6231: guest_kernel_ioctl_fionread ...... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Code reading**: - Verified FIONREAD data tracking across partial and completed stream reads in AuditEmptySocketReadableQuery (lines 300-311) correctly checks queued byte count decrements. - Verified UDP datagram FIONREAD byte accounting with loopback socket pair, sendto, poll, recvfrom, and drained state verification (lines 334-366). - Verified error precedence tests for FIONBIO (EFAULT) and FIONREAD (EBADF) on closed and -1 file descriptors (lines 137-155). - Verified IPv6 FIONBIO behavior on stream and datagram sockets, nonblocking transitions, ENOTCONN on read, and EWOULDBLOCK on empty datagram recv (lines 442-467). - Audited AGENTS.md compliance for comments, conventional commit structure, and test conventions. Looks Good To Me
MarcZX10 commented 2026-11-25 00:50:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T00:50:13Z.

Review: COMMENTED


Reviewed — comments

The test changes add useful socket and descriptor coverage, but the IPv6 checks can silently skip the behavior they are intended to verify.

What I ran

Reviewed head e92a75642b09b174ca66ee472fa2de17aa7e9b66. Read description.md, commits.md, manifest.json, diff.patch, and the full changed file core/libs/tests/GuestKernelIoctlFionread.cpp using repo_read.py. No test commands were run; the test invocation in the PR description is author-reported.

Results

Check Result Note
Changed test source passed Full changed file read
Test execution not run No local execution performed
Build and runtime behavior not verified Requires project build and test environment

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestKernelIoctlFionread.cpp:444 and core/libs/tests/GuestKernelIoctlFionread.cpp:455: Both IPv6 cases execute only when socket creation succeeds; a failure silently skips the IPv6 FIONBIO assertions. Since the stated goal is to audit FIONBIO on IPv6 stream and datagram sockets, use Require(v6Stream >= 0, ...) and Require(v6Dgram >= 0, ...) (or explicitly report an unsupported environment) so the test cannot pass without exercising those checks.

Not verified

No tests or build checks were run. No files were excluded by the manifest; it lists the single changed file as included. Runtime behavior on the target console was not confirmed.

To get this to a good state

Nothing is required. Optional: make IPv6 socket creation failures explicit so the intended assertions cannot be skipped silently.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6049849659 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-6049849659). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T00:50:13Z. **Review:** COMMENTED --- # Reviewed — comments The test changes add useful socket and descriptor coverage, but the IPv6 checks can silently skip the behavior they are intended to verify. ## What I ran Reviewed head `e92a75642b09b174ca66ee472fa2de17aa7e9b66`. Read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and the full changed file `core/libs/tests/GuestKernelIoctlFionread.cpp` using `repo_read.py`. No test commands were run; the test invocation in the PR description is author-reported. ## Results | Check | Result | Note | |---|---|---| | Changed test source | passed | Full changed file read | | Test execution | not run | No local execution performed | | Build and runtime behavior | not verified | Requires project build and test environment | ## Findings ### Blocking None. ### Non-blocking - `core/libs/tests/GuestKernelIoctlFionread.cpp:444` and `core/libs/tests/GuestKernelIoctlFionread.cpp:455`: Both IPv6 cases execute only when socket creation succeeds; a failure silently skips the IPv6 FIONBIO assertions. Since the stated goal is to audit FIONBIO on IPv6 stream and datagram sockets, use `Require(v6Stream >= 0, ...)` and `Require(v6Dgram >= 0, ...)` (or explicitly report an unsupported environment) so the test cannot pass without exercising those checks. ## Not verified No tests or build checks were run. No files were excluded by the manifest; it lists the single changed file as included. Runtime behavior on the target console was not confirmed. ## To get this to a good state Nothing is required. Optional: make IPv6 socket creation failures explicit so the intended assertions cannot be skipped silently.
MarcZX10 commented 2026-11-26 23:49:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T23:49:53Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing in the inspected test changes shows a defect that blocks merging.

What I ran

Read the prepared diff and the complete changed test file at head a395e08c7295b68bd47c192a42977e47d6ae1971. I did not run commands or tests; repo_read.py was unavailable as a shell command.

Results

Check Result Note
Source review passed One changed test file read
Tests not run No executable environment available

Findings

Blocking

None.

Non-blocking

None.

Not verified

The prepared artifacts list one changed file and include its full text, which I read. files.json was not available through the reader, so the reviewed list could not be independently checked. The described ctest run was author-reported; I did not run it. Runtime behavior on the console and whether IPv6 socket creation succeeds on supported systems were not verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6081679159 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21929#pullrequestreview-6081679159). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-26T23:49:53Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing in the inspected test changes shows a defect that blocks merging. ## What I ran Read the prepared diff and the complete changed test file at head `a395e08c7295b68bd47c192a42977e47d6ae1971`. I did not run commands or tests; `repo_read.py` was unavailable as a shell command. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | One changed test file read | | Tests | not run | No executable environment available | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The prepared artifacts list one changed file and include its full text, which I read. `files.json` was not available through the reader, so the `reviewed` list could not be independently checked. The described `ctest` run was author-reported; I did not run it. Runtime behavior on the console and whether IPv6 socket creation succeeds on supported systems were not verified. ## 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!21929
No description provided.