Repository navigation
build(agc): keep the Linux-only parts of three AGC tests off macOS - #11437
Conversation
|
The head |
4217176 to
2e0a909
Compare
|
@MarcZX10 Rebased on |
MarcZX10
left a comment
There was a problem hiding this comment.
I rechecked the updated head 2e0a9091ccb247d2465d3292dee2de44e225d92 against current main. The three touched files have not changed on main since the reported base, and tools/check_conventions.py --base upstream/main --head upstream/pr-11437 plus git diff --check upstream/main...upstream/pr-11437 pass. The updated macOS build/run report is useful; I have not independently run that macOS suite.
There is one repository-rule overlap to resolve before approval. Open #7201 changes the same HostImportSparseDmaBuf.cpp and SparseDmaBufImport.cpp platform guards to skip those Linux-only cases on macOS, and carries a broader macOS-specific implementation in the same SharedWrites.cpp regions this PR now excludes from macOS. The open draft #5021 also carries related SharedWrites.cpp edits. If this PR is intended as the immediate standalone fix, please clarify the merge order and coordinate the overlapping hunks so the same macOS test handling is not duplicated or regressed when those branches are integrated. I am requesting changes for that overlap only; I found no separate defect in the guards themselves.
|
@MarcZX10 Thanks for checking. On merge order: this PR is the standalone fix for current How the hunks fit together:
I'll post the same note on #7201 for @marion909. |
|
@MarcZX10 #7201 was closed this morning, so of the overlaps in your review only the draft #5021 is left. @yabanana, for your rebase: #5021 edits the same
#5021 doesn't touch the two udmabuf tests. If this PR lands first, keep #5021's versions of those blocks when you rebase. If #5021 lands first, I'll rebase this PR onto it and drop what it already covers. |
|
The #12168 ordering is now resolved: its current head has the earlier change, and this PR records |
2e0a909 to
182c892
Compare
|
@MarcZX10 #12168 has merged, so Depends on is now none. Rebased onto build-errors-support-base.txt |
Re-checked — new head, overlap order pendingThe merge preview for head |
✅ NVIDIA GPU test: passedPR head
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Validation IDs already present on main (3 IDs in 105 tests)Skipped (8)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. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change updates the three tests’ platform guards to keep Linux-only code off macOS; the source inspected supports the stated skip behavior for the two DMA-BUF tests and limits the /proc leak check and RUSAGE_THREAD fault count to Linux.
What I ran
No build or tests were run. I read the prepared review description, commit list, manifest, diff, README, and each changed file’s added lines and relevant surrounding code at head 182c89266a40bf584a7f9a1dd7ba8fe03674cc7e, using repo_read.py.
Results
| Check | Result | Note |
|---|---|---|
| Changed-line review | passed | All three changed files inspected |
| Build and tests | not run | Author reports macOS support-branch results |
| Linux and Windows behavior | not run | Author reports unifdef comparisons |
Findings
Blocking
None.
Non-blocking
None.
Not verified
Builds and runtime behavior were not independently verified. I did not inspect the remainder of the changed files beyond the added lines and relevant surrounding code. files.json was not available as a review document; the manifest lists all three changed files as included, and the review folder lists no excluded changed files.
To get this to a good state
Nothing is required.
|
Tested on macOS: Apple M5 Pro, macOS 27.2.1, x86_64 build under Rosetta, Vulkan SDK 1.4.363.1 (MoltenVK).
I haven't looked into the causes. AI-assisted: yes (Claude Code) Edit: corrected the helper head and the macOS version above. The runs merged #17425 at faf53f0, which was that PR's head when I fetched it; the head I first wrote (e039596) is its current head, and I had not rebuilt on it. |
What
Three AGC tests don't compile on macOS on current
main:Their Linux-only parts are guarded with
#ifndef _WIN32, so macOS compiles them too. This change guards them with#ifdef __linux__instead:HostImportSparseDmaBuf.cppandexecution/SparseDmaBufImport.cpptest udmabuf imports. On Windows they already printskipped, udmabuf imports are Linux onlyand return the skip code; on macOS they now do the same.In
SharedWrites.cpp:RUSAGE_THREAD, which macOS lacks). Windows already leaves it at 0;/proc/self/maps;GuestArenaWriteSharedBacking.DirectMemory.cppregisters that writer only on Linux, so on macOS it returns false by design and the test fails withshared writer rejected direct backing.The partial
sceKernelMunmapblock stays on macOS, where it passes.On Linux and Windows the compiled code doesn't change: the
unifdefviews of the three files with-D__linux__ -U_WIN32and with-U__linux__ -D_WIN32equalmain's.Tested
Current head
182c89266a, rebased ontomain98ddd9c179. #12168 merged in the meantime and changedSparseDmaBufImport.cpp's skip tomain(int argc, char** argv)withSkipCode; this PR keeps that and only changes its guard to#ifndef __linux__. Nothing else changed.Apple M4 Pro, macOS 27.2, Apple clang 21, x86-64 Release under Rosetta 2 (
-DCMAKE_OSX_ARCHITECTURES=x86_64, Ninja,BUILD_TESTING=ON), MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0.maindoes not build the AGC driver and its tests on macOS yet, so this ran on a support branch, notmain: fork branchsupport/macos-boot-1030(6747733e89) =main98ddd9c179+ only the open macOS PRs #11447 #11554 #10552 #7631 #7804 #4630 and #13220 (the duplicatewrite_watchtest registration that stopsmain's CMake on macOS), plus one local line that readsenvironthrough_NSGetEnviron()inHostReportSources.cpp(maindoesn't compile it on macOS; no open PR covers it yet). The conflicts of #11554, #10552, #7631, #7804 and #4630 withmainare resolved in the merge commits. Change:support/macos-boot-1030-pr11437(f8fe1be811) = that branch + this PR's commit.ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layer,ctest -R '^(agc_shared_write|agc_shared_write_partial_collect|agc_host_import_sparse|agc_driver_sparse_dma_buf_import)$' -V, 3 runs:agc_shared_writeandagc_shared_write_partial_collectpass;agc_host_import_sparseandagc_driver_sparse_dma_buf_importare skipped withskipped, udmabuf imports are Linux only;VK_LAYER_KHRONOS_validationas enabled byVK_INSTANCE_LAYERS, there is nowas not found but was requested by env var VK_INSTANCE_LAYERS, and noVUID-line.Logs attached.
Previous head
2e0a9091cc(main035ac96eddwith the macOS PRs of that day, macOS 27.0.1): the same results. Without #10898, which has merged since,agc_shared_writebuilt but failed withinvalid write was accepted.Not built on Linux or Windows; the
unifdefcomparison above shows that their code is unchanged.check_conventions.py --base upstream/mainpasses.pr_overlap.pyreports no conflicting lines. Of the pull requests it couldn't compare:HostImportSparseDmaBuf.cpp, which this PR doesn't change;SharedWrites.cppas part of its whole port: it also moves the/proc/self/mapscount and the shared backing writer block to__linux__, but keeps the fault count on macOS withRUSAGE_SELFand leaves the partial unmap block off macOS. Proposed order, asked on feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021: this PR first; feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021 then takesmain's guards when it rebases and keeps itsRUSAGE_SELFfault count on top if it still wants it.Checklist
main; no other open PR implements the same functions (except feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, see the end of Tested)NotImplemented_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)