mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #2332] run_game_wine.sh: harden inner args, PCI matching, bash wrapper, and summary exit #2336
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#2336
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/2332
Author: @kirigayakazima
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/run-game-wine-safety📝 Commits (1)
f017b43run_game_wine.sh: harden inner args, PCI matching, bash wrapper, and summary exit📊 Changes
2 files changed (+269 additions, -13 deletions)
View changed files
📝
scripts/run_game_wine.sh(+35 -13)➕
tests/test_run_game_wine_safety.py(+234 -0)📄 Description
Claimed in the coordination issue as: RUN-GAME-WINE-UPPERCASE-DEVICE-INNER-BASH-AND-SUMMARY-EXIT (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7193935612)
What and why
--innermode inscripts/run_game_wine.sh: require all 5 internal arguments (exit 2), safely resolveWINESERVERwhenWINEhas no adjacent executable, avoid unbound variable errors onWINEDLLOVERRIDES, andwaiton stopped background screenshot/watchdog jobs (using aTERM/INT-trapped background sleep for$WATCHso watchdog sleeps never linger).--screenshot-everyvalues (00,05) and nonexistent--buildpaths upfront (exit 2), and ensure the--lockparent directory exists (mkdir -p) before opening the lock descriptor.--devicePCI IDs case-insensitively against/sys/class/drm(orLEONIDA_DRM_SYSFS_DIR) while keepingMESA_VK_DEVICE_SELECT="$DEVICE!"unchanged.#!/usr/bin/env bashin the generated$RUN/inner.shwrapper so Bash$'...'quoting works cleanly even when/bin/shisdash.tools/game_run_summary.py(PIPESTATUS[0]) instead of returningtee's exit status.tests/test_run_game_wine_safety.py.Tested
python -I tests/test_run_game_wine_safety.py -v(via Git Bash): 3 passed, 0 failed (detachedupstream/mainbaseline with only the new test file fails with 2 failures). Note:tests/test_run_game_wine.pyis POSIX-only (import fcntl) and was not run natively on Windows.python -I tests/test_ci_registration.py: 16 passed.python -I tests/test_text_write_line_endings.py: 3 passed.python -I scripts/check_no_game_data.py,python -I -m compileall -q tests/test_run_game_wine_safety.py,git ls-files -s scripts/run_game_wine.sh(100755), andgit diff --cached --check: passed.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.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.