The conflict in core/libs/tests/GuestRudpContextLifecycle.cpp with #13799 keeps both changes: this branch's removal of the check that sceRudpActivate throws, and main's sceRudpBind(ctx, 5, 0, 2) call after it.
sceRudpGetContextStatus refuses a negative id, a null status and a size
outside 1 to 0x30 with 0x80770004 before it looks the id up, and writes
the idle block with 0xFFFFFFFF at bytes 4-7, as firmware 10.71 and 13.42
readings show. sceRudpCreateContext checks initialization before its null
id pointer.
sceRudpBind takes the socket id, virtual port and mux mode and checks
them; mux mode 2 with vport 0 takes 0x2711 and on from a per-socket
counter. sceRudpSetEventHandler checks initialization and a null
handler, and sceRudpEnd clears the handler. sceRudpListen and
sceRudpAccept follow the run: no peer ever connects here, so accept
returns WOULDBLOCK while non-blocking and otherwise waits until the
context is terminated. Cases the run did not cover throw.
The tests checked the exact "not implemented" message from
sceKernelInternalMemoryGetAvailableSize, mlockall, clock_settime,
sceNetCtlGetInfoV6 on an IPv6 host and sceRudpActivate. A test that
requires a placeholder to throw fails as soon as the call is
implemented, so those checks go. The calls still report themselves as
not implemented, as their debt entries say, and the argument checks
stay: a null size pointer, invalid mlockall flags, an invalid
clock_settime time, and a bad RUDP context or address.
Past its initialization and argument errors, sceRudpActivate threw a bare runtime_error for every valid call, so progress.py counted it as done. Transport mode checks, address conversion and connection activation are not implemented, so the valid call now goes through NotImplemented_nid_no_patch. The NOT_INITIALIZED and INVALID_ARGUMENT answers are unchanged.
Adds tests for nine implemented libSceRudp functions that previously
lacked coverage:
- sceRudpActivate (returns 0 always)
- sceRudpEnableInternalIOThread (NOT_INITIALIZED before init, 0 after)
- sceRudpSetEventHandler (returns 0)
- sceRudpBind (NOT_INITIALIZED, INVALID_CONTEXT_ID, 0 on success)
- sceRudpSetOption (NOT_INITIALIZED, INVALID_CONTEXT_ID, 0 on success)
- sceRudpInitiate (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_REFUSED)
- sceRudpGetContextStatus (NOT_INITIALIZED, INVALID_CONTEXT_ID, fills
status with 0, null status allowed)
- sceRudpWrite (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_RESET)
- sceRudpRead (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_RESET)
Each assertion mirrors the exact implementation in Export.cpp. Error
codes and return values are the constants hardcoded in the source.
No console measurement needed — these are pure offline behaviors.
AI-assisted: yes