Repository navigation
test(libSceAudioOut): audit Sys port close and regular close bounds in AudioOutSys - #21054
Conversation
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 15a4f866b0:
- Conventions:
tools/check_conventions.pypassed;git diff --checkclean. - Build:
guest_audio_out_sys_port_bounds_testsfailed to build.core/libs/tests/GuestAudioOutSysPortBounds.cpp:71:77: error: unable to deduce ‘std::initializer_list<auto>&&’ from ‘{1, 2, 2147483648, 18446744069414584320}’ core/libs/tests/GuestAudioOutSysPortBounds.cpp:71:77: note: deduced conflicting types for parameter ‘auto’ (‘unsigned int’ and ‘long long unsigned int’) core/libs/tests/GuestAudioOutSysPortBounds.cpp:77:51: error: unable to deduce ‘std::initializer_list<auto>&&’ from ‘{1, 5, 4096}’ core/libs/tests/GuestAudioOutSysPortBounds.cpp:77:51: note: deduced conflicting types for parameter ‘auto’ (‘unsigned int’ and ‘long long unsigned int’)
Requesting changes for the points above.
15a4f86 to
7f6f7c2
Compare
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 7f6f7c2804:
- Conventions:
tools/check_conventions.pypassed. - Build:
guest_audio_out_sys_port_bounds_testsfailed to build.core/libs/tests/GuestAudioOutSysPortBounds.cpp:71:77: error: unable to deduce ‘std::initializer_list<auto>&&’ from ‘{1, 2, 2147483648, 18446744069414584320}’ core/libs/tests/GuestAudioOutSysPortBounds.cpp:71:77: note: deduced conflicting types for parameter ‘auto’ (‘unsigned int’ and ‘long long unsigned int’) core/libs/tests/GuestAudioOutSysPortBounds.cpp:77:51: error: unable to deduce ‘std::initializer_list<auto>&&’ from ‘{1, 5, 4096}’ core/libs/tests/GuestAudioOutSysPortBounds.cpp:77:51: note: deduced conflicting types for parameter ‘auto’ (‘unsigned int’ and ‘long long unsigned int’)
Requesting changes for the points above.
|
Windows result for head The braced lists in the two range-for loops mix The PR's own Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, Not run on a PS5. AI-assisted: yes (Claude Code), the runs and the output above are from this machine. |
|
This head does not compile. In GuestAudioOutSysPortBounds.cpp, lines 71 and 77 mix 1u with ULL literals in braced range-for lists, so the initializer_list type cannot be deduced; the Windows job fails on that object, and PrivacyOnion (Linux) and maskym (Windows) report the same error. Most of the content duplicates main. In AudioOut.cpp, mode 5 is the only accepted Sys mode, and every other mode, type, flag, option or target throws std::runtime_error, so almost all the new asserts are throw pins on the stub. Main already has libSceAudioOut/tests/AudioOutSys.cpp (open modes 0/5/6, configure 1,0,5,1,0 returns 0, other values throw) and AudioOutSysHdmiMonitorInfo.cpp (the full monitor-info code set). What is new and worth keeping: Sys close of a standard or Ex port, and a regular sceAudioOutClose on a Sys handle (0, then invalid handle). Please:
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change adds a standalone bounds test for Sys audio ports and HDMI monitor info; I found no verified blocking defects.
What I ran
Reviewed head 7f6f7c280451fcdf8ed17fe4afe58fcd9054e98b using repo_read.py reader tools. I did not run the author-reported CTest command.
Results
| Check | Result | Note |
|---|---|---|
| Changed-file review | passed | Both changed files read in full |
| CTest | not run | No test execution available |
Findings
Blocking
None.
Non-blocking
None.
Sources
- AudioOut.cpp at reviewed head — implementation behavior checked by the added tests.
- AudioOutSysHdmiMonitorInfo.cpp at reviewed head — existing monitor-info boundary coverage.
Not verified
The author-reported ctest --test-dir build -R guest_audio_out_sys_port_bounds_tests was not run. The review folder's files.json was unavailable; the manifest lists both changed files as included, and both were read. No changed files were excluded by the manifest.
To get this to a good state
Nothing is required. The author-reported CTest run remains unverified.
7f6f7c2 to
ca973ea
Compare
|
@oneandonlydean @PrivacyOnion @maskym Rebased cleanly onto latest
|
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against ca973eafc7:
- Conventions:
tools/check_conventions.pypassed. - Build:
audio_out_sys_testsbuilt cleanly. - CTest (
audio_out_sys):1/1 Test #3634: audio_out_sys .................... Passed 0.11 sec 100% tests passed, 0 tests failed out of 1 - Code reading:
- Verified that core/libs/prx/libSceAudioOut/tests/AudioOutSys.cpp folds only the maintainer-requested test cases (Sys close on standard port throws, sceAudioOutClose on standard port succeeds, sceAudioOutClose(0) returns 0x80260003 / -2144993277, sceAudioOutClose on Sys handle succeeds and subsequent closes fail with invalid handle) without reintroducing redundant test files.
- Verified that no comments were added to code, adhering to AGENTS.md and conventions.
- Verified that all integer literals in the test assertions use compatible signedness and exact expected return values matching sceAudioOutClose contract (-2144993277 == 0x80260003).
- Verified that test cleanup and handle lifecycles are properly tested without leaking resources or causing side effects across tests.
- Verified that the PR diff strictly addresses maintainer oneandonlydean's feedback by removing GuestAudioOutSysPortBounds.cpp and using existing printing Require assertions.
Looks Good To Me
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing in the reviewed changes blocks merging; the added close-boundary assertions agree with the implementations inspected.
What I ran
Reviewed head ca973eafc787560deb5658d1612760b5bf047c3d. No tests or build commands were run; repository context was read with repo_read.py.
Results
| Check | Result | Note |
|---|---|---|
| Changed test review | passed | Assertions agree with inspected close behavior |
| Tests and build | not run | No execution performed |
Findings
Blocking
None.
Non-blocking
None.
Not verified
Runtime behavior and the author-reported convention and whitespace checks were not independently verified. The only changed file, core/libs/prx/libSceAudioOut/tests/AudioOutSys.cpp, was read in full. description.md, commits.md, manifest.json, and diff.patch were read; files.json was not available in the review folder listing.
To get this to a good state
Nothing is required.
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
What
Folds Sys port close and regular
sceAudioOutClosebounds intocore/libs/prx/libSceAudioOut/tests/AudioOutSys.cppper maintainer review:sceAudioOutSysClose(standard)throwsstd::runtime_error).sceAudioOutCloseon a Sys handle (returns 0 on initial close, and returns0x80260003/-2144993277on subsequent close).sceAudioOutClose(0)returns0x80260003/-2144993277.RequireinAudioOutSys.cpp.Tested
python tools/check_conventions.py --base upstream/main --head HEAD: 0 findings.git diff --check: clean (0 whitespace errors).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)