mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1410] tests: each fake test of the --jobs tests logs to a file of its own (TEST-WINE-JOBS-TIMING-LOG) #1440
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1440
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1410
Author: @milk4sale
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:test/wine-jobs-timing-log📝 Commits (1)
63be3a6tests: each fake test of the --jobs tests logs to a file of its own (TEST-WINE-JOBS-TIMING-LOG)📊 Changes
1 file changed (+7 additions, -5 deletions)
View changed files
📝
tests/test_run_wine_tests.py(+7 -5)📄 Description
Claimed in the coordination issue as: TEST-WINE-JOBS-TIMING-LOG (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147387006)
What and why
tests/test_run_wine_tests.pyfails on Windows since #1354 added the--jobstests. In thecheckjob's loop on awindows-latestrunner it failed in 2 of the 4 runs that had the file, both times inMainTest.test_jobs_keeps_locks_serial_tests_and_dependencies: once withKeyError: 'after'and once withIndexError: list index out of rangeinoverlap(). It passes on Linux and macOS. Nobody saw it becausecheckis cancelled at its 15-minute limit before it prints its list of failed files (#1404).The cause is in the test, not in
scripts/run_wine_tests.py. The fake test programs of the two--jobstests run several at a time, and each appended itsstartandendline to one sharedtiming.logwithopen(log, 'a').write(...). On Windows an append from another process is not atomic: both writers find the same end of file and one line replaces the other. Then:KeyError);IndexError, ornot enough values to unpackinmost_at_once);intervals().Each fake test now logs to a file of its own (
timing.<name>.log), andintervals()reads them all. The tests assert exactly what they asserted before. Seven lines change in one test file.Tested
Measured on GitHub's runners with Python 3.12, one run per system, from a scratch branch on my fork whose workflow ran only this (run 45510380923):
windows-latestubuntu-24.04macos-26--jobstests run 60 times onmain's file: runs that failedThe first row is the cause measured on its own; a round on Windows typically kept 2 to 4 of its 8 lines. The scratch branch ran this change without the sentence I then added to
timed's docstring; the code is the same.In the full
checkloop the file failed in 2 of 4 runs (fork runs 45502632816 and 45506216167) and passed in 2, so there it is intermittent; run on their own the two tests failed every time.Locally, on Linux with Python 3.14.10:
python -I tests/test_run_wine_tests.py: 72 tests pass.--jobstests 20 times in a row: 20 pass.python -I scripts/check_no_game_data.py tests/test_run_wine_tests.pyandgit diff --check.Not run: Wine itself. The change is inside the test's fake programs and does not touch the runner.
GPUs tested: n/a (one Python test file)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.