tests: read the fake SRT table from address space the test reserved #2205
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2205
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2205"
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?
@Nawid3333 on GitHub · 2026-11-11 02:14 UTC · original
Nawid3333:tests/srt-fake-address-space→main· +49 −8 · 2 files · 2 commits · openshader_cfg_testsaborts on the macOS CI runner on current main (7d4e0d9) inTestGpuProducedWritableDescriptor:CI does not build or run this suite, so nothing shows it. I ran it on a fork branch that only adds the target to the three build lists and the name to the three
ctestselections: Windows and Linux pass, macOS (x86_64 build on the arm64 runner) aborts: https://github.com/Nawid3333/KytyPS5/actions/runs/42924937076Cause. The test lets the SRT walker load from the fake addresses
0x300315028,0x30031502cand0x300315074, andFakeGuestMemorysupplies the words from its fault handler. That only works while nothing is mapped there. A second fork run printed the state right before the failing check (https://github.com/Nawid3333/KytyPS5/actions/runs/42930092568, macOS job):On that runner
0x300040000to0x308040000is mapped read/write, so the loads succeed, the handler is never called (reads=0) and the walker reads zeros. The walker and the fault resume are not involved.Change.
FakeGuestAddressSpace(tests/SrtWalkerTestMemory.h) reserves 8 GiB without access (mmapPROT_NONE,VirtualAllocMEM_RESERVE) and returns the address inside it whose low word is the one the test was reduced with (0x00315000). The test takes its table address from there: the high word of the address comes from the host instead of the constant 3, the expected descriptor high words are the stride bit with that high word (plus one in the carry case), and the reader compares offsets from the table. No product code changes.Testing. Fork run with this commit and the same CI-only change as above:
shader_cfgpasses on Windows, Linux and macOS (on macOS the tests after this one had not run in the earlier runs): https://github.com/Nawid3333/KytyPS5/actions/runs/42933711408On a physical Mac: Fr0gzilla ran it on an Apple M5 (macOS 26.6, x86_64 build under Rosetta 2) on current main
39936ff(comment). Without this PRshader_cfg_testsaborts at the same check; with it, applied cleanly onto39936ff, it passes in 3 of 3 runs andctest -R '^shader_cfg$'passes.Other tests use
FakeGuestMemorywith fixed addresses as well; those that CI and this run cover pass on the three runners and are not touched here.If you want CI to run
shader_cfg_testsfrom now on, I can add the workflow lines to this PR or send them separately.Written with Claude Code, OpenAI Codex and GLM (AI): the diagnosis, the change and the fork CI runs; reviewed by me.
@coderabbitai[bot] on GitHub · 2026-11-11 02:21 UTC · original · edited 2026-11-23 17:03 UTC
No actionable comments were generated in the recent review.
Walkthrough
The test memory helper now reserves and releases a platform-specific fake guest address range. The shader configuration test derives its table address from that range, reads fake memory by offsets from the table address, and checks descriptor high-word calculations, including a carry after the low address changes.
Suggested reviewers:
nmzikChange: Other
Merge Risk:
Minimal · up to
5b5bcThis change makes a shader configuration test portable to macOS by reserving an inaccessible fake address range. It touches only tests, so production behavior is unaffected, and merge risk is minimal.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the main change: the fake SRT table is now read from an address range the test reserves. The changeset adds FakeGuestAddressSpace and changes the test to take its table address from that reservation, so the title matches the primary change. It is specific and uses the test-scope prefix.
Full details: Description check
Explanation
The description explains the failure on the macOS runner, gives the diagnostic output, and describes the fix: reserving an inaccessible 8 GiB range and deriving the table address and expected high words from it. It also reports fork CI and physical Mac test results. It relates directly to the changeset.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
628dec8d-9714-425f-a45a-5ec6942f3ca1Reviewing files that changed from the base of the PR and between
3d9efdcdddand5b5bc9f69a.tests/SrtWalkerTestMemory.htests/shaderCfgTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
@Fr0gzilla on GitHub · 2026-11-21 13:32 UTC · original
Tested on real hardware: Apple M5, macOS 26.6 (25G72), x86_64 build under Rosetta 2.
On current main (
39936ff),shader_cfg_testsstill aborts at the same check:This PR still applies cleanly onto
39936ff(145 commits after its base). With it,shader_cfg_testspasses in 3 out of 3 runs, andctest -R '^shader_cfg$'passes:So the fix holds on a physical Mac too, not only on the CI runner.
AI disclosure: I used an AI assistant to build, run the tests and read the logs; I checked the results myself on my Mac.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.