Repository navigation
build(libSceAgcDriver): compile the tests on macOS - #15700
Merged
Merged
Conversation
Four tests guarded Linux-only code with #ifndef _WIN32, so macOS compiled it and failed: memfd sealing in the two udmabuf import tests, RUSAGE_THREAD and /proc/self/maps in SharedWrites, and MAP_FIXED_NOREPLACE in GcnColorTarget. The udmabuf tests already had a branch that skips with "udmabuf imports are Linux only"; it now covers every host that is not Linux. SharedWrites guards the fault count, the /proc/self/maps leak check and the shared backing writer checks with __linux__, the condition under which DirectMemory registers that writer. The rest of the test now runs on macOS and passes. GcnColorTarget takes its low memory from the guest arena on macOS, as on Windows. The address stays below 1 TiB and the test passes. Windows and Linux compile the same code as before.
Contributor
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (1, not counted against this PR)Validation IDs already present on main (13 IDs in 445 tests)Skipped (4)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
This was referenced Nov 4, 2026
12 tasks done
|
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.
|
Collaborator
|
Checked the diff: Linux and Windows compile the same code as before (only the guards change to |
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Four libSceAgcDriver tests guarded Linux-only code with
#ifndef _WIN32, so a macOS build compiled it and failed:HostImportSparseDmaBuf.cppandexecution/SparseDmaBufImport.cpp:memfd_createsealing (MFD_ALLOW_SEALING,F_ADD_SEALS,F_SEAL_SHRINK).SharedWrites.cpp:RUSAGE_THREAD, and/proc/self/mapsat run time.GcnColorTarget.cpp:MAP_FIXED_NOREPLACE.The two udmabuf tests already had a branch that prints "skipped, udmabuf imports are Linux only" and skips. Its condition is now
!__linux__instead of_WIN32.SharedWrites.cppguards with__linux__the fault count of its benchmark (printed, never checked), the/proc/self/mapsleak check, and the two blocks that write through the shared backing writer.DirectMemory.cppregisters that writer only under__linux__, so on macOSGuestArenaWriteSharedBackingreturns false: the first block failed with "shared writer rejected direct backing", and the second would have passed without checking anything. #7631 brings direct memory to macOS and can widen that guard. With these guards the rest of the test runs on macOS for the first time, and passes.GcnColorTarget.cpptakes its memory below 1 TiB from the guest arena on macOS, as it does on Windows. The arena takes the Windows protection value on every host, so the macOS branch passesReadWriteProtection = 0x04, the nameGuestHeap.cppuses.Windows and Linux compile the same code as before.
Tested
macOS 27.2 (Apple M5), x86-64 under Rosetta, Release, AppleClang.
maindoes not build on macOS by itself, so this ran with #11049, #11119, #7804 and #4630 merged in: onmainb8efa62, and the tests again on 5b1d381 after the rebase, where none of these files had changed. The macOS CI builds only the relinker and a few narrow targets, which is how these got in.main, none with this change.agc_gcn_color_target,agc_shared_writeandagc_shared_write_partial_collectpass.agc_host_import_sparseandagc_driver_sparse_dma_buf_importskip with "udmabuf imports are Linux only".Linux and Windows not built here.
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)