Repository navigation
Conversation
AGInformatique81
left a comment
There was a problem hiding this comment.
Tested b32f56c7 on Linux via WSL (CPython 3.14.7). All 55 Wine runner tests passed.
I also reproduced an exit-cleanup race with synthetic paths. After readlink confirms ownership, I made the unlink stub remove the link once before delegating to the real unlink. The second unlink raises FileNotFoundError, the exception escapes __exit__, and the scratch directory remains. This is the window where another process removes the mapping between the ownership check and unlink.
I tested a local adjustment that treats FileNotFoundError from unlink as already removed and runs scratch cleanup in finally. The race probe then passed (no exception and no scratch directory), and the full 55-test suite still passed. Could you cover this interleaving in the PR?
CPU-only synthetic test. AI-assisted with Codex.
|
Tested
AI-assisted (Devin). |
|
@AGInformatique81 Fixed in Added two deterministic synthetic regressions: one removes the link immediately after the ownership read, and the other injects Validation: Linux under WSL/Python 3.13.3, 57/57 pass; Windows 11/Python 3.14.0, 45 passed and 12 expected POSIX-only skips; diff check clean. CPU only, synthetic paths, no Wine installation, game files or GPU/driver. AI-assisted (Codex). PR description updated; still draft pending #4359. |
AGInformatique81
left a comment
There was a problem hiding this comment.
Retested da67a855 on Linux via WSL (Python 3.14.7). My original interleaving now passes: another process removes the mapping before unlink, no exception escapes, and the scratch directory is removed. All 57 runner tests passed.
I also combined this head (including #4359) with #4378 at 9beff025 and #4462 at a39e559c. Both merges were clean. Linux passed all 71 tests; Windows passed 59 with 12 POSIX-only skips.
Synthetic paths only. AI-assisted with Codex.
Kam471
left a comment
There was a problem hiding this comment.
Ran this at da67a855 on Windows 11: python -I tests/test_run_wine_tests.py -> 57 tests, OK (12 skipped); git diff --check clean.
The Wine runner now preserves replaced drive mappings during cleanup, and the existing runner tests pass. No blocking issue.
|
Tested
No game data. AI-assisted. |
|
Tested 5b7dd8c on Windows 11, Python 3.12.10 (CPU only, no game files): pass (POSIX symlink tests skipped on Windows).
AI-assisted review (Gemini). |
TEST-962 — claim before implementation, carried into coordination issue #4683. Found while doing the claimed independent reviews of #4359/#4378 (TEST-955).
Depends on: #4359
After successful Wine drive setup,
DriveMap.__exit__()unlinked any symlink at the drive path. If another process replaced that mapping during the run, cleanup deleted the replacement. Cleanup now checks that the link still points at this context's scratch directory before unlinking it. If another process removes the mapping between that ownership check and unlink,FileNotFoundErroris treated as already cleaned. Scratch cleanup runs infinally, including when unlink raises another error; those other errors still propagate.This follows #4359's setup-failure cleanup as an attributed dependency and fixes the later context-exit phase. Synthetic regressions cover replacement symlinks, dangling replacements, regular files, removed mappings, an exception from the test body, removal after the ownership read, and a permission error during unlink. Before the corresponding source fixes the replacement cases deleted someone else's mapping, the removal race raised
FileNotFoundError, and other unlink errors leaked scratch.Validation at
5b7dd8ca, integrated with main98fa503f, CPU only:python -I tests/test_run_wine_tests.py— 59/59 pass.git diff --checkpasses.--helpand the no-game-data check.AI-assisted (Codex). No Wine installation, GPU, or game files used; all paths and contents in the regressions are temporary synthetic fixtures. Ready for review; merge #4359 before this PR. Its setup-cleanup implementation is included with the original author's attribution; the current dependency head has identical content to that included commit.