run_wine_tests: reject overflowing timeouts (WINE-TIMEOUT-OVERFLOW) #1015
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1015"
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?
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T16:55:38Z.
Claimed in the coordination issue as: WINE-TIMEOUT-OVERFLOW — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138342601
What and why
An oversized finite
--timeoutcould pass argument parsing and raiseOverflowErrorwhile waiting for the first subprocess. Bound the option by the largest whole number of seconds that fits Linuxpoll's signed millisecond timeout. The CLI reports the bound and rejects larger inputs before launching a test. A shorterTIMEOUTfrom CTest still takes precedence.Tested
Head
b70bde27, rebased onmaine18b59a5, same patch as56bed586(git range-diff); it merges cleanly withmain747809e7. Windows 11, Python 3.12.4:python -I -B tests/test_run_wine_tests.py, three runs: 74 run, 12 skipped, errors only intest_jobs_keeps_locks_serial_tests_and_dependenciesandtest_jobs_runs_that_many_tests_at_a_time(three runs each).maine18b59a5alone: both in two runs of three. With these tests on the runner ofmaine48ff037,test_timeout_over_process_limit_is_rejected_before_launchfails.tests/test_docs_cli_flags.py,tests/test_text_write_line_endings.py,tests/test_ctest_registration.py,tests/test_ci_registration.pyandtests/test_docs_links.py: OK.tests/test_tool_stdout_encoding.pyfails intest_every_main_block_reconfigures_stdout, as onmaine18b59a5alone (three tools this change does not touch).compileall,git diff --checkandpython -I scripts/check_no_game_data.pyon the two files: clean.Earlier head
56bed586, rebased onmain28a32e19; it merged cleanly withmain22372d86. Same patch: only the--timeouthelp next to the new--jobsoption conflicted. Windows 11, Python 3.12.4:python -I -B tests/test_run_wine_tests.py: 74 run, 12 skipped, 1 error, intest_jobs_runs_that_many_tests_at_a_time(the run before also had one intest_jobs_keeps_locks_serial_tests_and_dependencies). Unmodifiedmain22372d86gives 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.pyandtests/test_text_write_line_endings.py: OK.git diff --checkandpython -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 as743755d9, onmain6293c1c4), Windows 11, Python 3.12.4:tests/test_run_wine_tests.py65 run, OK (9 skipped).mainat82a2aabc, a synthetic passing test triggeredOverflowErrorwith2147484seconds on Debian WSL and1e100on Debian WSL and Windows.2147483completed on Debian.2147483completes a passing test.743755d9:python -I -B tests/test_run_wine_tests.pyon Windows, Python 3.12.4, 56 passed and 9 POSIX-only skips;python3 -I -B tests/test_run_wine_tests.pyon 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.py4 passed.GPUs tested: n/a (CPU-only synthetic tests).
AI-assisted: yes (Codex; the rebases on
28a32e19ande18b59a5with Claude Code).Checklist
mainand merges cleanly.Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T17:01:13Z.
Review: APPROVED
Verified on exact head 743755d9a117682d8aa90f1ad3182a7d1250d9e5.
python3 -I -B tests/test_run_wine_tests.pypasses 65/65 on Python 3.15.2. Both changed files passscripts/check_no_game_data.py, andgit diff --checkpasses. I also checked the boundary directly: 2,147,483 seconds is accepted; 2,147,484,1e100, NaN and infinity are rejected as argument errors. The focused regression ensures oversized values fail before launching a worker. Synthetic tests only; no Wine/Windows execution claimed.Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T21:22:33Z.
Rebased on
main6293c1c4:743755d9->c8e02cd4, same patch (git range-diff). The previous base failedtests/test_tool_stdout_encoding.py, which #948 fixed onmain, and the earlier CI run never started (action_required).tests/test_run_wine_tests.py65 run, OK (9 skipped);test_tool_stdout_encoding.py,test_docs_cli_flags.pyandtest_text_write_line_endings.pyOK;git diff --checkand the no-game-data check clean.743755d9.No code change in this rebase. CI on the new head is still queued.
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T23:11:06Z.
Rebased on
main28a32e19, where #1354 (--jobs) conflicted:c8e02cd4->56bed586, same patch; only the--timeouthelp next to the new--jobsoption needed merging. It also merges cleanly withmain22372d86. KernelSmoker's approval was on743755d9, before this and the previous rebase.Windows 11, Python 3.12.4:
tests/test_run_wine_tests.py74 run, 12 skipped, errors only intest_jobs_runs_that_many_tests_at_a_timeand, in one of two runs,test_jobs_keeps_locks_serial_tests_and_dependencies. Unmodifiedmain22372d86has the same errors.test_tool_stdout_encoding.py,test_docs_cli_flags.py,test_text_write_line_endings.py,git diff --checkand the no-game-data check pass.Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-25T19:50:24Z.
Rebased from
56bed586tob70bde27onmaine18b59a5, same patch (git range-diff). The old base was whytest_ci_registration.pyfailed in this pull request's CI (test_sub_co_same_operand.py); it passes on the new base. KernelSmoker's approval was given onc8e02cd4, not on this head.Windows 11, Python 3.12.4:
test_run_wine_tests.py74 run, 12 skipped, errors only in the twotest_jobs_*cases, whichmaine18b59a5alone gives too (both in two of three runs);test_ci_registration.py16,test_ctest_registration.py5,test_docs_links.py16,test_docs_cli_flags.pyandtest_text_write_line_endings.pypass. Not from this change:test_tool_stdout_encoding.pyfails onmainalone as well, the twocs_dpp_cmp.asmcases of the old CI run are unchanged onmain(not run here: nollvm-mc), andvk_xdxr_postbuild_readbackstill returns 77 withoutSKIP_RETURN_CODEonmain(#1418).AI-assisted: yes (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-27T19:42:28Z.
Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main
ec91d695cmerged without conflict; the PR's test files run with the pins oftests/requirements.txton Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5).not 0 < v <= MAXis true for both) and the existing nan/inf test passes. Nit: the error message reads oddly for nan.test_jobs_keeps_locks_serial_tests_and_dependencies(IndexError,tests/test_run_wine_tests.py:625), is timing-flaky on plain main too (1 in 4 runs on main, about the same with this PR): not caused by this PR.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:34:42Z.
Red/green: tests/test_run_wine_tests.py fails 2 assertions on main (--timeout 2147484 and 1e100 are accepted and the test is launched) and passes with the PR (cloud run on main
7daa4a4).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)