test(agc): write more pixels than a pipe holds in the closed-pipe case #6573
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6573"
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 hashaam1217 on 2026-10-15T21:04:23Z.
What
agc_frame_dump_iois flaky on Linux.PixelFailurewrites a 128x128x4 payload, which is exactly the 65,536 bytes a default Linux pipe holds. After the consumer thread reads the 54-byte header, the whole payload fits in the pipe, soWriteBmpAndClosecan finish the pixel write before the consumer closes the read end. The write then succeeds, and the test fails withclosed pipe pixel write was accepted.This PR raises the payload to 512x512x4 (1 MiB). That is larger than the default pipe capacity on Linux (64 KiB) and macOS (at most 64 KiB), so the pixel write always blocks until the reader closes and fails with
EPIPE. Windows was not affected, because the test creates its pipe with 4 KiB there. The production code is unchanged.Tested
Linux (Ubuntu 24.04, kernel 6.8, GCC 13), Release, full build on
maine16b2bcce, runningbuild/tests/agc_frame_dump_io_testsdirectly:mainThe test still finishes in under 10 ms.
python3 tools/check_conventions.py --base origin/mainpasses.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T21:20:34Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/tests/FrameDumpIo.cppL99-100Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-15T22:31:57Z.
Review: COMMENTED
Checked the macOS side of the description ("at most 64 KiB") on Apple silicon.
Machine: Apple M2 Max, macOS 27.2, Apple clang 21.0.0 (libc++). Head
4b8ccd2e4, basemain5d9dcc42d.Method: no full build (
maindoes not build on macOS yet).FrameDumpIo.hppis header-only, so I compiledtests/FrameDumpIo.cppstandalone (clang++ -std=c++20 -O1) once as onmainand once with this PR's diff applied, natively (arm64) and as x86_64 under Rosetta, and ran each binary 500 times:main's testEvery
mainfailure wasclosed pipe pixel write was accepted. A non-blocking write probe fills a default macOS pipe at exactly 65,536 bytes, so the 128x128x4 payload fits there just as on Linux and the test is flaky on macOS too; the 1 MiB payload fixes it.Written with AI assistance (Claude Code). I ran the checks above on my machine.