tests/run_wine_tests: one timing log per child, so --jobs tests pass on Windows (TEST-WINE-JOBS-TIMING-WINDOWS) #1722
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1722
Loading…
Reference in a new issue
No description provided.
Delete branch "test/wine-jobs-timing-windows"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as: TEST-WINE-JOBS-TIMING-WINDOWS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158675336)
What and why
On native Windows,
test_jobs_runs_that_many_tests_at_a_timeandtest_jobs_keeps_locks_serial_tests_and_dependenciesin
tests/test_run_wine_tests.pyfail on every run, withIndexError(a span with no end) orValueError(two linesmerged into one) in
intervals().The
timed()child processes all append to one sharedtiming.logat the same time. Appends from several processesto one file are not atomic on Windows, so lines are lost or merged. Reproduced outside the test: six processes doing
the same two appends to one file left 11 lines instead of 12.
The fix is in the test only: each child writes its own
timing/<name>.log, andintervals()reads them all.scripts/run_wine_tests.pyis unchanged.Tested
Windows 11, Python 3.14, on
main3de22a1:python -I tests/test_run_wine_tests.py: before,FAILED (errors=2, skipped=12)on every run; after,OK (skipped=12)on 4 of 4 runs.python -I tests/test_text_write_line_endings.py: OK.Not run on Linux; the change does not depend on the platform.
GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code
Thanks for the independent A/B on Windows and WSL. The WSL volume result matches the cause: appends from several processes aren't reliable on Windows file systems. The contextlib.chdir failures are pre-existing and Python 3.10 is below the project's 3.12 minimum, so I've left them out of this PR.
Verified on native Windows at head
67b81fe83:tests/test_run_wine_tests.pyerrors onmainintest_jobs_runs_that_many_tests_at_a_timeandtest_jobs_keeps_locks_serial_tests_and_dependencies(the shared timing log loses lines,IndexError/ValueError: not enough values to unpack) and passes here (72 tests, OK, 12 skipped).Native Windows 10 Pro 19045, CPython 3.12,
py -3.12 -I, checkout under a non-ASCII profile path (C:\Users\Oğuz\..., TEMP is the 8.3 aliasC:\Users\OUZ~1\...). No game files.AI-assisted (Claude Code).
Independent verification on native Windows with Python 3.13.17, using the exact test fixture from PR head
67b81fe837b0b4ef9045d3d9e8205666aaf65268with the local runner ate5a7c8942.tests/test_run_wine_tests.pysuite: 60 passed, 12 skipped.No game files or GPU were used. Test verification was AI-assisted with Codex.
Both
--jobstiming cases errored on native Windows atmaind1dff7949. With67b81fe83in the local CI integration and #2193's two-worker runner,test_run_wine_tests.pycompleted with 60 passes and 12 skips. This was one local run.AI-assisted testing.