tests: quote the respawned executable path on Windows #1111
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!1111
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1111/head"
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-10-06 18:47 UTC · original
Nawid3333:tests/quote-respawned-path→main· +2 −1 · 1 files · 3 commits · closed without mergingProblem
save_data_memory_testsfails on Windows whenever the repository is checked out in a path that contains a space, for exampleV:\Ps5 emulator Project\KytyPS5:(
ctestreports exit code 0xc0000409.)Cause
The test re-runs its own executable in child modes through
RunChild, which on Windows calls_spawnl(_P_WAIT, path, arg0, mode, nullptr). The CRT builds the child's command line by joiningarg0andmodewith a space, without quoting. The child then splits that line back intoargvat the spaces, so a path such asV:\Ps5 emulator Project\...\save_data_memory_tests.exeturns into several arguments,argv[1]is no longer the mode, and the child exits with an error.Fix
Quote
arg0. Only the command line needs it: the first_spawnlargument (the file to run) is passed to the OS directly and stays unquoted. The POSIX branch usesexeclwith a real argument array and is unchanged.How to reproduce
On Windows, from a checkout whose path contains a space:
On
mainthe test fails as above; the same.execopied to a directory without spaces passes, which isolates the cause to the path. With this PR it passes in place.Testing
Windows 11, clang-cl 19.1.5, Release, on
main6ef40654:ctestrun (53 tests,kyty_tests) on this branch vs.main: the only difference issave_data_memory(failed → passed).save_data_memory_tests, so it only shows nothing else is affected.)Scope: test code only, Windows-only branch of
RunChild; no emulator code changes.AI use (per the README's AI policy): Claude (Anthropic) found the root cause while checking a CI change, wrote the fix and ran the testing above on my machine. I reviewed the change and the results before marking this PR ready.
🤖 Generated with Claude Code
@Nawid3333 on GitHub · 2026-10-06 20:50 UTC · original
@coderabbitai review
@coderabbitai[bot] on GitHub · 2026-10-06 20:51 UTC · original · edited 2026-10-06 20:57 UTC
✅ Action performed
Review finished.
@coderabbitai[bot] on GitHub · 2026-10-06 20:57 UTC · original · edited 2026-10-06 22:55 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
5b9d51f6-b445-4417-ad30-aa69253c4761📥 Commits
Reviewing files that changed from the base of the PR and between
199d0a9d92and610c839b18.📒 Files selected for processing (1)
tests/SaveDataMemoryTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
Walkthrough
On Windows,
RunChildnow passes a quoted executable path as_spawnl’sargv[0]. Other arguments and the non-Windowsfork/execpath are unchanged.Suggested reviewers:
c0sxm0sPriority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
610c8This test-only change is intended to let the Windows child test run from checkout paths containing spaces. The available evidence supports that behavior, and no actionable merge-blocking risk remains.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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.Pull request closed