Skip to content

test(libSceNetCtl): cover GetStateV6, GetResult and GetNatInfo in guest_net_ctl - #6691

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
xXPBSXx:test/netctl-result-natinfo-statev6
Oct 18, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
xXPBSXx:test/netctl-result-natinfo-statev6

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

What

sceNetCtlGetStateV6, sceNetCtlGetResult and sceNetCtlGetNatInfo are exported by libSceNetCtl (Export.cpp) but no test calls them. core/libs/tests/GuestNetCtl.cpp gains checks for what the code does today:

  • sceNetCtlGetStateV6(nullptr) returns 0x80412107; with an output it returns 0 and the state is 0 (disconnected) or 3 (IP obtained), as for sceNetCtlGetState.
  • sceNetCtlGetResult(0, nullptr) returns 0x80412107; with an output it returns 0 and writes 0.
  • sceNetCtlGetNatInfo returns 0x80412108 (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 main 5d9dcc42d + 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/main passes. 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

  • Based on current main; no other open PR implements the same tests
  • 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); no stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (test coverage only)
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

…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>
@xXPBSXx

xXPBSXx commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

@adriadam10 a short request for review of this test-only PR (guest_net_ctl gains checks for sceNetCtlGetStateV6, sceNetCtlGetResult and sceNetCtlGetNatInfo; +12/-0, no behavior change; the values are what the implementation returns today, not measured on a console, and the description says so). Head 72471f5c6 is MERGEABLE / CLEAN, the Conventions, Eligibility and Intake checks are green, ctest -R ^guest_net_ctl$ passes. #6138 and #6227 also edit GuestNetCtl.cpp; the first to land may need a rebase of the others.

AI-assisted (Claude Code).

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestNetCtl.cpp
PR 6685 core/libs/tests/GuestNetCtl.cpp
PR 6720 core/libs/tests/GuestNetCtl.cpp
PR 7332 core/libs/tests/GuestNetCtl.cpp

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 of main 5d9dcc42d (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 as main 5d9dcc42d (file_writer_binary and file_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 sceNetCtlGetResult expectation changed to errorCode == 1 the test aborts; reverted, it passes.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@oneandonlydean oneandonlydean self-assigned this Oct 17, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 18, 2026
# Conflicts:
#	core/libs/tests/GuestNetCtl.cpp
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 18, 2026
@oneandonlydean
oneandonlydean merged commit 7012f70 into boykopovar:main Oct 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants