Scripts: validate smoke duration before launching XCL #1071
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1080"
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 broccolize on 2026-11-24T11:23:41Z.
Validate the smoke run duration and startup allowance before launching XCL so their combined wait fits the Windows process wait API.
-Seconds 0remains available for startup diagnostics.What is in it
-StartupTimeoutSecondsbefore starting XCL, then pass the validated timeout toWaitForExit.scripts/test.ps1, the entry point used by Windows CI.Tested
Clean head
319c5cf0a7eb40a250f1cc0a7ad5b2b3a99858b2onmain493dbd3. The duration, smoke-title, and smoke-artifacts fixtures passed in PowerShell 7.6.9 and Windows PowerShell 5.1.26100.9818. Test-runner probes with a Cargo stand-in confirmed all existing Cargo steps run after a passing duration fixture and a failed fixture stops before Cargo.Earlier head
4fc779e1db2ffea1586a84c60e0de58c10fc5230on upstreammain8b957be.scripts/test-smoke-duration.tests.ps1passed in PowerShell 7.6.9 and Windows PowerShell 5.1.26100.9818.Ten additional mock-launcher cases passed in each shell. The default, zero, and boundary durations reached the child with the expected
XCL_RUN_SECONDS. Invalid and overflowing combinations exited before launch.On the earlier compatibility revision
267d794based oncbc296a,cargo build --locked --workspacepassed.cargo test --locked --workspace --no-fail-fast -- --test-threads=4reported 1,153 passed, 1 failed, 46 ignored, and 34 skip diagnostics on Windows 11 build 26300.9974, Intel i5-10300H, and NVIDIA GTX 1650 driver 617.14, with Rust 1.100.0 MSVC in debug mode.execute_indirect_reads_the_arguments_written_before_italso failed in the earlier focused run on its clean upstream base.Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:15:21Z.
Tested exact head
04fcd86, script tests only, since this PR has no test report yet.Tested
powershell.exe -NoProfile -File scripts/test-smoke-duration.tests.ps1at the head: exit 0.930e8b4): exit 1: main'ssmoke.ps1does not check the duration first and fails later withno <...>.exe - build it first. So the new test catches the problem the PR fixes.Not tested
AI use
upstream-sync referenced this pull request2026-11-25 06:04:27 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:36:53Z.
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-25T14:35:47Z.
Verified
c86fa9b055957129961edb23ae86b3c86a1b3794through<shell> -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts\smoke.ps1 -Game Fixture -Xcl <stub.exe> [-Seconds N]. The native stub recorded its inheritedXCL_RUN_SECONDS, printed the fixture log path and exited immediately. Results matched in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9:Each valid case also printed the matching
seconds:field andexit: 0x0.scripts\test-smoke-duration.tests.ps1passed in both shells. The upper-bound case exercised the actual process-wait call with a short-lived child. It does not measure an elapsed multi-day timeout.Windows 11 26100.9711, i7-13700, RTX 4060. No retail run, Rust build or GPU workload. OpenAI Codex (GPT-6) ran the fixture and wrote the report.
Follow-up on review feedback
I checked the zero-duration review against the PR head and the smoke script from main
b49be1836844. On Windows PowerShell 5.1 and PowerShell 7, main forwardedXCL_RUN_SECONDS=0to an immediately exiting native stand-in and printedseconds: 0. The PR head rejected zero before starting the stand-in. The runtime source parses the value asu64and passes it toDuration::from_secs.Compatibility candidate keeps the 120-second grace period and the existing upper bound. On both shells, 0, 1 and 2147363 reached the child with their exact values. −1 and 2147364 exited before the child could write its marker.
scripts/test-smoke-duration.tests.ps1also passed in both shells. Actual title startup, GPU shutdown and a long-running child were outside these checks.Parent of the PR-based candidate:
c86fa9b055957129961edb23ae86b3c86a1b3794. OpenAI Codex (GPT-6) prepared the changes and ran the Windows CPU fixtures. No game, Rust workspace build or GPU workload.Retest on the rebased head
4fc779e1db2fThe rebased script now accepts zero and checks the sum of the guest duration and startup timeout. On Windows PowerShell 5.1 and PowerShell 7, the checked-in duration suite passed. I also ran nine CLI cases per shell with an immediately exiting native fixture. With the default startup timeout, the child received 0, 1 and 2,147,363 seconds exactly. Durations of −1 and 2,147,364 were rejected before the child started. With a 1-second startup timeout, 2,147,482 seconds reached the child, and raising that timeout to 2 seconds rejected the same duration. With an 86,400-second startup timeout, 2,061,083 seconds reached the child and 2,061,084 was rejected before launch.
This covers the zero-duration feedback and the revised wait limit. OpenAI Codex (GPT-6) ran the CPU-only fixtures. Actual title startup and elapsed multi-day waits were outside this run.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:44:30Z.
Review: COMMENTED
Could the lower bound remain
0?-Seconds 0currently reaches XCL asXCL_RUN_SECONDS=0; the host accepts that value and immediately writes its run report, flushes the log, and ends the title. With a mock launcher on both Windows PowerShell 5.1 and PowerShell 7, main produced aseconds: 0smoke block, while this head rejected the parameter before launching.ValidateRange(0, 2147363)keeps the timeout bound and preserves that startup-diagnostic use; the fixture could move zero to the accepted cases. Verified at exact headc86fa9b055957129961edb23ae86b3c86a1b3794with a mock, not a retail run. AI-assisted review with Codex.Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:24:52Z.
Tested: Clean
4fc779e1db2ffea1586a84c60e0de58c10fc5230, Windows 11 build 26200.9974, Ryzen 7 3800X. Windows PowerShell 5.1.26100.9818:powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File <script>passed forscripts/test-smoke-duration.tests.ps1,scripts/smoke-title.tests.ps1andscripts/test-smoke-artifacts.tests.ps1. A supplementary synthetic batch launcher probe passed all five cases. Duration/startup pairs(-1,120),(2147482,2),(1,0)and(1,86401)exited 1 without launching the child. The(0,1)control launched withXCL_RUN_SECONDS=0and both processes exited 0. No failed, ignored or skipped cases.Not tested: PowerShell 7, multi-day elapsed waits, Rust workspace tests, retail smoke and GPU.
AI use: T3 Code / Codex (
gpt-6.2-sol) ran and reran the checks and wrote this report.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:46:52Z.
Triage (#1607) – head
319c5cfNo open or merged PR makes the same change. #1073 edits the same
WaitForExit(($Seconds + $StartupTimeoutSeconds) * 1000)line in scripts/smoke.ps1, and its test fixture looks for that exact expression, so whichever merges second needs a rebase.scripts/test.ps1 now runs scripts/test-smoke-duration.tests.ps1, so CI runs it with the rest of the suite.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T20:49:40Z.
Follow-up review (head
319c5cf0, since4fc779e, diff read, not a merge-check):WaitForExit(($Seconds + $StartupTimeoutSeconds) * 1000)line and its fixture looks for that exact string, while this PR replaces it with[int]$waitMilliseconds(scripts/smoke.ps1~74). Whichever merges second needs a rebase and #1073's fixture string updated.New: none. Since the earlier head the change is a rebase plus wiring the fixture into
scripts/test.ps1(~5-6), so CI runs it.Fine:
[ValidateRange(0, 2147482)]with the[long]sum check (~16, ~26-29) rejects every combination above[int]::MaxValuems before XCL starts; the fixture covers both sides of the limit with default and custom startup allowances;XCL_RUN_SECONDS=0does end the title right after host setup (host.rs~294), as the README sentence says.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
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.