[PR #1015] run_wine_tests: reject overflowing timeouts (WINE-TIMEOUT-OVERFLOW) #1051

Open
opened 2026-11-26 20:19:55 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1015
Author: @TheGeogeo
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/wine-timeout-overflow


📝 Commits (1)

  • b70bde2 run_wine_tests: reject overflowing process timeouts

📊 Changes

2 files changed (+22 additions, -6 deletions)

View changed files

📝 scripts/run_wine_tests.py (+7 -6)
📝 tests/test_run_wine_tests.py (+15 -0)

📄 Description

Claimed in the coordination issue as: WINE-TIMEOUT-OVERFLOW — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138342601

What and why

An oversized finite --timeout could pass argument parsing and raise OverflowError while waiting for the first subprocess. Bound the option by the largest whole number of seconds that fits Linux poll's signed millisecond timeout. The CLI reports the bound and rejects larger inputs before launching a test. A shorter TIMEOUT from CTest still takes precedence.

Tested

Head b70bde27, rebased on main e18b59a5, same patch as 56bed586 (git range-diff); it merges cleanly with main 747809e7. Windows 11, Python 3.12.4:

  • python -I -B tests/test_run_wine_tests.py, three runs: 74 run, 12 skipped, errors only in test_jobs_keeps_locks_serial_tests_and_dependencies and test_jobs_runs_that_many_tests_at_a_time (three runs each). main e18b59a5 alone: both in two runs of three. With these tests on the runner of main e48ff037, test_timeout_over_process_limit_is_rejected_before_launch fails.
  • tests/test_docs_cli_flags.py, tests/test_text_write_line_endings.py, tests/test_ctest_registration.py, tests/test_ci_registration.py and tests/test_docs_links.py: OK.
  • tests/test_tool_stdout_encoding.py fails in test_every_main_block_reconfigures_stdout, as on main e18b59a5 alone (three tools this change does not touch).
  • compileall, git diff --check and python -I scripts/check_no_game_data.py on the two files: clean.

Earlier head 56bed586, rebased on main 28a32e19; it merged cleanly with main 22372d86. Same patch: only the --timeout help next to the new --jobs option conflicted. Windows 11, Python 3.12.4:

  • python -I -B tests/test_run_wine_tests.py: 74 run, 12 skipped, 1 error, in test_jobs_runs_that_many_tests_at_a_time (the run before also had one in test_jobs_keeps_locks_serial_tests_and_dependencies). Unmodified main 22372d86 gives the same errors (three runs: both twice, only the first named here once), so they do not come from this change.
  • tests/test_tool_stdout_encoding.py, tests/test_docs_cli_flags.py and tests/test_text_write_line_endings.py: OK.
  • git diff --check and python -I -B scripts/check_no_game_data.py scripts/run_wine_tests.py tests/test_run_wine_tests.py: clean.

Earlier heads:

  • c8e02cd4 (same patch as 743755d9, on main 6293c1c4), Windows 11, Python 3.12.4: tests/test_run_wine_tests.py 65 run, OK (9 skipped).
  • On main at 82a2aabc, a synthetic passing test triggered OverflowError with 2147484 seconds on Debian WSL and 1e100 on Debian WSL and Windows. 2147483 completed on Debian.
  • The CLI now rejects both oversized values with exit 2. The focused tests check that no worker launches and that 2147483 completes a passing test.
  • 743755d9: python -I -B tests/test_run_wine_tests.py on Windows, Python 3.12.4, 56 passed and 9 POSIX-only skips; python3 -I -B tests/test_run_wine_tests.py on Debian WSL, Python 3.11.2, 65 passed, and 67 after clean temporary merges with #999 (e8226ee4) and #919 (3de809cf); tests/test_docs_cli_flags.py 4 passed.

GPUs tested: n/a (CPU-only synthetic tests).

AI-assisted: yes (Codex; the rebases on 28a32e19 and e18b59a5 with Claude Code).

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1015 **Author:** [@TheGeogeo](https://github.com/TheGeogeo) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/wine-timeout-overflow` --- ### 📝 Commits (1) - [`b70bde2`](https://github.com/ubiquitarianism/leonida/commit/b70bde278b9a011598668566092991799a33d6e9) run_wine_tests: reject overflowing process timeouts ### 📊 Changes **2 files changed** (+22 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `scripts/run_wine_tests.py` (+7 -6) 📝 `tests/test_run_wine_tests.py` (+15 -0) </details> ### 📄 Description Claimed in the coordination issue as: WINE-TIMEOUT-OVERFLOW — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138342601 ### What and why An oversized finite `--timeout` could pass argument parsing and raise `OverflowError` while waiting for the first subprocess. Bound the option by the largest whole number of seconds that fits Linux `poll`'s signed millisecond timeout. The CLI reports the bound and rejects larger inputs before launching a test. A shorter `TIMEOUT` from CTest still takes precedence. ### Tested Head `b70bde27`, rebased on `main` `e18b59a5`, same patch as `56bed586` (`git range-diff`); it merges cleanly with `main` `747809e7`. Windows 11, Python 3.12.4: - `python -I -B tests/test_run_wine_tests.py`, three runs: 74 run, 12 skipped, errors only in `test_jobs_keeps_locks_serial_tests_and_dependencies` and `test_jobs_runs_that_many_tests_at_a_time` (three runs each). `main` `e18b59a5` alone: both in two runs of three. With these tests on the runner of `main` `e48ff037`, `test_timeout_over_process_limit_is_rejected_before_launch` fails. - `tests/test_docs_cli_flags.py`, `tests/test_text_write_line_endings.py`, `tests/test_ctest_registration.py`, `tests/test_ci_registration.py` and `tests/test_docs_links.py`: OK. - `tests/test_tool_stdout_encoding.py` fails in `test_every_main_block_reconfigures_stdout`, as on `main` `e18b59a5` alone (three tools this change does not touch). - `compileall`, `git diff --check` and `python -I scripts/check_no_game_data.py` on the two files: clean. Earlier head `56bed586`, rebased on `main` `28a32e19`; it merged cleanly with `main` `22372d86`. Same patch: only the `--timeout` help next to the new `--jobs` option conflicted. Windows 11, Python 3.12.4: - `python -I -B tests/test_run_wine_tests.py`: 74 run, 12 skipped, 1 error, in `test_jobs_runs_that_many_tests_at_a_time` (the run before also had one in `test_jobs_keeps_locks_serial_tests_and_dependencies`). Unmodified `main` `22372d86` gives the same errors (three runs: both twice, only the first named here once), so they do not come from this change. - `tests/test_tool_stdout_encoding.py`, `tests/test_docs_cli_flags.py` and `tests/test_text_write_line_endings.py`: OK. - `git diff --check` and `python -I -B scripts/check_no_game_data.py scripts/run_wine_tests.py tests/test_run_wine_tests.py`: clean. Earlier heads: - `c8e02cd4` (same patch as `743755d9`, on `main` `6293c1c4`), Windows 11, Python 3.12.4: `tests/test_run_wine_tests.py` 65 run, OK (9 skipped). - On `main` at `82a2aabc`, a synthetic passing test triggered `OverflowError` with `2147484` seconds on Debian WSL and `1e100` on Debian WSL and Windows. `2147483` completed on Debian. - The CLI now rejects both oversized values with exit 2. The focused tests check that no worker launches and that `2147483` completes a passing test. - `743755d9`: `python -I -B tests/test_run_wine_tests.py` on Windows, Python 3.12.4, 56 passed and 9 POSIX-only skips; `python3 -I -B tests/test_run_wine_tests.py` on Debian WSL, Python 3.11.2, 65 passed, and 67 after clean temporary merges with #999 (`e8226ee4`) and #919 (`3de809cf`); `tests/test_docs_cli_flags.py` 4 passed. GPUs tested: n/a (CPU-only synthetic tests). AI-assisted: yes (Codex; the rebases on `28a32e19` and `e18b59a5` with Claude Code). ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1051
No description provided.