Skip to content

test(libSceRudp): cover pending import placeholder throws - #13485

Closed
Elma7e wants to merge 1 commit into
boykopovar:mainfrom
Elma7e:feat/rudp-pending-exports-coverage
Closed

Elma7e wants to merge 1 commit into
boykopovar:mainfrom
Elma7e:feat/rudp-pending-exports-coverage

Conversation

@Elma7e

@Elma7e Elma7e commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

What

In libSceRudp, the imports sceRudpAccept, sceRudpFlush, sceRudpGetLocalInfo, sceRudpListen, and sceRudpGetContextBufferStatus are declared as import-resolution placeholders that throw through NotImplemented_nid_no_patch.

This PR extends GuestRudpContextQueries.cpp to exercise each of these exports and assert that each one throws an exception via NotImplemented_nid_no_patch, completing the test harness coverage across all callable exports in libSceRudp.

Tested

  • Host OS: Ubuntu 26.04.1 LTS (Linux x86_64)
  • Compiler: GCC 15.2.0 (-std=c++20 -O2)
  • Execution & Runtime: Standalone test binary compiled with Export.cpp and TimedWait.cpp, executed with exit code 0 (ALL RUDP TESTS PASSED EXIT 0, elapsed < 0.05s).
  • Conventions Check: Ran python3 tools/check_conventions.py --base upstream/main (0 errors, 0 warnings).

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

@MarcZX10 MarcZX10 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.

Reviewed — looks good

At head d4049168d5c44efc323eb26a532ef7873dc35ba9, the added test invokes all five pending RUDP placeholders and asserts that each throws, consistent with their current implementations.

What I ran

Reviewed the exact head against main at 556547da71c5e25b742f17b1ed9b27253b6e9d4d. The current-base preview was clean. Environment: Debian GNU/Linux x86_64, Python 3.11.2; no compiler or build was run.

git diff --check refs/review/main-latest...refs/review/pr-13485-current
python3 tools/check_conventions.py --base 556547da71c5e25b742f17b1ed9b27253b6e9d4d --head d4049168d5c44efc323eb26a532ef7873dc35ba9
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13485

Results

Check Result
Diff and conventions Passed.
CMake test registration Confirmed: guest_rudp_context_queries is registered and links libSceRudp.
Dependency/mergeability preview Passed; clean against current main.
C++ test execution Author reports the standalone GCC 15.2 test binary passed; I did not run it locally.
Precheck test-quality helper Could not run because tools/pr_test_quality.py is absent from the isolated snapshot.
Hosted CI Five checks were queued at the final refresh.
Raw output
All conventions checks passed.

git diff --check exited 0 with no output. Precheck output:

/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13485-d4049168d5c4/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13485-d4049168d5c4/report.json
Conclusion: checks failed

The precheck report attributes this conclusion to the unavailable local-only pr_test_quality.py helper; diff, conventions/template, and live dependency/mergeability checks passed.

Sources

Not verified

I did not independently run the C++ test or its negative control. The standalone test result is author-reported; hosted CI remained queued.

@maskym

maskym commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Windows result for head d4049168d5, merged into main 556547da71 (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

The tree also carried the open PRs #13479, #13470, #13462, #13459, #13458, #13457, #13456, all merged cleanly, so the run is a joint one. guest_rudp_context_queries, the test this PR extends, passes. Every test of the touched modules passes too (23/23, three runs). Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Elma7e thanks for looking at this library. I would leave this one out: every line the PR adds asserts that an unimplemented placeholder throws (sceRudpAccept, sceRudpFlush, sceRudpGetLocalInfo, sceRudpListen and sceRudpGetContextBufferStatus are all bare NotImplemented_nid_no_patch bodies), so each assertion would fail the day that call is implemented and force the implementer to delete it first. Tests here do not pin the throw of an unimplemented path (the throw is already the repository's rule for those, and the placeholders are listed in the library's debt file); they cover behaviour the code actually has. A test that covers one of these calls becomes useful once it has a defined result to check.

Could you close this PR, or replace the loop with assertions about behaviour that exists today?

@adriadam10

Copy link
Copy Markdown
Collaborator

Closing, agreeing with @oneandonlydean's comment: every added line asserts that an unimplemented placeholder throws, so each assertion would fail the day that export is implemented and the implementer would have to delete it first. The throw is already the repository's rule for unimplemented paths and the placeholders are listed in the library's debt file, so the test pins no behaviour.

Tests for these exports are welcome once they are implemented, covering their behaviour against the references (edge inputs, error codes). Feel free to reopen with that.

@adriadam10 adriadam10 closed this Oct 30, 2026
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.

5 participants