mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #1966] Prevent false GPU passes from shared test work directories #1972
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#1972
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/1966
Author: @lgr123
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:lgr123/gpu-test-work-ownership📝 Commits (2)
e97e979Prevent false GPU passes from shared test work directories99228f1Document separate GPU work folders for concurrent runs📊 Changes
3 files changed (+64 additions, -2 deletions)
View changed files
📝
docs/testing.md(+1 -0)📝
scripts/run_gpu_tests.py(+28 -2)📝
tests/test_run_gpu_tests_paths.py(+35 -0)📄 Description
Claimed as GPU-TEST-WORK-OWNERSHIP.
Two GPU test runs sharing explicit
--workcan produce a false PASS. In the reproduction, a failing syntheticcs_ldstest reported0/1 passedwhen run alone and1/1 passedwhen a second process replaced its module before it was checked. This reproduced on native Windows and Linux.The patched CLI reserves an explicit work directory until validation finishes. A second patched run targeting that directory exits before changing any artifacts. Give simultaneous runs separate work directories when mixing versions. An older runner can still overwrite artifacts because it does not acquire the lock. Sequential replay keeps the same artifact paths. The empty lock file stays in the directory so contenders lock the same file, and the OS releases the lock when its handle closes. The testing guide now documents separate directories for simultaneous runs.
Independent Radeon 780M verification reproduced the false PASS with real shaders, checked that two patched runners cannot race, and verified sequential reuse.
Reviewer check
python -I tests/test_run_gpu_tests_paths.py WorkDirectory.test_simultaneous_cli_runs_cannot_share_an_explicit_work_directoryThe regression exercises the CLI with a second process, a separate work directory, and a retry after the owner exits with a failed result. It requires no GPU, Wine, or game files.
Tested
GPUs tested: n/a.
AI-assisted: yes.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.