Skip to content

test(libSceAudio3d): cover pending export throws in port test harness - #13490

Closed
Elma7e wants to merge 1 commit into
boykopovar:mainfrom
Elma7e:test/audio3d-pending-exports-lifecycle
Closed

Elma7e wants to merge 1 commit into
boykopovar:mainfrom
Elma7e:test/audio3d-pending-exports-lifecycle

Conversation

@Elma7e

@Elma7e Elma7e commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

What

In libSceAudio3d, the exports sceAudio3dPortOpenEx, sceAudio3dReportRegisterHandler, sceAudio3dReportUnregisterHandler, sceAudio3dPortDestroy, and sceAudio3dPortGetStatus are declared as throwing placeholders via NotImplemented_nid_no_patch.

This PR extends core/libs/tests/GuestAudio3dPort.cpp to exercise these placeholder exports and verify that each throws std::exception (std::runtime_error) through NotImplemented_nid_no_patch, completing the coverage of all callable exports in libSceAudio3d.

Tested

  • Host OS: Ubuntu 26.04.1 LTS (Linux x86_64)
  • Compiler: GCC 15.2.0 (-std=c++20 -O2)
  • Compilation Check: Verified syntax and type correctness via g++ -std=c++20 -fsyntax-only.
  • Conventions Check: Ran python3 tools/check_conventions.py --base upstream/main (0 errors, 0 warnings).
  • PR Overlap: Ran python3 tools/pr_overlap.py --branch test/audio3d-pending-exports-lifecycle (probed 1560 PRs, 0 shared files/exports).

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

@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 (sceAudio3dPortOpenEx, sceAudio3dReportRegisterHandler, sceAudio3dReportUnregisterHandler, sceAudio3dPortDestroy and sceAudio3dPortGetStatus 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. sceAudio3dPortDestroy and sceAudio3dPortGetStatus already take real arguments, so these would be exactly the calls someone implements next. 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.

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

The same applies to #13479 and #13485, so a note for any further tests in this area: please pick calls that already return a defined result (a value, an error code or an output written), and leave the NotImplemented placeholders unasserted until someone implements them. Happy to help find good candidates if you want to keep working on these libraries.

@maskym

maskym commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 09f65b6592, merged into main 223b19ba0a (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 PR #13512, merged cleanly, so the run is a joint one. guest_audio3d_port, the test this PR extends, passes, with the other guest_audio3d_* tests; the touched modules' set passes 6/6, three runs. Not run on a PS5.

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

@BunnyFl

BunnyFl commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@Elma7e heads-up: #13607 implements the five exports this PR checks for a throw (sceAudio3dPortOpenEx, sceAudio3dPortDestroy, sceAudio3dPortGetStatus, sceAudio3dReportRegisterHandler, sceAudio3dReportUnregisterHandler), following firmware 13.42's libSceAudio3d.sprx, and gives them their real signatures. If it lands, these checks would no longer compile (the parameterless calls and the two-argument sceAudio3dPortGetStatus) and would no longer hold. If this PR lands first, I will drop the checks in #13607.

@adriadam10 adriadam10 self-assigned this Oct 30, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Closing, for the reasons @oneandonlydean gave: every added check asserts that a bare NotImplemented_nid_no_patch placeholder throws (sceAudio3dPortOpenEx, sceAudio3dPortDestroy, sceAudio3dPortGetStatus, sceAudio3dReportRegisterHandler, sceAudio3dReportUnregisterHandler). Those assertions pin the absence of an implementation, so they fail the day one of the calls is implemented and the implementer has to delete them first. They also would not compile against #13607, which gives these five exports their real signatures.

Tests for this library are welcome once the calls have real behaviour, pinned to values from a reference. Feel free to reopen with that.

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