tests: stop kernel_file_system assuming Linux host behavior #1770
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!1770
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1770"
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?
@dexter288 on GitHub · 2026-10-20 19:02 UTC · original
dexter288:kernel-fs-tests-macos→main· +21 −5 · 1 files · 2 commits · openOn a macOS host three checks failed even though the emulator did what they test:
Details and measurements: #1772
Testing
Tested on macOS 26.6.2, Apple M5 Pro, x86_64 build under Rosetta 2, Apple clang 21.0.0. Base commit:
f492027b.kernel_file_system_tests --mutex-onlypassed in 3 of 3 runs on a stock build (no GPU needed). The same run failed before this change.kernel_file_systempassed in 5 of 5 runs, andctest -R '^kernel_file_system$'passed. Before this change it failed at the three checks above. This run needs a Vulkan device that passes device selection on macOS. I used KosmicKrisp (from shadPS4 0.20.0) with #1547 and #1669 applied locally; those changes are not part of this PR.PTHREAD_CANCELEDis(void *)-1, the value the test already used.1for the broadcast option, which the on/off check accepts.Selectreturns at once when a datagram is already queued.<pthread.h>, which broke the clang-cl build (timespecredefinition, reported in review). The second commit removes that include, so the Windows build no longer depends on it. I still can't build on Windows myself.--mutex-onlypassed 3 of 3 runs, and the full test passed 3 of 3 runs (same setup as above). #1805 applies cleanly on top of this PR.@coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original · edited 2026-10-22 13:02 UTC
📝 Walkthrough
The tests now check the canceled-thread join result with host-specific values. They treat the UDP broadcast option as enabled or disabled based on whether its value is nonzero. The loopback datagram tests wait for readability before receiving. The connected
sendtotest no longer checks thatnet_errnoremains unchanged after the receive.Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: 🟡 Moderate · up to
c30e2The Windows cancellation test can fail until the separate normalization change is included. Resolve that dependency before merging.
Pre-merge checks:
4 ·
1
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
Comment
@coderabbitai helpto get the list of available commands.@ZrDaniel07 on GitHub · 2026-10-22 03:18 UTC · original
You asked for a Windows build check: it doesn't compile on Windows with clang-cl.
main@8502d8a+ this PR's commit, targetkernel_file_system_tests:The UCRT
<time.h>(already pulled in by the earlier standard headers) definesstruct timespecwithout setting_TIMESPEC_DEFINED, so winpthread's guard doesn't catch it. Same error with #1805 applied on top.Also, #1805 makes Windows return
(void*)-1on cancellation (like glibc), so on Windows comparing against winpthread'sPTHREAD_CANCELED(0xDEADBEEF) would be wrong once #1805 lands. Maybe only macOS needs the different value?AI use: Claude Code helped me build and read the error; I reviewed it myself.
@dexter288 on GitHub · 2026-10-22 12:55 UTC · original
Thanks for building it on Windows. You're right on both points.
c30e2fdremoves the<pthread.h>include. The test now expects(void *)1on macOS hosts, which is Darwin'sPTHREAD_CANCELEDthatPthreadJoinpasses through, and(void *)-1everywhere else. So it matches Linux today and Windows once #1805 lands. I also checked that #1805 still applies cleanly on top of this PR.On macOS,
--mutex-onlypassed 3 of 3 runs and the full test passed 3 of 3 runs after the change. I still can't build on Windows. If you have time to try it again, that would help.AI use: Claude Code helped me make and test this change, and I reviewed it.
@ -225,0 +226,4 @@// A canceled guest thread joins with Darwin's PTHREAD_CANCELED on macOS hosts.void *const canceled = reinterpret_cast<void *>(1);#elsevoid *const canceled = reinterpret_cast<void *>(-1);@coderabbitai[bot] on GitHub · 2026-10-22 13:02 UTC · original
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 4095
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 18359
Apply the Windows cancellation-value change before relying on this assertion.
On Windows,
PthreadJoinforwards the result from winpthread without conversion. The bundled winpthread header definesPTHREAD_CANCELEDas0xDEADBEEF, notreinterpret_cast<void *>(-1). Therefore, this cancellation test can fail at the join-result check until the separate normalization change from#1805is included.@coderabbitai[bot] on GitHub · 2026-10-22 13:02 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
bb9450cf-9c6c-4839-a3d2-cffa63872f35📥 Commits
Reviewing files that changed from the base of the PR and between
3f7b02096candc30e2fd50f.📒 Files selected for processing: 1
tests/KernelFileSystemTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
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.