test(agc): skip the sparse dma-buf import tests when udmabuf size_limit_mb is above 1024 #5950

Merged
mrfelek merged 1 commit from upstream-pr/5950 into main 2026-10-16 17:40:41 +00:00
mrfelek commented 2026-10-14 16:51:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-14T16:51:02Z.


What

agc_host_import_sparse and agc_driver_sparse_dma_buf_import build a range one chunk above udmabuf's size_limit_mb. When the limit is set very high (for example to its maximum, the workaround for one dma-buf import larger than the default 64 MB, #5329), that range is petabytes and mmap fails, so the two tests fail instead of testing anything: cannot reserve the guest range and sparse import: cannot map the backing file. The driver does not take the sparse path for such a limit either, so there is nothing to exercise.

Both tests now skip (exit code 77, which ctest reports as skipped) when size_limit_mb is above 1024. The check sits right after the /dev/udmabuf access check, so a host at the default 64 MB, or any limit up to 1 GiB, runs them exactly as before.

Tested

Ubuntu 26.10, GCC 15.3.0, RTX 3080 Ti (NVIDIA 615.71.09), Release, on main e34c47921, with /sys/module/udmabuf/parameters/size_limit_mb = 2147483647.

  • Before: both tests fail with the two messages above (found in a full ctest run of main: 1125 of 1127 passed, these two failed).
  • After: ctest -R "agc_host_import_sparse|agc_driver_sparse_dma_buf_import" reports both as skipped.
  • Not tested: the unchanged path at the default 64 MB limit, since this host's limit is raised and the driver reads it too; CI covers it.

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; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3080 Ti, driver 615.71.09, Ubuntu 26.10
  • AI-assisted: yes; I reviewed every line and ran the tests

AI-assisted; the runs are from my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4861316748 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5950). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-14T16:51:02Z. --- ### What `agc_host_import_sparse` and `agc_driver_sparse_dma_buf_import` build a range one chunk above udmabuf's `size_limit_mb`. When the limit is set very high (for example to its maximum, the workaround for one dma-buf import larger than the default 64 MB, #5329), that range is petabytes and `mmap` fails, so the two tests fail instead of testing anything: `cannot reserve the guest range` and `sparse import: cannot map the backing file`. The driver does not take the sparse path for such a limit either, so there is nothing to exercise. Both tests now skip (exit code 77, which ctest reports as skipped) when `size_limit_mb` is above 1024. The check sits right after the `/dev/udmabuf` access check, so a host at the default 64 MB, or any limit up to 1 GiB, runs them exactly as before. ### Tested Ubuntu 26.10, GCC 15.3.0, RTX 3080 Ti (NVIDIA 615.71.09), Release, on main e34c47921, with `/sys/module/udmabuf/parameters/size_limit_mb` = 2147483647. - Before: both tests fail with the two messages above (found in a full `ctest` run of main: 1125 of 1127 passed, these two failed). - After: `ctest -R "agc_host_import_sparse|agc_driver_sparse_dma_buf_import"` reports both as skipped. - Not tested: the unchanged path at the default 64 MB limit, since this host's limit is raised and the driver reads it too; CI covers it. ### 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 - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3080 Ti, driver 615.71.09, Ubuntu 26.10 - [x] AI-assisted: yes; I reviewed every line and ran the tests AI-assisted; the runs are from my machine.
github-actions[bot] commented 2026-10-15 12:12:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:12:09Z.


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 6222 core/libs/prx/libSceAgcDriver/tests/HostImportSparseDmaBuf.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SparseDmaBufImport.cpp
PR 6901 core/libs/prx/libSceAgcDriver/tests/HostImportSparseDmaBuf.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SparseDmaBufImport.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191749256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5950#issuecomment-6191749256). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:12:09Z. --- <!-- pr-overlap --> 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 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/HostImportSparseDmaBuf.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/SparseDmaBufImport.cpp` | | [PR 6901](https://www.github.com/boykopovar/AnyPS5/pull/6901) | `core/libs/prx/libSceAgcDriver/tests/HostImportSparseDmaBuf.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/SparseDmaBufImport.cpp` |
adriadam10 commented 2026-10-16 12:05:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T12:05:57Z.


Checked the diff against the two tests (UdmabufLimitBytes() is already defined in both files, skip placed right after the /dev/udmabuf access check, exit codes 77 / VulkanTestSkipped). Built both targets on current main plus this PR and ran them at the default 64 MB limit: both pass unchanged. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6215134734 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5950#issuecomment-6215134734). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T12:05:57Z. --- Checked the diff against the two tests (`UdmabufLimitBytes()` is already defined in both files, skip placed right after the `/dev/udmabuf` access check, exit codes 77 / `VulkanTestSkipped`). Built both targets on current main plus this PR and ran them at the default 64 MB limit: both pass unchanged. Merging.
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!5950
No description provided.