Scripts: preserve trailing backslashes in smoke game paths #583
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/588"
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?
Imported from ivall/xcl. Originally posted by luna020924 on 2026-11-24T02:12:17Z.
A directory passed to
smoke.ps1 -Gamecan end in a backslash. On the Windows command line that backslash escapes the closing quote, so the child receives a quote in place of the separator. Double the trailing backslashes when quoting the argument.What is in it
scripts/smoke.ps1preserves the exact directory argument. The regression test uses a native fixture to check a path with spaces and zero, one or two trailing backslashes.Tested
scripts\smoke-game-path.tests.ps1failed against the9ce2070smoke script and passed at1707802in Windows PowerShell 5.1.26100.8875 and PowerShell 7.7.0. The fixture receives a literal trailing quote onmainand the original argument on the PR head.cargo build --locked --workspace --jobs 3passed on9ce2070and1707802.cargo test --locked --workspace --no-fail-fast --jobs 3 -- --test-threads=4 --show-outputreported 684 passed, 0 failed and 41 ignored on both9ce2070and1707802.SKIPPEDon both revisions:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no native wave64). libtest includes both in the passed count.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T02:32:18Z.
Tested exact head
1707802.Tested
powershell -NoProfile -File scripts/smoke-game-path.tests.ps1on1707802: passed (exit 0):Passed: paths with spaces and zero, one or two trailing backslashes.scripts/smoke.ps1of the parent commit9ce2070: fails (exit 1) withExpected argv 'run', '...\Game With Spaces\'; received 'run', '...\Game With Spaces"'(the trailing backslash escaped the closing quote). So the test catches what the PR fixes.scripts/test-native-stderr.tests.ps1on1707802: passed.Not tested
pwsh), a realscripts/smoke.ps1run on a title (no title on this machine), the Rust suite (the PR changes no Rust).AI use
Imported from ivall/xcl. Originally posted by Alpha325 on 2026-11-25T02:43:17Z.
I expanded the native argv fixture to cover four path types with spaces and a Unicode character: local, extended-length local (
\\?\), UNC, and extended-length UNC (\\?\UNC\). Each ran with zero through three trailing backslashes.1707802248c5caaf7971c9b6003d1c49cc53c908: all 16 cases passed per shell. The child received exactlyrunand the original path, including every trailing backslash.9ce2070eccf436d7bd38601c90407da447df34f3: each path type passed with zero trailing backslashes and failed at one. The child received a literal quote at the end.Tested on Windows 11 build 26200 with Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9 using
scripts/smoke-game-path.tests.ps1. The fixture only recorded argv, so no network share or title files were accessed.AI use — OpenAI Codex (GPT-6) extended the fixture, ran the tests, and drafted this report.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:43:16Z.
Empirical test report (
17078022)Hardware / environment
1707802248c5caaf7971c9b6003d1c49cc53c908on Windows build10.0.26200.9974with Windows PowerShell5.1.26100.9818(Desktop).AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD. This was a script-only run with a synthetic native executable and no Arc GPU mutex acquired.Commands and results
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File $harnessexited 0.[System.Management.Automation.Language.Parser]::ParseFile($smoke, [ref]$tokens, [ref]$parseErrors)parsedscripts/smoke.ps1with 0 errors (1 check passed, 0 failed).& $compiler /nologo /target:exe "/out:$xcl" $sourcebuilt the C# argument recorder with exit code 0.& $smoke -Game $path -Seconds 1 -Xcl $xclran seven times. Each smoke block reported exit0x0from the recorder. Native argument checks finished with 7 passed, 0 failed.Observed behavior
Directory names with and without spaces each passed with zero, one, and two trailing backslashes. The drive-root path passed with its trailing backslash intact. In every case the native process received exactly two arguments,
runand the original game path, with an exact string match including the trailing backslash count. The harness ran the checked-out smoke script directly and supplied a synthetic log and adapter report. It intercepted the script's environment cleanup and cleared the same two variables through .NET.Not tested
Real game smoke runs and Rust workspace GPU tests were omitted. The exit codes above come from the synthetic executable and its harness.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr588-focused.log and published.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:06:57Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T19:05:31Z.
I reproduced the conflict in
scripts/smoke.ps1. The tested merge commit has this PR's head1707802as its first parent andmainat2898511af1c0as its second. It keeps main's batch-file launcher. Only the native executable path doubles the trailing backslashes before the closing quote.scripts/smoke-game-path.tests.ps1passed on Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. A native executable and a batch file each received exactlyrunand the supplied game path with a space and a Unicode character, with zero, one and two trailing backslashes (six cases per shell).scripts/smoke-title.tests.ps1andscripts/test-smoke-artifacts.tests.ps1also passed in both shells on the clean merge.Windows 11 build 26100.9711, i7-13700. Synthetic launchers, logs and reports only. No retail files, Rust build or GPU workload. OpenAI Codex (GPT-6) resolved the conflict, extended the regression and ran the checks.
I also compared this exact head's native launcher with the newer #2721 at
18d6817af378. Both delivered the same verb and directory argument for five cases in each PowerShell version, including a drive root and a relative spelling. I posted the native/batch controls and the interaction with #2684 in the comparison on #2721. OpenAI Codex (GPT-6) ran the Windows synthetic fixtures.Retest after #2721 was closed in favor of this PR
I updated the existing merge candidate to main
83b008188efb, retaining its startup-timeout changes. The native argument fixture from #2721 failed against that main in Windows PowerShell 5.1 and PowerShell 7.6.9. It passed against the candidate in both shells for a spaced path with zero, one and two trailing backslashes and for the drive root.The candidate’s
scripts/smoke-game-path.tests.ps1also passed all six native/batch argument cases in each shell.scripts/smoke-title.tests.ps1andscripts/test-smoke-artifacts.tests.ps1passed in both. OpenAI Codex (GPT-6) ran these synthetic launchers on Windows 11. The missing-report check used a synthetic fallback adapter. No retail run, GPU workload or Rust build.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:45:08Z.
Triage (#1607) – head
1707802#2721 made the same change (doubling trailing backslashes before the closing quote in
$psi.Arguments) and is closed, so this is the open PR for it. #2684 (relative game paths) touches the same area but is a different fix.The regex
'\\+\z' -> '$0$0'is correct. Main has since split the launch into a .cmd/.bat branch and a native branch, so this conflicts; on a rebase the fix belongs in the native branch.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.