test(libSceNetCtl): cover the plain callback registration in guest_sce_net #6690
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6690"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-16T05:02:58Z.
What
sceNetCtlRegisterCallbackandsceNetCtlUnregisterCallbackuse the same table logic as the V6 pair (Export.cppRegisterCallbackandUnregisterCallback), andguest_sce_netchecks only the V6 pair. No test calls the plain pair.The new block in
core/libs/tests/GuestSceNet.cppmirrors the V6 block: a null function and a null output are refused with0x80412107, eight registrations return the ids 0 to 7, the ninth fails with0x80412103, ids -1 and 8 fail with0x80412105, a freed slot is reused, and a V6 registration made while the plain table is full succeeds (the tables are separate). No behavior changes.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on
main5d9dcc42d+ this commit:ctest -R ^guest_sce_net$passes (3.9 s).python tools/check_conventions.py --base upstream/mainpasses. Not tested: Linux, macOS.Overlap: #6138 also edits
core/libs/tests/GuestSceNet.cppandGuestNetCtl.cpp(callback argument,sceNetCtlCheckCallback); if it lands first this block needs a rebase.Checklist
main; no other open PR implements the same testsNotImplemented_nid_no_patch); no stubs added.mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-16T05:04:43Z.
@adriadam10 a short request for review of this test-only PR (
guest_sce_netgains the plainsceNetCtlRegisterCallback/sceNetCtlUnregisterCallbackpair, mirroring the existing V6 block; +24/-0, no behavior change). Head09112b47disMERGEABLE/CLEAN, the Conventions, Eligibility and Intake checks are green,ctest -R ^guest_sce_net$passes. #6138 also editsGuestSceNet.cpp; whichever lands second needs a rebase.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T05:32:23Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestSceNet.cppcore/libs/tests/GuestSceNet.cppImported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-16T05:41:12Z.
Review: COMMENTED
Ran this on Linux, since the description lists Linux as not tested.
BUILD_TESTING=ON, full tree.09112b47d, on top ofmain5d9dcc42d(fast-forward).Results:
ctest -R "^guest_sce_net$": passes (20/20 with--repeat until-fail:20).ctest -E "^agc|gpu|vulkan|video_out" -j10): same failures asmain5d9dcc42d(file_writer_binaryandfile_writer_text, which fail on this machine's coreutils and are unrelated).tools/check_conventions.py --base origin/main: passes.sceNetCtlUnregisterCallback(8)expected to return 0 instead of0x80412105the test aborts; reverted, it passes.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-19T03:52:52Z.
@xXPBSXx the new test doesn't compile on Windows (full CI run 39193737210, MinGW GCC 15):
NetCtlCallbackis asysv_abifunction pointer, and a lambda only converts to a pointer with the default calling convention, which differs on Windows. A named function with the guest ABI works on both hosts, for examplevoid APS5_VABI DummyNetCtlCallback(int, void*) {}at file scope, passed in place ofdummyCallback. Linux builds and runs it fine, so that's the only change needed.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-19T04:04:44Z.
Thanks, you are right.
NetCtlCallbackis asysv_abipointer since #6138, so the lambda in my block no longer converts on the Windows host. I rebased ontomain3ddbc4accand the block now passes the guest-ABIIgnoreNetCtlEventthat the V6 block uses.Tested on Windows 10 (MinGW-w64 GCC 15.2.0, Release) on
main3ddbc4acc+ the new headba9dbc208:ctest -R ^guest_sce_net$passes (1.7 s).python tools/check_conventions.py --base upstream/mainpasses. Not tested: Linux, macOS.AI-assisted (Claude Code).