Repository navigation
test(libSceNetCtl): cover GetStateV6, GetResult and GetNatInfo in guest_net_ctl - #6691
Conversation
…st_net_ctl sceNetCtlGetStateV6, sceNetCtlGetResult and sceNetCtlGetNatInfo are exported and called by titles but no test calls them. The checks pin what the code does today: a null output is refused with the invalid-address error, GetStateV6 reports disconnected or IP obtained, GetResult writes 0, and GetNatInfo reports not connected. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@adriadam10 a short request for review of this test-only PR ( AI-assisted (Claude Code). |
|
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.
|
jotitadev
left a comment
There was a problem hiding this comment.
Ran this on Linux, since the description lists Linux as not tested.
- Machine: Ubuntu 26.04, x86_64 (i7-8700), GCC 15.2.0, CMake 4.2.3 + Ninja, Release,
BUILD_TESTING=ON, full tree. - Head:
72471f5c6, on top ofmain5d9dcc42d(fast-forward).
Results:
- Full build: clean, no warnings.
ctest -R "^guest_net_ctl$": passes (20/20 with--repeat until-fail:20).- Non-GPU suite (
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.- Check that the new lines run on Linux: with the
sceNetCtlGetResultexpectation changed toerrorCode == 1the test aborts; reverted, it passes.
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
# Conflicts: # core/libs/tests/GuestNetCtl.cpp
What
sceNetCtlGetStateV6,sceNetCtlGetResultandsceNetCtlGetNatInfoare exported bylibSceNetCtl(Export.cpp) but no test calls them.core/libs/tests/GuestNetCtl.cppgains checks for what the code does today:sceNetCtlGetStateV6(nullptr)returns0x80412107; with an output it returns 0 and the state is 0 (disconnected) or 3 (IP obtained), as forsceNetCtlGetState.sceNetCtlGetResult(0, nullptr)returns0x80412107; with an output it returns 0 and writes 0.sceNetCtlGetNatInforeturns0x80412108(not connected).The values are what the implementation returns; they are not measured on a console. No behavior changes.
Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on
main5d9dcc42d+ this commit:ctest -R ^guest_net_ctl$passes (3.0 s, not skipped: the host has an IPv4 address).python tools/check_conventions.py --base upstream/mainpasses. Not tested: Linux, macOS.Overlap: #6138 and #6227 also edit
core/libs/tests/GuestNetCtl.cpp; the first of the three to land may need a rebase of the others.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