ci: run Linux video output tests under Xvfb #6932
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6932"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T19:45:23Z.
What
Run the Linux test suite with SDL on X11 under Xvfb so Vulkan-backed VideoOut tests can create a display surface in CI. Configure the Linux build for the X11 VideoOut test driver, use Mesa llvmpipe, and make Linux skip validation fail when a test skips only because no display is available. This addresses the coverage gap reported in #6899.
Tested
acb8190919, based on currentmain587bb343:python3 -I tools/tests/test_check_skips.py— 23 tests passed.python3 tools/check_conventions.py --base upstream/main --head HEADandgit diff --check upstream/main...HEADpass.video_out_flip_testsbinary aborts at the CPU feature guard before assertions (Xeon E5-1620 v2 lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA). The repository's Linux runner is self-hosted; the PR Build event skips it, and workflow dispatch requires repository admin access that I do not have. No runtime pass is claimed onacb8190919.7f60c8a72, merged intomainf3bb6a4f8: under Xvfb with llvmpipe, Marco-Scheffler reported 1,631/1,631 tests andcheck_skips.py --job linuxaccepted 54 expected skips. On the RTX 4000 Ada run, the checker accepted both earlier and new JUnit files; the full suite was 1,630/1,631 due to an unrelatedlinux_gnu_segmentsparallel timeout, which passed 10/10 when run alone. This evidence predates the current rebase and is not presented as validation ofacb8190919.Checklist
main; no other open PR implements the same functionsImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T19:56:50Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
.github/workflows/build.yml.github/workflows/build.ymlImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T19:57:25Z.
I manually compared both
.github/workflows/build.ymldiffs against currentmain. #6044 reorganizes test registration/selection and replaces the Linux CTest command; #6932 adds X11/Xvfb setup and the X11 VideoOut test driver to the Linux job. These changes do not implement the same behavior, but they will need integration if #6044 merges first: I will rebase #6932 and apply the Xvfb wrapper to the resulting Linux CTest command while preserving the X11 configuration. No code overlap beyond the shared workflow file.Imported from boykopovar/AnyPS5. Originally posted by marco-scheffler on 2026-10-17T11:29:55Z.
I ran this PR's Linux steps on a local host: Ubuntu 24.04.4, CMake/CTest 3.28.3, Mesa 25.2.8, base
mainbc3c0fc13, this PR at3ef77906f. Environment as in the workflow:SDL_VIDEODRIVER=x11,ANYPS5_GPU=llvmpipe,ANYPS5_REQUIRE_VULKAN=1,GALLIUM_OVERRIDE_CPU_CAPS=avx,-DANYPS5_VIDEO_OUT_TEST_DRIVER=x11, fullctestunderxvfb-run -a -s '-screen 0 1920x1080x24 -nolisten tcp', then this PR'scheck_skips.py --job linux.check_skips.py --job linuxvideo_out_flip_eop,_eop_mainfail,_eop_aftergputimes outagc_async_log_fataltimed out under--parallel 24, passes 5/5 serial in 6.6 sTwo things would turn the Linux job red after merge:
guest_video_out_high_frame_rateis reported as an unexpected skip. Under Xvfb it printsskipped, current display does not provide 120 Hz, but CTest also writes<skipped message="SKIP_RETURN_CODE=77"/>.skips()turns that attribute into a secondskipped, SKIP_RETURN_CODE=77reason, andhigh_refresh_limitation()requires every reason to match, so it returns false.main'scheck_skips.pyfails the same way on this JUnit. CI didn't hit it so far because the test skipped withno display, whichDEVICE_LIMITATION.searchaccepts. The fixtures intest_check_skips.pyuse<skipped/>or a reason as the message, never CTest'sSKIP_RETURN_CODE=text. Ignoring amessagethat is onlySKIP_RETURN_CODE=<n>would fix it.Depends on: #6616.The new tests in
tools/testspass. Side note for #6899: the NVIDIA proprietary driver (RTX 4000 SFF Ada, 595.99.02) presents on Xvfb, so all VideoOut tests also run on that GPU there, unlike ANV.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T12:32:29Z.
Thanks for the exact JUnit report and main comparison. I fixed the
SKIP_RETURN_CODE=77metadata handling and added a regression for the CTest skip element plus the high-refresh message. On the rebased head, the checker suite passes 19/19, and a real local CTest fixture emitted that metadata and was accepted by the Linux checker with the 120 Hz reason. The fresh full CMake configure could not be repeated here because the worktree is missing3rdparty/zstd/build/cmake, so I have not claimed a post-rebase VideoOut runtime pass. I rebased onto currentmainand addedDepends on: #6616, which remains open.Imported from boykopovar/AnyPS5. Originally posted by marco-scheffler on 2026-10-17T22:59:51Z.
Re-ran the updated head on the same host:
main84b0d2f24+ #661675f5beffa+ this PR962c9330c, fullctestunderxvfb-runwith the workflow's environment (ANYPS5_GPU=llvmpipe,-DANYPS5_VIDEO_OUT_TEST_DRIVER=x11), thencheck_skips.py --job linux.check_skips.py --job linuxstill exits 1 witherror: guest_video_out_high_frame_rate skipped. Same on the RTX 4000 SFF Ada.The
SKIP_RETURN_CODE=77filter works. The remaining cause is one I missed in my first report: the real test prints Vulkan log lines to stdout before its skip line, andhigh_refresh_limitation()treats every non-empty line as a reason:Counting only
skipped,lines as reasons makes both real reports pass, but it breaks the 18 cases oftest_high_refresh_reason_cannot_hide_additional_diagnostics(74e239408), which reject any extra output on purpose. So either the checker needs to tell log lines apart from failure detail, or the test must not print anything before its skip. I'll leave that choice to you. The new regression fixture would catch it if it carried the log lines above.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T00:13:48Z.
Thanks for catching this with the full Xvfb rerun. I updated
high_refresh_limitation()on head 0337bac71 to allow only the three observed Vulkan startup log formats (surface capabilities, swapchain creation, and shader-disk-cache), while still requiring the expected 120 Hz limitation and rejecting any other output. Added a fixture with those logs and kept the arbitrary-extra-diagnostic controls.python3 -I tools/tests/test_check_skips.pypasses all 20 tests; conventions and diff checks pass. The Linux workflow’s updated checks are running now.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T00:19:54Z.
CI has now completed on
0337bac71: eligibility, conventions, relinker on Ubuntu, Windows, macOS arm64 and macOS x86-64 under Rosetta, plus relinker ASan all pass. The broad Linux/Windows builds and register-context/write-watch jobs were skipped by path selection. The 20 local checker tests still pass; this run does not exercise the Linux video-out test suite itself.Imported from boykopovar/AnyPS5. Originally posted by marco-scheffler on 2026-10-18T09:33:45Z.
Re-ran the Linux job on
0337bac71with #6616, onmaincb1d6e5bd, same environment as before (xvfb-run, x11,ANYPS5_GPU=llvmpipe,ANYPS5_REQUIRE_VULKAN=1,GALLIUM_OVERRIDE_CPU_CAPS=avx). ctest passes 1443/1443 with all VideoOut tests running, andtools/testspass.check_skips.py --job linuxstill fails onguest_video_out_high_frame_rate. TheSKIP_RETURN_CODE=77message is dropped now, buthigh_refresh_limitation()returns false for any other line, and the real test prints about 20 start-up lines besides the three inHIGH_REFRESH_STARTUP_LOGS, for example:These lines depend on the host and driver, so an allow-list will keep missing some. An alternative would be to look only at the lines that start with
skipped,and require all of them to be the 120 Hz reason, with the unexpected-diagnostics cases checked on those lines as well.Imported from boykopovar/AnyPS5. Originally posted by marco-scheffler on 2026-10-18T09:49:24Z.
Sorry, my excerpt above was misleading: it was only the tail of
system-out. The test prints 22 log lines before its skip line on llvmpipe (29 on the RTX), and my excerpt also cut the[src/VulkanDevice.cpp:1930 VulkanDevice]prefix off the surface capabilities line. So0337bac71still rejects both of my real reports:check_skips.py --job linuxexits 1 on the same JUnit files, witherror: guest_video_out_high_frame_rate skipped.Full
system-outofguest_video_out_high_frame_rate, llvmpipe under Xvfb (paths shortened)The RTX run has a different set: more memory heap and type lines, a subgroup line, a
[pipeline-journal]line and one[write-watch]line instead of two, and the GPU name, CPU flags, heap sizes and cache paths differ per host. So a fixed list of formats will likely keep breaking. Two options I can see: accept lines in the logger's[tag] messageform alongside the 120 Hz reason (theunexpected failure detailcases intest_check_skips.pywould still fail), or have the test print nothing but its skip line. Happy to re-run either on the same host.Imported from boykopovar/AnyPS5. Originally posted by marco-scheffler on 2026-10-18T10:02:32Z.
To untangle my last three comments: they all come from the same host and the same JUnit output. The full picture is the 22 start-up lines in the last one; the three lines in my first comment were only its tail, which is why the allow-list in
0337bac71still misses.They also end with two different suggestions, sorry for that. Either works on the real output; the difference is what happens to the
test_high_refresh_reason_cannot_hide_additional_diagnosticscases:skipped,passes both real reports, but extra detail on a line without that prefix would no longer reject the skip, so those cases need to change.[tag] messageform keeps them as they are, as long as the extra detail isn't printed in that form.Your call. I'll re-run whichever you pick on this host with llvmpipe and the RTX.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T22:07:18Z.
Thanks for the full llvmpipe and RTX logs. I pushed
7f60c8a72: the checker now validates each line markedskipped,as the precise 120 Hz limitation and ignores the variable startup diagnostics in system-out/system-err. The JUnit skip text is split into individual reasons, so extra text there still fails. I updated the tests to cover host-specific startup logs and additional skip reasons. The 20 checker tests pass and conventions pass; please rerun the new head on your two hosts.Imported from boykopovar/AnyPS5. Originally posted by marco-scheffler on 2026-10-19T13:38:09Z.
Reran
7f60c8a72on both hosts: Ubuntu 24.04.4, RTX 4000 SFF Ada Generation (595.99.02), lavapipe (Mesa 25.2.8, LLVM 20.1.2) on the same host, GCC 13.3.0, Release, under Xvfb withANYPS5_VIDEO_OUT_TEST_DRIVER=x11. This PR merged ontomainf3bb6a4f8(clean merge), fullctest --parallel 24.check_skips.py --job linuxon the JUnit files from my earlier run (the ones0337bac71rejected)check_skips.py --job linuxon the new JUnit filesguest_video_out_high_frame_rateSKIP_RETURN_CODE=77), 24 lines of system-out, one of themskipped, current display does not provide 120 HzSKIP_RETURN_CODE=77), 30 lines of system-out, one of themskipped, current display does not provide 120 HzSo the checker now accepts the real output on both hosts, including the variable startup lines around the
skipped,line. The checker unit tests pass: 21 tests here, not 20.The one RTX failure was
linux_gnu_segments, which hit its 20 s timeout while all 24 parallel jobs were starting. It passes 10/10 on its own (about 4.3 s each), and it passed in the llvmpipe run (7.2 s). This PR doesn't change it, so it is unrelated.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T16:52:31Z.
Thanks for the rerun on llvmpipe and the RTX 4000 Ada. The skip checker accepts both new JUnit sets, and the full suite reports 1631/1631 on llvmpipe and 1630/1631 on the RTX host, with the remaining video test skipped because the display does not provide 120 Hz. That makes the prior rejected-skip-file issue reproducible and fixed while preserving the expected display limitation.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T03:48:46Z.
Thanks, the checker changes look right;
tools/tests/test_check_skips.pypasses 23/23 when this branch is merged into current main.Before merging we need one more data point, because the Linux job only runs on pushes to main and on dispatches (which use main's workflow file), so this branch's change can't run in CI before it lands. The reruns above were on
mainf3bb6a4f8, which is now several hundred commits behind. Could you (or @marco-scheffler) rerun the Linux suite under Xvfb withANYPS5_VIDEO_OUT_TEST_DRIVER=x11and llvmpipe on this branch merged into currentmain, and post thecheck_skips.pyresult? With "no display" no longer accepted on Linux, any display test that skips or fails there would turn the first main build red.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T08:20:15Z.
I rebased the four original MarcZX100-authored commits onto current
main587bb343; the new head isacb8190919. The 23 skip-checker tests, conventions, and diff checks pass on this head. The Xvfb runtime remains unverified here: the local CPU guard stops the test binary before assertions, and GitHub skips the self-hosted Linux job on PR events. The prior llvmpipe/RTX 4000 runs were on7f60c8a72merged intof3bb6a4f8, so I updated the PR description to mark them historical. If an equipped reviewer can run the Xvfb Linux suite on the current head merged with587bb343, that would resolve the remaining validation request.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T08:26:24Z.
Update on current head
acb8190919164e22a74bf0fe5aba7d7d6974b615(based onmain587bb343e8baf0f9c62bdb04c9dab5eb4b938dc9): hosted relinker checks have now completed successfully on Ubuntu, Windows, macOS ARM, and macOS x86_64, including the ASan relinker job. Conventions, labels, and eligibility also pass. The Linux/Xvfb check remains skipped for PR events by repository policy, so this does not provide the requested current-head Xvfb runtime result; the earlier 23/23 local checker result is unchanged.