video_out_flip_controls failed once on the fork's linux CI job: the VideoOut tests rewrite the same app0/sce_sys/param.json in one working directory under ctest --parallel 4 #2520

Closed
opened 2026-10-10 00:40:57 +00:00 by SleglJan · 3 comments
SleglJan commented 2026-10-10 00:40:57 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-10T00:40:57Z.


What

A fork Build run of fork PR #20 (libSceAmpr only, nothing in VideoOut) merged into main a291ae0f (run 38008483069, linux job): video_out_flip_controls failed in 0.01 s with

unexpected end of param.json

(core/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cpp L47). The log order is Start 462: guest_video_out_wqhd_detection, then Test #460: video_out_flip_controls ***Failed, then the wqhd test's skip; video_out_flip_decode and video_out_flip_lifetime had started just before, so the timestamps point at the wqhd test as the writer, not prove it.

The tests registered in core/libs/prx/libSceVideoOut/CMakeLists.txt share one working directory (build/core/libs/prx/libSceVideoOut, no WORKING_DIRECTORY), and the flip tests (core/libs/prx/libSceVideoOut/tests/Flip.cpp L549, all three modes) and core/libs/tests/GuestVideoOutWqhdDetection.cpp (L39) each truncate and rewrite app0/sce_sys/param.json when they start; the linux job runs ctest --parallel 4 (.github/workflows/build.yml). DisplayWindow::create reads the title from that file (GetAppTitle_nid_postfix, core/libs/prx/libSceVideoOut/src/DisplayWindow.cpp L60) before SDL_CreateWindow (L63), so a half-written file fails the parse before the Vulkan support error that Flip.cpp L566 turns into a skip. In the six other fork linux runs tonight the test skipped. core/libs/tests/GuestAppContent.cpp writes the same relative path but creates its own directory and changes into it first (L35–39).

guest_video_out_resolution_status aborted in the same run as in every linux run since #1714 (#2509). Open #2514 gives it the guard and makes the flip tests print their skip line; it does not change the shared directory or the writes. libkernel's tests with their own files run in their own directory (core/libs/prx/libkernel/CMakeLists.txt L89). Not opening a PR under the intake pause.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5786498923 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2520). Originally posted by [SleglJan](https://github.com/SleglJan) on 2026-10-10T00:40:57Z. --- ### What A fork Build run of fork PR #20 (libSceAmpr only, nothing in VideoOut) merged into `main` a291ae0f ([run 38008483069](https://github.com/SleglJan/AnyPS5/actions/runs/38008483069), linux job): `video_out_flip_controls` failed in 0.01 s with ``` unexpected end of param.json ``` (`core/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cpp` L47). The log order is `Start 462: guest_video_out_wqhd_detection`, then `Test #460: video_out_flip_controls ***Failed`, then the wqhd test's skip; `video_out_flip_decode` and `video_out_flip_lifetime` had started just before, so the timestamps point at the wqhd test as the writer, not prove it. The tests registered in `core/libs/prx/libSceVideoOut/CMakeLists.txt` share one working directory (`build/core/libs/prx/libSceVideoOut`, no `WORKING_DIRECTORY`), and the flip tests (`core/libs/prx/libSceVideoOut/tests/Flip.cpp` L549, all three modes) and `core/libs/tests/GuestVideoOutWqhdDetection.cpp` (L39) each truncate and rewrite `app0/sce_sys/param.json` when they start; the linux job runs `ctest --parallel 4` (`.github/workflows/build.yml`). `DisplayWindow::create` reads the title from that file (`GetAppTitle_nid_postfix`, `core/libs/prx/libSceVideoOut/src/DisplayWindow.cpp` L60) before `SDL_CreateWindow` (L63), so a half-written file fails the parse before the `Vulkan support` error that `Flip.cpp` L566 turns into a skip. In the six other fork linux runs tonight the test skipped. `core/libs/tests/GuestAppContent.cpp` writes the same relative path but creates its own directory and changes into it first (L35–39). `guest_video_out_resolution_status` aborted in the same run as in every linux run since #1714 (#2509). Open #2514 gives it the guard and makes the flip tests print their skip line; it does not change the shared directory or the writes. `libkernel`'s tests with their own files run in their own directory (`core/libs/prx/libkernel/CMakeLists.txt` L89). Not opening a PR under the intake pause. AI-assisted: yes (Claude Code)
arcwiser commented 2026-10-10 01:14:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by arcwiser on 2026-10-10T01:14:02Z.


I prepared and Windows-tested a broader isolation fix on arcwiser:fix/videoout-test-isolation, commit 7e982a52.

Instead of serialising the tests or assigning static CTest directories, it adds a reusable VideoOutTestEnvironment fixture. Every process now:

  • atomically creates a unique directory under the host temporary directory
  • changes into that directory before any library code can resolve /app0
  • creates and validates its own app0/sce_sys/param.json
  • restores the original working directory and removes the fixture on every normal, skipped, and caught-failure exit

The flip modes and both guest VideoOut metadata tests use the same fixture. This also removes a hidden execution-order dependency in guest_video_out_resolution_status: that test read param.json but never created it, so it only worked when another test had left the shared file behind.

Windows 10.0.26200.0, WinLibs GCC 15.2.0/Ninja, Release:

  • full production dependencies and the three affected test executables built successfully (666 build steps)
  • all six registered affected cases passed or produced their expected no-display skip
  • 50 consecutive four-way-parallel CTest runs: 0 failures
  • temporary fixture directories remaining afterwards: 0
  • conventions, git diff --check, and test-registration checks passed
  • project overlap checker: no overlap with open pull requests

I have not opened a PR because the repository is currently enforcing the contributor intake pause. The branch is ready for an eligible maintainer/contributor to review or carry when appropriate.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6092053817 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2520#issuecomment-6092053817). Originally posted by [arcwiser](https://github.com/arcwiser) on 2026-10-10T01:14:02Z. --- I prepared and Windows-tested a broader isolation fix on [`arcwiser:fix/videoout-test-isolation`](https://github.com/arcwiser/AnyPS5/tree/fix/videoout-test-isolation), commit [`7e982a52`](https://github.com/arcwiser/AnyPS5/commit/7e982a52). Instead of serialising the tests or assigning static CTest directories, it adds a reusable `VideoOutTestEnvironment` fixture. Every process now: - atomically creates a unique directory under the host temporary directory - changes into that directory before any library code can resolve `/app0` - creates and validates its own `app0/sce_sys/param.json` - restores the original working directory and removes the fixture on every normal, skipped, and caught-failure exit The flip modes and both guest VideoOut metadata tests use the same fixture. This also removes a hidden execution-order dependency in `guest_video_out_resolution_status`: that test read `param.json` but never created it, so it only worked when another test had left the shared file behind. Windows 10.0.26200.0, WinLibs GCC 15.2.0/Ninja, Release: - full production dependencies and the three affected test executables built successfully (666 build steps) - all six registered affected cases passed or produced their expected no-display skip - 50 consecutive four-way-parallel CTest runs: 0 failures - temporary fixture directories remaining afterwards: 0 - conventions, `git diff --check`, and test-registration checks passed - project overlap checker: no overlap with open pull requests I have not opened a PR because the repository is currently enforcing the contributor intake pause. The branch is ready for an eligible maintainer/contributor to review or carry when appropriate. AI-assisted: yes.
MarcZX10 commented 2026-10-10 09:35:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T09:35:37Z.


Independent validation on latest upstream main

I reapplied arcwiser:fix/videoout-test-isolation (7e982a52) to upstream main at a29ef5921 in a detached local worktree. The four-file change applies cleanly.

Check Result
Build guest_video_out_resolution_status_tests, guest_video_out_wqhd_detection_tests, video_out_flip_tests (Linux Release) Passed
Focused CTest, four-way parallel 1 passed; 6 skipped because this environment has no usable display/Vulkan device
Conventions against current main Passed
git diff --check Passed
Temporary anyps5-video-out-* directories after tests None

video_out_flip_decode ran and passed. The skipped cases do not exercise display/Vulkan behavior; the Windows repeated parallel runs in the implementation report remain the runtime evidence for that environment. The changed files did not differ between the previously validated 3afc7846 and a29ef5921, but I rebuilt and reran all seven affected CTests on the latest base.

I also checked the original Linux run linked in this issue: video_out_flip_controls failed with unexpected end of param.json as guest_video_out_wqhd_detection started. Giving each process a unique temporary working directory removes that shared-file race across independently running test jobs, including jobs that do not share CTest's resource lock.

This validates arcwiser's patch; I have not copied or submitted it as my own. The issue remains open and intake still requires 20 merged PRs; my account has 15.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096179642 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2520#issuecomment-6096179642). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T09:35:37Z. --- ### Independent validation on latest upstream `main` I reapplied `arcwiser:fix/videoout-test-isolation` (`7e982a52`) to upstream `main` at `a29ef5921` in a detached local worktree. The four-file change applies cleanly. | Check | Result | |---|---| | Build `guest_video_out_resolution_status_tests`, `guest_video_out_wqhd_detection_tests`, `video_out_flip_tests` (Linux Release) | Passed | | Focused CTest, four-way parallel | 1 passed; 6 skipped because this environment has no usable display/Vulkan device | | Conventions against current `main` | Passed | | `git diff --check` | Passed | | Temporary `anyps5-video-out-*` directories after tests | None | `video_out_flip_decode` ran and passed. The skipped cases do not exercise display/Vulkan behavior; the Windows repeated parallel runs in the implementation report remain the runtime evidence for that environment. The changed files did not differ between the previously validated `3afc7846` and `a29ef5921`, but I rebuilt and reran all seven affected CTests on the latest base. I also checked the original Linux run linked in this issue: `video_out_flip_controls` failed with `unexpected end of param.json` as `guest_video_out_wqhd_detection` started. Giving each process a unique temporary working directory removes that shared-file race across independently running test jobs, including jobs that do not share CTest's resource lock. This validates arcwiser's patch; I have not copied or submitted it as my own. The issue remains open and intake still requires 20 merged PRs; my account has 15.
MarcZX10 commented 2026-10-10 17:19:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T17:19:46Z.


Fix submitted for review: #2878

The fix gives each VideoOut test process a unique temporary working directory and creates its own app0/sce_sys/param.json before calling VideoOut APIs. It also creates the fixture for guest_video_out_resolution_status, which previously depended on a file left by another test.

Validation Result
Linux Release build of the three affected test executables Passed
Focused CTest, four-way parallel, repeat-until-fail 3 No failures; decode passed three times; six display/Vulkan cases skipped on this host
Temporary fixture cleanup No anyps5-video-out-* directories remained
Conventions and diff check Passed

Arcwiser's original Windows validation in the earlier comment covers 50 consecutive four-way-parallel CTest runs. The PR preserves the original commit author and links to that candidate.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100166576 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2520#issuecomment-6100166576). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T17:19:46Z. --- ### Fix submitted for review: [#2878](https://github.com/boykopovar/AnyPS5/pull/2878) The fix gives each VideoOut test process a unique temporary working directory and creates its own `app0/sce_sys/param.json` before calling VideoOut APIs. It also creates the fixture for `guest_video_out_resolution_status`, which previously depended on a file left by another test. | Validation | Result | | --- | --- | | Linux Release build of the three affected test executables | Passed | | Focused CTest, four-way parallel, repeat-until-fail 3 | No failures; decode passed three times; six display/Vulkan cases skipped on this host | | Temporary fixture cleanup | No `anyps5-video-out-*` directories remained | | Conventions and diff check | Passed | Arcwiser's original Windows validation in the earlier comment covers 50 consecutive four-way-parallel CTest runs. The PR preserves the original commit author and links to that candidate.
Sign in to join this conversation.
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#2520
No description provided.