test(libSceRudp): cover empty poll wait behavior #10954

Merged
AZLisme merged 2 commits from upstream-pr/10954 into main 2026-10-26 19:35:27 +00:00
AZLisme commented 2026-10-25 11:20:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AZLisme on 2026-10-25T11:20:46Z.


What

Add focused regressions for empty sceRudpPollWait calls: argument precedence, zero/finite timeouts, an infinite wait that remains blocked until destruction, untouched event output, and empty polls after removing or terminating their context. Production Export.cpp and the existing nonempty-poll fixture match main unchanged.

The contract is the firmware 13.42 execution report: it executes the firmware library under emulation with imported primitives stubbed. It reports waiting for the remaining timeout, which agrees with main and contradicts Vita3K’s immediate empty return. This is reported firmware-library evidence; it has not been independently reproduced here or measured on console hardware.

The debt entry records that disagreement and the incomplete cancellation implementation. The detailed 13.42 report also supplies the signed 32-bit Cancel argument/basic errors, two idle cancels coalescing per poll, zero-timeout consumption, scripted two-waiter Cancel/Destroy broadcasts and drain, and End during an active wait. These are now recorded as reported emulated-library observations rather than unanswered questions. Cancel still throws, and the host Destroy/End waiter results and missing drain are not fixed here. Real-kernel wake/timeout races and unprobed simultaneous controls remain qualified. @harisibrar1 owns the separate PollCancel follow-up; this PR changes neither its implementation nor its API.

Agreed merge order: this PR first, then #10993, as confirmed with its author. This PR has no predecessor; #10993 declares this PR in Depends on and will preserve both adjacent debt edits on its rebase.

The PollCancel follow-up #11294 also declares this PR first and will retain the remaining Destroy/End debt after rebasing. This PR still has no predecessor; neither #10993 nor #11294 is part of the CI composition below.

Tested

Maintainer-dispatched Build run 40355767067, attempt 1 completed successfully: six jobs succeeded and two were skipped, eight jobs total. Its tested composition is base 518d36eaec0ac37870a17b465bedb5551be91b42 with the ordered inputs #11138 at b732c0c75d1869d432c6463583b8a29d521e8f8f, #10913 at 294ab651deabaa45146d16341a77f19378807160, #10916 at e75ee1d1e175d6b2d51171385ecab0d460d05236, #10936 at 0d14468ccc1b1186b60b1fc85c802ace1594ca23 and this PR at ef9a48c6ec715bbd917dcb3f64ab7dfd7f1cdb12. Linux and Windows logs verify every fetched input head before the five ordered CI merges, followed by normal root Release builds and CTests. This is composite CI evidence; it does not establish actual PR merges or a new dependency order.

Linux job 121687778237, GCC 13.3.0: 2,298 passed, 93 expected skips, zero failed out of 2,391. Windows job 121687778345, WinLibs GCC 15.2.0 r7: 1,681 passed, 815 expected skips, zero failed out of 2,496. Both platforms passed all six RUDP cases: guest_rudp_status, guest_rudp_context_queries, guest_rudp_pump, guest_rudp_context_lifecycle, guest_rudp_poll and guest_rudp_empty_poll. Both also passed public_headers, all 64 header compilation batches and patched_libraries. Each skip-policy check accepted the stated skips; they remain untested paths, not passes. Actual RUDP source, PRX link/NID patching and the new fixture are present in both product builds; compiler caches were used, so no every-object-fresh build is claimed.

The two macOS relinker jobs and relinker-ASAN job succeeded in metadata; their logs were not audited here and do not establish native macOS RUDP product or library-ASAN coverage. The register-context and write-watch jobs were skipped. No compiled binary hashes, console/title execution, standalone-head or newer-main validation is claimed. #10913 was included only in the CI union; this does not establish its real merge or validate our separate HEVC PR #10959. The cancellation and Destroy/End mismatches described above remain unresolved by this regression PR.

Earlier local, contributor Windows and private-integration evidence below retains its original head, base and environment scopes.

Documentation-only follow-up head: ef9a48c6ec715bbd917dcb3f64ab7dfd7f1cdb12. Only one debt paragraph changed from the tested 503a0efb3a source; all runtime, test and build inputs are byte-identical. Conventions and whitespace checks pass again. Runtime tests were not rerun for this documentation edit; the qualified Linux and independent Windows evidence below remains attributed to its exact tested revisions.

Exact revised head: 503a0efb3a57ed5997b90357d9b3c78e865ee7e7. Linux x86-64, GCC 16.2.1, Release, BUILD_TESTING=ON, based on e05ba6feebd000cfc316c1d1f00e37e030aa3d8b. Built the actual RUDP CMake target and passed all 6/6 focused runtime tests, including the new empty-poll fixture. Public-header audit/compilation, conventions and whitespace checks pass. Linux libc/kernel dependencies were reused only after verifying that their Linux build inputs were unchanged from the prior qualified build; the intervening mapping-header change is Windows-only.

A runtime negative control builds the previously published immediate-return implementation and fails the new fixture’s finite-timeout check. The passing run uses main’s production behavior; these are regression results, not a performance claim. The existing nonempty-poll fixture is unchanged.

The previously tested private combined resolution with #10993 preserves the poll/cancellation gaps and all of its setter/getter/unresolved-export changes. The new paragraph only refines the reported observations; it adds no runtime behavior or new combined-tree runtime claim. No AppContent test coverage is claimed.

Author-run Windows/macOS runtime, console execution and a monolithic repository build were not run for this revision; independent Windows validation is attributed below. The previously reported Windows run on the old fast-return head does not validate the new fixture. Existing cancellation mismatches remain debt and are not asserted as corrected by these tests.
An independent exact revised-head Windows report covers 503a0efb3a merged onto main d2b3ee3bcc, Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7, Release. Both guest_rudp_empty_poll and guest_rudp_poll passed two repeated runs, and the new empty-poll fixture passed ten repeated runs. The only reported build warning was an existing main signal declaration. No Windows negative control was run. This is reviewer-reported native Windows evidence, separate from the Linux source-control experiment and from hosted product CI.

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:5004244275 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10954). Originally posted by [AZLisme](https://github.com/AZLisme) on 2026-10-25T11:20:46Z. --- ### What Add focused regressions for empty `sceRudpPollWait` calls: argument precedence, zero/finite timeouts, an infinite wait that remains blocked until destruction, untouched event output, and empty polls after removing or terminating their context. Production `Export.cpp` and the existing nonempty-poll fixture match main unchanged. The contract is the [firmware 13.42 execution report](https://github.com/boykopovar/AnyPS5/pull/10954#issuecomment-6398457761): it executes the firmware library under emulation with imported primitives stubbed. It reports waiting for the remaining timeout, which agrees with main and contradicts Vita3K’s immediate empty return. This is reported firmware-library evidence; it has not been independently reproduced here or measured on console hardware. The debt entry records that disagreement and the incomplete cancellation implementation. The [detailed 13.42 report](https://github.com/boykopovar/AnyPS5/pull/10954#issuecomment-6399054346) also supplies the signed 32-bit Cancel argument/basic errors, two idle cancels coalescing per poll, zero-timeout consumption, scripted two-waiter Cancel/Destroy broadcasts and drain, and End during an active wait. These are now recorded as reported emulated-library observations rather than unanswered questions. Cancel still throws, and the host Destroy/End waiter results and missing drain are not fixed here. Real-kernel wake/timeout races and unprobed simultaneous controls remain qualified. [@harisibrar1 owns the separate PollCancel follow-up](https://github.com/boykopovar/AnyPS5/pull/10954#issuecomment-6399603313); this PR changes neither its implementation nor its API. Agreed merge order: this PR first, then #10993, as [confirmed with its author](https://github.com/boykopovar/AnyPS5/pull/10954#issuecomment-6398636196). This PR has no predecessor; #10993 declares this PR in Depends on and will preserve both adjacent debt edits on its rebase. The [PollCancel follow-up #11294](https://github.com/boykopovar/AnyPS5/pull/11294) also declares this PR first and will retain the remaining Destroy/End debt after rebasing. This PR still has no predecessor; neither #10993 nor #11294 is part of the CI composition below. ### Tested Maintainer-dispatched [Build run 40355767067, attempt 1](https://github.com/boykopovar/AnyPS5/actions/runs/40355767067) completed successfully: **six jobs succeeded and two were skipped**, eight jobs total. Its tested composition is base `518d36eaec0ac37870a17b465bedb5551be91b42` with the ordered inputs #11138 at `b732c0c75d1869d432c6463583b8a29d521e8f8f`, #10913 at `294ab651deabaa45146d16341a77f19378807160`, #10916 at `e75ee1d1e175d6b2d51171385ecab0d460d05236`, #10936 at `0d14468ccc1b1186b60b1fc85c802ace1594ca23` and this PR at `ef9a48c6ec715bbd917dcb3f64ab7dfd7f1cdb12`. Linux and Windows logs verify every fetched input head before the five ordered CI merges, followed by normal root Release builds and CTests. This is composite CI evidence; it does not establish actual PR merges or a new dependency order. [Linux job 121687778237](https://github.com/boykopovar/AnyPS5/actions/runs/40355767067/job/121687778237), GCC 13.3.0: **2,298 passed, 93 expected skips, zero failed** out of 2,391. [Windows job 121687778345](https://github.com/boykopovar/AnyPS5/actions/runs/40355767067/job/121687778345), WinLibs GCC 15.2.0 r7: **1,681 passed, 815 expected skips, zero failed** out of 2,496. Both platforms passed all six RUDP cases: `guest_rudp_status`, `guest_rudp_context_queries`, `guest_rudp_pump`, `guest_rudp_context_lifecycle`, `guest_rudp_poll` and `guest_rudp_empty_poll`. Both also passed `public_headers`, all 64 header compilation batches and `patched_libraries`. Each skip-policy check accepted the stated skips; they remain untested paths, not passes. Actual RUDP source, PRX link/NID patching and the new fixture are present in both product builds; compiler caches were used, so no every-object-fresh build is claimed. The two macOS relinker jobs and relinker-ASAN job succeeded in metadata; their logs were not audited here and do not establish native macOS RUDP product or library-ASAN coverage. The register-context and write-watch jobs were skipped. No compiled binary hashes, console/title execution, standalone-head or newer-main validation is claimed. #10913 was included only in the CI union; this does not establish its real merge or validate our separate HEVC PR #10959. The cancellation and Destroy/End mismatches described above remain unresolved by this regression PR. Earlier local, contributor Windows and private-integration evidence below retains its original head, base and environment scopes. Documentation-only follow-up head: `ef9a48c6ec715bbd917dcb3f64ab7dfd7f1cdb12`. Only one debt paragraph changed from the tested `503a0efb3a` source; all runtime, test and build inputs are byte-identical. Conventions and whitespace checks pass again. Runtime tests were not rerun for this documentation edit; the qualified Linux and independent Windows evidence below remains attributed to its exact tested revisions. Exact revised head: `503a0efb3a57ed5997b90357d9b3c78e865ee7e7`. Linux x86-64, GCC 16.2.1, Release, `BUILD_TESTING=ON`, based on `e05ba6feebd000cfc316c1d1f00e37e030aa3d8b`. Built the actual RUDP CMake target and passed all **6/6** focused runtime tests, including the new empty-poll fixture. Public-header audit/compilation, conventions and whitespace checks pass. Linux libc/kernel dependencies were reused only after verifying that their Linux build inputs were unchanged from the prior qualified build; the intervening mapping-header change is Windows-only. A runtime negative control builds the previously published immediate-return implementation and fails the new fixture’s finite-timeout check. The passing run uses main’s production behavior; these are regression results, not a performance claim. The existing nonempty-poll fixture is unchanged. The previously tested private combined resolution with #10993 preserves the poll/cancellation gaps and all of its setter/getter/unresolved-export changes. The new paragraph only refines the reported observations; it adds no runtime behavior or new combined-tree runtime claim. No AppContent test coverage is claimed. Author-run Windows/macOS runtime, console execution and a monolithic repository build were not run for this revision; independent Windows validation is attributed below. The previously reported Windows run on the old fast-return head does not validate the new fixture. Existing cancellation mismatches remain debt and are not asserted as corrected by these tests. An independent [exact revised-head Windows report](https://github.com/boykopovar/AnyPS5/pull/10954#issuecomment-6399720693) covers `503a0efb3a` merged onto main `d2b3ee3bcc`, Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7, Release. Both `guest_rudp_empty_poll` and `guest_rudp_poll` passed two repeated runs, and the new empty-poll fixture passed ten repeated runs. The only reported build warning was an existing main signal declaration. No Windows negative control was run. This is reviewer-reported native Windows evidence, separate from the Linux source-control experiment and from hosted product CI. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### 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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-10-25 11:38:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T11:38:01Z.

Review: APPROVED


The empty-entry fast path follows argument and poll-ID validation while g_mutex is held, so the check is atomic with poll mutations. It returns before waiting, leaves the event buffer untouched, and does not alter the existing nonempty timeout/destruction path. The new tests cover zero, finite, and infinite timeouts plus transitions back to an empty poll after removal and context termination. The PR reports 5/5 focused Linux runtime tests and an unchanged-main comparison; I did not rerun those tests here. Conventions and whitespace checks pass, and the implementation looks correct within the explicitly documented Vita-derived behavior.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643003542 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10954#pullrequestreview-5643003542). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T11:38:01Z. **Review:** APPROVED --- The empty-entry fast path follows argument and poll-ID validation while `g_mutex` is held, so the check is atomic with poll mutations. It returns before waiting, leaves the event buffer untouched, and does not alter the existing nonempty timeout/destruction path. The new tests cover zero, finite, and infinite timeouts plus transitions back to an empty poll after removal and context termination. The PR reports 5/5 focused Linux runtime tests and an unchanged-main comparison; I did not rerun those tests here. Conventions and whitespace checks pass, and the implementation looks correct within the explicitly documented Vita-derived behavior.
thepoppfish commented 2026-10-25 11:49:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thepoppfish on 2026-10-25T11:49:24Z.

Review: APPROVED


Reviewed exact head 4f23c6a34a8cdac7d61046cefeea89118050d17d; no blocking findings. This adds native Windows runtime evidence to the existing source review and author's Linux results.

Windows 11 build 26200, MSYS2 UCRT64 GCC 16.2.0-6, CMake 4.3.1, Ninja 1.13.2, Release, no LTO:

  • Built the complete changed libSceRudp DLL through its actual library CMake, including actual Time/TimedWait.cpp; ran the complete unmodified GuestRudpStatus.cpp, GuestRudpContextQueries.cpp, GuestRudpPump.cpp, GuestRudpContextLifecycle.cpp and GuestRudpPoll.cpp across the DLL boundary.
  • 5/5 tests pass, 0.46 s total. The poll fixture passes in 0.19 s, including its Windows-only nonempty 100/1000-us wait assertions, empty zero/finite/infinite waits, output sentinels, validation precedence, empty-after-removal/termination, and the retained nonempty timeout/destroy/end checks.
  • Runtime negative control: with only Export.cpp restored from base 63a863d3b07f2457ee1210f1abba1c11409cdff5, keeping the submitted poll fixture and same timed-wait/support code, the library and test build successfully but the poll test fails in 2.06 s. It reaches the bounded old empty-wait behavior rather than failing to compile/link. No timeout was raised.
  • Conventions and whitespace pass against fetched main 16ff208dc32cf3927ba1bae492eee363a5ae7ae8. Tree-only merge is clean (tree 8537cd8734165f176dc25bfb2a1f716720305b14); no merged-tree test run claimed.

The isolated parent harness uses exact production test/unwind helpers and WindowsTestExit.cpp. Its sole runtime adapter is NotImplemented_nid_no_patch with General.cpp's runtime_error body, plus disabling Windows crash-report UI for the expected failing control. No poll, context, mutex, timer, wait, cancellation or callback behavior is replaced. Full libc/kernel and NID-patched artifacts were not built or executed.

I also checked the early empty-entry return in the pinned Vita implementation. As documented, this is Vita implementation evidence, not console verification. The debt still identifies PS5 semantics and removal of the final entry during an existing wait as unverified. No PS5/title/network-traffic/GPU run, full product/runtime, Linux/macOS run or hosted workflow claim. Local wait durations are fixture results, not a speed claim. Author checkout remains clean and unchanged. AI-assisted review/testing: yes, OpenAI Codex.

Windows native replay

Save these files outside the pinned checkout. Extract its unchanged add_test_executable function from top-level CMakeLists.txt and configure_windows_unwind from core/libs/CMakeLists.txt into ProductionHelpers.cmake. Keep the GCC runtime DLL directory on PATH.

cmake -S <harness> -B <harness>/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DRUDP_REPO=<checkout>
cmake --build <harness>/build --target rudp_status rudp_contextqueries rudp_pump rudp_contextlifecycle rudp_poll
ctest --test-dir <harness>/build --output-on-failure -V

For the negative control, save git show 63a863d3b07f2457ee1210f1abba1c11409cdff5:core/libs/prx/libSceRudp/Export.cpp outside the checkout. Configure a separate build with -DRUDP_SOURCE_OVERRIDE=<baseline.cpp>, build rudp_poll, and run ctest -R ^rudp_poll$ --output-on-failure -V there. It should fail the submitted regression; the other setup is identical.

CMakeLists.txt

cmake_minimum_required(VERSION 3.20)
project(RudpPollReview LANGUAGES CXX)
enable_testing()
set(CMAKE_CXX_STANDARD 20)
get_filename_component(RUDP_DEFAULT_REPO "${CMAKE_CURRENT_SOURCE_DIR}/../review-10954" ABSOLUTE)
set(RUDP_REPO "${RUDP_DEFAULT_REPO}" CACHE PATH "Exact PR checkout")
set(LIBS_INCLUDE_DIR "${RUDP_REPO}/core/libs")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(ANYPS5_TEST_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
include("${CMAKE_CURRENT_SOURCE_DIR}/ProductionHelpers.cmake")
add_library(anyps5_windows_test_exit OBJECT "${RUDP_REPO}/cmake/WindowsTestExit.cpp")
add_subdirectory("${RUDP_REPO}/core/libs/prx/libSceRudp" rudp)
set(RUDP_SOURCE_OVERRIDE "" CACHE FILEPATH "Optional scratch baseline/control source")
if(RUDP_SOURCE_OVERRIDE)
    get_target_property(RUDP_SOURCES libSceRudp SOURCES)
    list(REMOVE_ITEM RUDP_SOURCES "${RUDP_REPO}/core/libs/prx/libSceRudp/Export.cpp")
    set_property(TARGET libSceRudp PROPERTY SOURCES ${RUDP_SOURCES} "${RUDP_SOURCE_OVERRIDE}")
endif()
target_sources(libSceRudp PRIVATE Support.cpp)
set_target_properties(libSceRudp PROPERTIES PREFIX "" SUFFIX ".prx")
foreach(kind Status ContextQueries Pump ContextLifecycle Poll)
    string(TOLOWER "${kind}" test_kind)
    set(test_name "rudp_${test_kind}")
    add_test_executable(${test_name} "${RUDP_REPO}/core/libs/tests/GuestRudp${kind}.cpp")
    target_include_directories(${test_name} PRIVATE "${LIBS_INCLUDE_DIR}")
    target_link_libraries(${test_name} PRIVATE libSceRudp)
    configure_windows_unwind(${test_name})
    add_test(NAME ${test_name} COMMAND ${test_name})
    set_tests_properties(${test_name} PROPERTIES TIMEOUT 20 ENVIRONMENT_MODIFICATION
        "PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceRudp>")
endforeach()

Support.cpp

#include "prx/libc/include/General.hpp"
#include <cstdlib>
#include <stdexcept>
#include <string>
#include <windows.h>

namespace {
const int suppressCrashUi = [] {
    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
    _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
    return 0;
}();
}

extern "C" [[noreturn]] void NotImplemented_nid_no_patch(const char* name) {
    throw std::runtime_error(std::string(name) + " not implemented");
}

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643069417 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10954#pullrequestreview-5643069417). Originally posted by [thepoppfish](https://github.com/thepoppfish) on 2026-10-25T11:49:24Z. **Review:** APPROVED --- Reviewed exact head `4f23c6a34a8cdac7d61046cefeea89118050d17d`; no blocking findings. This adds native Windows runtime evidence to the existing source review and author's Linux results. Windows 11 build 26200, MSYS2 UCRT64 GCC 16.2.0-6, CMake 4.3.1, Ninja 1.13.2, Release, no LTO: - Built the complete changed `libSceRudp` DLL through its actual library CMake, including actual `Time/TimedWait.cpp`; ran the complete unmodified `GuestRudpStatus.cpp`, `GuestRudpContextQueries.cpp`, `GuestRudpPump.cpp`, `GuestRudpContextLifecycle.cpp` and `GuestRudpPoll.cpp` across the DLL boundary. - **5/5 tests pass**, 0.46 s total. The poll fixture passes in 0.19 s, including its Windows-only nonempty 100/1000-us wait assertions, empty zero/finite/infinite waits, output sentinels, validation precedence, empty-after-removal/termination, and the retained nonempty timeout/destroy/end checks. - Runtime negative control: with only `Export.cpp` restored from base `63a863d3b07f2457ee1210f1abba1c11409cdff5`, keeping the submitted poll fixture and same timed-wait/support code, the library and test build successfully but the poll test fails in 2.06 s. It reaches the bounded old empty-wait behavior rather than failing to compile/link. No timeout was raised. - Conventions and whitespace pass against fetched main `16ff208dc32cf3927ba1bae492eee363a5ae7ae8`. Tree-only merge is clean (tree `8537cd8734165f176dc25bfb2a1f716720305b14`); no merged-tree test run claimed. The isolated parent harness uses exact production test/unwind helpers and `WindowsTestExit.cpp`. Its sole runtime adapter is `NotImplemented_nid_no_patch` with `General.cpp`'s runtime_error body, plus disabling Windows crash-report UI for the expected failing control. No poll, context, mutex, timer, wait, cancellation or callback behavior is replaced. Full libc/kernel and NID-patched artifacts were not built or executed. I also checked the early empty-entry return in the [pinned Vita implementation](https://github.com/AndnixSH/Vita3K-PS-Vita-OS-Fork/blob/c86ac732bc811057e690bed280c5076bdf95385e/vita3k/modules/SceRudp/SceLibRudp.cpp#L1327-L1334). As documented, this is Vita implementation evidence, not console verification. The debt still identifies PS5 semantics and removal of the final entry during an existing wait as unverified. No PS5/title/network-traffic/GPU run, full product/runtime, Linux/macOS run or hosted workflow claim. Local wait durations are fixture results, not a speed claim. Author checkout remains clean and unchanged. AI-assisted review/testing: yes, OpenAI Codex. <details><summary>Windows native replay</summary> Save these files outside the pinned checkout. Extract its unchanged `add_test_executable` function from top-level `CMakeLists.txt` and `configure_windows_unwind` from `core/libs/CMakeLists.txt` into `ProductionHelpers.cmake`. Keep the GCC runtime DLL directory on PATH. ```text cmake -S <harness> -B <harness>/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DRUDP_REPO=<checkout> cmake --build <harness>/build --target rudp_status rudp_contextqueries rudp_pump rudp_contextlifecycle rudp_poll ctest --test-dir <harness>/build --output-on-failure -V ``` For the negative control, save `git show 63a863d3b07f2457ee1210f1abba1c11409cdff5:core/libs/prx/libSceRudp/Export.cpp` outside the checkout. Configure a separate build with `-DRUDP_SOURCE_OVERRIDE=<baseline.cpp>`, build `rudp_poll`, and run `ctest -R ^rudp_poll$ --output-on-failure -V` there. It should fail the submitted regression; the other setup is identical. `CMakeLists.txt` ```cmake cmake_minimum_required(VERSION 3.20) project(RudpPollReview LANGUAGES CXX) enable_testing() set(CMAKE_CXX_STANDARD 20) get_filename_component(RUDP_DEFAULT_REPO "${CMAKE_CURRENT_SOURCE_DIR}/../review-10954" ABSOLUTE) set(RUDP_REPO "${RUDP_DEFAULT_REPO}" CACHE PATH "Exact PR checkout") set(LIBS_INCLUDE_DIR "${RUDP_REPO}/core/libs") set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(ANYPS5_TEST_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests") include("${CMAKE_CURRENT_SOURCE_DIR}/ProductionHelpers.cmake") add_library(anyps5_windows_test_exit OBJECT "${RUDP_REPO}/cmake/WindowsTestExit.cpp") add_subdirectory("${RUDP_REPO}/core/libs/prx/libSceRudp" rudp) set(RUDP_SOURCE_OVERRIDE "" CACHE FILEPATH "Optional scratch baseline/control source") if(RUDP_SOURCE_OVERRIDE) get_target_property(RUDP_SOURCES libSceRudp SOURCES) list(REMOVE_ITEM RUDP_SOURCES "${RUDP_REPO}/core/libs/prx/libSceRudp/Export.cpp") set_property(TARGET libSceRudp PROPERTY SOURCES ${RUDP_SOURCES} "${RUDP_SOURCE_OVERRIDE}") endif() target_sources(libSceRudp PRIVATE Support.cpp) set_target_properties(libSceRudp PROPERTIES PREFIX "" SUFFIX ".prx") foreach(kind Status ContextQueries Pump ContextLifecycle Poll) string(TOLOWER "${kind}" test_kind) set(test_name "rudp_${test_kind}") add_test_executable(${test_name} "${RUDP_REPO}/core/libs/tests/GuestRudp${kind}.cpp") target_include_directories(${test_name} PRIVATE "${LIBS_INCLUDE_DIR}") target_link_libraries(${test_name} PRIVATE libSceRudp) configure_windows_unwind(${test_name}) add_test(NAME ${test_name} COMMAND ${test_name}) set_tests_properties(${test_name} PROPERTIES TIMEOUT 20 ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceRudp>") endforeach() ``` `Support.cpp` ```cpp #include "prx/libc/include/General.hpp" #include <cstdlib> #include <stdexcept> #include <string> #include <windows.h> namespace { const int suppressCrashUi = [] { SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); return 0; }(); } extern "C" [[noreturn]] void NotImplemented_nid_no_patch(const char* name) { throw std::runtime_error(std::string(name) + " not implemented"); } ``` </details>
MarcZX10 commented 2026-10-25 13:33:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T13:33:24Z.

Review: CHANGES_REQUESTED


I rechecked the overlap report against the current exact heads of this PR and #10993. git merge-tree --write-tree --name-only refs/remotes/review/pr-10954 refs/remotes/review/pr-10993 reports a content conflict in docs/dev/debt/libSceRudp.md; #10993 removes sceRudpSetMaxSegmentSize from the unresolved-export entry while this PR edits the adjacent sceRudpPollWait entry. These are separate implementations, but the current heads cannot be combined cleanly.

Please coordinate the landing order with #10993's author and record the agreed Depends on ordering, then rebase/resolve the debt-file conflict so both entries are preserved. The implementation review and tests previously assessed for this PR remain unchanged; this request is for the newly confirmed integration conflict.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643409182 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10954#pullrequestreview-5643409182). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T13:33:24Z. **Review:** CHANGES_REQUESTED --- I rechecked the overlap report against the current exact heads of this PR and #10993. `git merge-tree --write-tree --name-only refs/remotes/review/pr-10954 refs/remotes/review/pr-10993` reports a content conflict in `docs/dev/debt/libSceRudp.md`; #10993 removes `sceRudpSetMaxSegmentSize` from the unresolved-export entry while this PR edits the adjacent `sceRudpPollWait` entry. These are separate implementations, but the current heads cannot be combined cleanly. Please coordinate the landing order with #10993's author and record the agreed `Depends on` ordering, then rebase/resolve the debt-file conflict so both entries are preserved. The implementation review and tests previously assessed for this PR remain unchanged; this request is for the newly confirmed integration conflict.
MarcZX10 commented 2026-10-25 13:55:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T13:55:51Z.

Review: CHANGES_REQUESTED


I found a material conflict between this PR’s stated behavior and the firmware 13.42 evidence newly posted on this PR. The current change returns immediately when poll->second.entries.empty(), based on Vita3K, and its debt note now treats that as the expected behavior. BunnyFl’s report in the issue thread describes running the PS5 sceRudpPollWait implementation with imported primitives stubbed: an empty poll waits for the remaining timeout, returns zero with the event buffer untouched on timeout, and returns 0x80770014 when canceled or destroyed while waiting. This directly contradicts the early return that this PR adds.

Please reconcile the implementation and regression expectations with that PS5-specific evidence before merging. At minimum, retain the wait behavior unless there is stronger evidence that the observed firmware/build differs from the target contract; update the debt note so the Vita-derived behavior is not presented as PS5-equivalent. The existing fixture results only verify the chosen implementation against its own expectations, not this firmware behavior.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643546358 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10954#pullrequestreview-5643546358). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T13:55:51Z. **Review:** CHANGES_REQUESTED --- I found a material conflict between this PR’s stated behavior and the firmware 13.42 evidence newly posted on this PR. The current change returns immediately when `poll->second.entries.empty()`, based on Vita3K, and its debt note now treats that as the expected behavior. BunnyFl’s report in the issue thread describes running the PS5 `sceRudpPollWait` implementation with imported primitives stubbed: an empty poll waits for the remaining timeout, returns zero with the event buffer untouched on timeout, and returns `0x80770014` when canceled or destroyed while waiting. This directly contradicts the early return that this PR adds. Please reconcile the implementation and regression expectations with that PS5-specific evidence before merging. At minimum, retain the wait behavior unless there is stronger evidence that the observed firmware/build differs from the target contract; update the debt note so the Vita-derived behavior is not presented as PS5-equivalent. The existing fixture results only verify the chosen implementation against its own expectations, not this firmware behavior.
MarcZX10 commented 2026-10-25 14:23:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T14:23:02Z.

Review: APPROVED


Reviewed revised head 503a0efb3a. The PR now adds focused empty-poll regressions and a debt update; production and the prior nonempty-poll fixture are unchanged from main. The firmware 13.42 report is clearly labeled as emulated library execution with stubbed imports, not console measurement, and the documentation preserves the unresolved cancel/destroy behavior separately.\n\nChecks I ran: and pass; the new C++ test translation unit passes . I could not run the linked library test locally: CMake configuration stops because this environment lacks the SDL2 submodule and XRandR development support. The hosted Linux product test is skipped; the PR reports 6/6 focused tests on the author's Linux build, which I have not independently reproduced.\n\nThe infinite-wait test uses a short 20 ms observation window after a pre-call start signal, so it is a timing-based check, but it is a reasonable regression guard alongside the finite-timeout cases. The agreed merge order with #10993 is documented in both PRs.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643649145 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10954#pullrequestreview-5643649145). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T14:23:02Z. **Review:** APPROVED --- Reviewed revised head 503a0efb3a57ed5997b90357d9b3c78e865ee7e7. The PR now adds focused empty-poll regressions and a debt update; production and the prior nonempty-poll fixture are unchanged from main. The firmware 13.42 report is clearly labeled as emulated library execution with stubbed imports, not console measurement, and the documentation preserves the unresolved cancel/destroy behavior separately.\n\nChecks I ran: and pass; the new C++ test translation unit passes . I could not run the linked library test locally: CMake configuration stops because this environment lacks the SDL2 submodule and XRandR development support. The hosted Linux product test is skipped; the PR reports 6/6 focused tests on the author's Linux build, which I have not independently reproduced.\n\nThe infinite-wait test uses a short 20 ms observation window after a pre-call start signal, so it is a timing-based check, but it is a reasonable regression guard alongside the finite-timeout cases. The agreed merge order with #10993 is documented in both PRs.
MarcZX10 commented 2026-10-25 14:23:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T14:23:38Z.

Review: APPROVED


Reviewed revised head 503a0efb3a. The PR now adds focused empty-poll regressions and a debt update; production Export.cpp and the prior nonempty-poll fixture are unchanged from main. The firmware 13.42 report is clearly labeled as emulated library execution with stubbed imports, not console measurement, and the documentation preserves the unresolved cancel/destroy behavior separately.

Checks I ran: git diff --check and tools/check_conventions.py pass; the new C++ test translation unit passes g++ -std=c++20 -fsyntax-only. I could not run the linked library test locally: CMake configuration stops because this environment lacks the SDL2 submodule and XRandR development support. The hosted Linux product test is skipped; the PR reports 6/6 focused tests on the author's Linux build, which I have not independently reproduced.

The infinite-wait test uses a short 20 ms observation window after a pre-call start signal, so it is a timing-based check, but it is a reasonable regression guard alongside the finite-timeout cases. The agreed merge order with #10993 is documented in both PRs.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643650962 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10954#pullrequestreview-5643650962). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T14:23:38Z. **Review:** APPROVED --- Reviewed revised head 503a0efb3a57ed5997b90357d9b3c78e865ee7e7. The PR now adds focused empty-poll regressions and a debt update; production `Export.cpp` and the prior nonempty-poll fixture are unchanged from main. The firmware 13.42 report is clearly labeled as emulated library execution with stubbed imports, not console measurement, and the documentation preserves the unresolved cancel/destroy behavior separately. Checks I ran: `git diff --check` and `tools/check_conventions.py` pass; the new C++ test translation unit passes `g++ -std=c++20 -fsyntax-only`. I could not run the linked library test locally: CMake configuration stops because this environment lacks the SDL2 submodule and XRandR development support. The hosted Linux product test is skipped; the PR reports 6/6 focused tests on the author's Linux build, which I have not independently reproduced. The infinite-wait test uses a short 20 ms observation window after a pre-call start signal, so it is a timing-based check, but it is a reasonable regression guard alongside the finite-timeout cases. The agreed merge order with #10993 is documented in both PRs.
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!10954
No description provided.