test(libSceVideoOut): validate display mode configuration and port attributes #18502

Open
slopgobblercobbler wants to merge 1 commit from upstream-pr/18502 into main
slopgobblercobbler commented 2026-11-11 19:05:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-11-11T19:05:38Z.


What

Add standalone regression test GuestVideoOutDisplayPortAttributes validating libSceVideoOut display mode configuration, port attributes, resolution queries, color settings, and parameter bounds across both unopened and active video out handles.

Tested

  • Fixed MinGW WinMain linker error by defining SDL_MAIN_HANDLED in GuestVideoOutDisplayPortAttributes.cpp and core/libs/prx/libSceVideoOut/CMakeLists.txt.
  • Removed unopened and post-close sceVideoOutClose assertions that threw invalid close handle runtime exceptions on unmeasured paths per maintainer feedback from @domx4q.
  • Verified build and conventions via python tools/check_conventions.py --base upstream/main --head HEAD (0 errors).
  • Cleanly rebased onto latest upstream/main.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5265265040 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18502). Originally posted by [slopgobblercobbler](https://github.com/slopgobblercobbler) on 2026-11-11T19:05:38Z. --- ### What Add standalone regression test `GuestVideoOutDisplayPortAttributes` validating `libSceVideoOut` display mode configuration, port attributes, resolution queries, color settings, and parameter bounds across both unopened and active video out handles. ### Tested - Fixed MinGW `WinMain` linker error by defining `SDL_MAIN_HANDLED` in `GuestVideoOutDisplayPortAttributes.cpp` and `core/libs/prx/libSceVideoOut/CMakeLists.txt`. - Removed unopened and post-close `sceVideoOutClose` assertions that threw `invalid close handle` runtime exceptions on unmeasured paths per maintainer feedback from @domx4q. - Verified build and conventions via `python tools/check_conventions.py --base upstream/main --head HEAD` (0 errors). - Cleanly rebased onto latest `upstream/main`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-22 08:40:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T08:40:30Z.

Review: COMMENTED


Reviewed — comments

The added test and CMake registration are reviewed at head 207c3df50fa2fa3f1298ddac1c18683187a00e14; no build or test command was run, so a formal approval is not justified.

What I ran

  • Read the prepared description, commits, diff and manifest, plus both changed files and targeted implementation and test context via repo_read.py.
  • No build, test, or convention check was run in this review.

Results

Check Result Note
Changed-file review passed Both changed files read
Build and tests not run No execution in this review
Convention check not run Mentioned in the PR description only

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestVideoOutDisplayPortAttributes.cpp:321 expects sceVideoOutGetOutputStatusWithVrr to succeed immediately after opening a handle. The implementation returns 0x8029001C until buffers have been registered; existing resolution-status and HDR tests first check this fresh-handle case. Register a buffer before asserting the successful status, or assert the fresh-handle error here.

Not verified

  • No build, CTest execution, or convention check was performed; the PR description's reported convention result was not independently verified.
  • The manifest marks both changed files as included and reviewed; no changed files were excluded.

To get this to a good state

Nothing is required. Consider aligning the fresh-handle VRR assertion with the existing tests; this is optional feedback.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6011297569 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18502#pullrequestreview-6011297569). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T08:40:30Z. **Review:** COMMENTED --- # Reviewed — comments The added test and CMake registration are reviewed at head `207c3df50fa2fa3f1298ddac1c18683187a00e14`; no build or test command was run, so a formal approval is not justified. ## What I ran - Read the prepared description, commits, diff and manifest, plus both changed files and targeted implementation and test context via `repo_read.py`. - No build, test, or convention check was run in this review. ## Results | Check | Result | Note | |---|---|---| | Changed-file review | passed | Both changed files read | | Build and tests | not run | No execution in this review | | Convention check | not run | Mentioned in the PR description only | ## Findings ### Blocking None. ### Non-blocking - `core/libs/tests/GuestVideoOutDisplayPortAttributes.cpp:321` expects `sceVideoOutGetOutputStatusWithVrr` to succeed immediately after opening a handle. The implementation returns `0x8029001C` until buffers have been registered; existing resolution-status and HDR tests first check this fresh-handle case. Register a buffer before asserting the successful status, or assert the fresh-handle error here. ## Not verified - No build, CTest execution, or convention check was performed; the PR description's reported convention result was not independently verified. - The manifest marks both changed files as included and reviewed; no changed files were excluded. ## To get this to a good state Nothing is required. Consider aligning the fresh-handle VRR assertion with the existing tests; this is optional feedback.
ligmaSec commented 2026-12-03 12:55:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:55:35Z.

Review: COMMENTED


The four shared CTest cases passed on main and the change on Linux with Xvfb, Mesa lavapipe, and Khronos validation 1.4.369. The added display-port fixture failed in its unopened-port VRR checks. The loader inserted the requested layer, and the logs contained no missing-layer diagnostic or VUID.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170220587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18502#pullrequestreview-6170220587). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T12:55:35Z. **Review:** COMMENTED --- The four shared CTest cases passed on main and the change on Linux with Xvfb, Mesa lavapipe, and Khronos validation 1.4.369. The added display-port fixture failed in its unopened-port VRR checks. The loader inserted the requested layer, and the logs contained no missing-layer diagnostic or VUID. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/18502:upstream-pr/18502'
git switch 'upstream-pr/18502'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/18502'
git switch 'upstream-pr/18502'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/18502'
git switch 'upstream-pr/18502'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/18502'
git switch 'main'
git merge --squash 'upstream-pr/18502'
git switch 'main'
git merge --ff-only 'upstream-pr/18502'
git switch 'main'
git merge 'upstream-pr/18502'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18502
No description provided.