Skip to content

test(agc): treat an unopenable /dev/udmabuf as no dma-buf imports in the recorder - #6038

Closed
oneandonlydean wants to merge 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/recorder-udmabuf-access
Closed

oneandonlydean wants to merge 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/recorder-udmabuf-access

Conversation

@oneandonlydean

Copy link
Copy Markdown
Collaborator

What

Fixes the Linux CI failure of agc_driver_recorder on main and on unrelated PRs (for example run 38622749700 on main):

[gpu] open /dev/udmabuf: Permission denied; shared direct memory is copied instead of imported, ...
AGC graphics: (u) the dma-buf import probe failed at open /dev/udmabuf (-1000072003)

#5211 registered the full recorder run with CTest, so CI now runs it. Its test device turns dmaBufImport off only when /dev/udmabuf does not exist. On the CI runner the device exists but cannot be opened read-write, so dmaBufImport stays on and importWatchTests runs the dma-buf import probe, which fails at open /dev/udmabuf. The emulator handles the same case by copying those ranges (udmabufDevice() in GuestBufferMemory.cpp).

The test device now opens /dev/udmabuf with O_RDWR | O_CLOEXEC, the same flags the imports use, and turns dmaBufImport off when that fails.

Tested

Linux (CachyOS, GCC 16.2.1), Release, BUILD_TESTING=ON, ctest -R "agc_driver_recorder|udmabuf|import" (20 tests). "No access" means open("/dev/udmabuf") is made to fail with EACCES through an LD_PRELOAD shim.

Driver /dev/udmabuf Before After
lavapipe (Mesa 26.2.4, as in CI) accessible pass, dma-buf probe runs pass, dma-buf probe runs
lavapipe no access agc_driver_recorder fails with the CI error 20/20 pass, probe skipped
NVIDIA 4090 accessible / no access pass 20/20 pass

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
  • AI-assisted: yes

…the recorder

The recorder only checked that /dev/udmabuf exists. On a runner where it exists but cannot be opened read-write, dmaBufImport stayed on and the dma-buf import probe failed at open /dev/udmabuf, although the device copies those ranges instead. Open the device the way the imports do.
@github-actions github-actions Bot added agc libSceAgc* needs rebase Conflicts with main, rebase needed labels Oct 14, 2026
This was referenced Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 862 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1368 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1896 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5021 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5883 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6082 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6155 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6182 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6185 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6187 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6209 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6222 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6225 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6312 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6365 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6373 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6454 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6457 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6475 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6479 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6486 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6490 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6499 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6537 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6635 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6678 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6682 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6683 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6730 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6747 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6763 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6771 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6820 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6868 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6905 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6946 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6947 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp

@adriadam10

Copy link
Copy Markdown
Collaborator

Closing as obsolete: main already fixes this failure. The recorder test now opens /dev/udmabuf with O_RDWR | O_CLOEXEC and skips the dma-buf import probe when that fails (core/libs/prx/libSceAgcDriver/tests/Recorder.cpp, commit 290be56). The std::filesystem::exists("/dev/udmabuf") check this PR replaces no longer exists there, so the PR now conflicts and has nothing left to change. Feel free to reopen if the CI error still shows up on current main.

@adriadam10 adriadam10 closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants