Repository navigation
Conversation
…nedbg Wine starts its crash debugger for an unhandled exception, such as a call to a function it does not implement. On Xvfb nothing ends it, so the test waited for the 120 s timeout (6 tests, 720 s of one Wine job). The runner now sets AeDebug Debugger to false in the prefix for the run and restores it; the test still fails, in under a second. --keep-wine-debugger leaves the old behaviour.
|
Tested
|
AGInformatique81
left a comment
There was a problem hiding this comment.
Tested d989f9eb on Linux via WSL (Python 3.14.7, Wine 10.0). The 55 runner tests pass. An isolated 64-bit Wine prefix exposed a case where an existing user setting is deleted:
- Set AeDebug
Debuggerto a customREG_EXPAND_SZvalue, or to an emptyREG_SZ.wine reg querysucceeds in both cases. - Enter and exit
WineDebugger. The value becomesREG_SZ falseduring the run and is deleted on exit (reg queryreturns 1).
The matcher only recognizes REG_SZ, and the existing-value check treats an empty string as absent. I tested a local adjustment that leaves successful queries of an unrecognized value alone and distinguishes an empty value from a missing one. Both values and their types were unchanged during and after the run on Wine 10.0; all 55 existing tests still passed. Please add both cases to the preservation tests.
Synthetic registry values in a disposable prefix. AI-assisted with Codex.
|
Tested Bug: a
The docstring promises "Nothing is done ... when the prefix names a debugger other than winedbg", so the third row is the intent gap. It is narrow (Wine's default is Fix: distinguish "query succeeded and the value is there" from "no value". Either widen the regex to Two notes, not requests: a No GPU, no game data. AI-assisted. |
|
Tested
AI-assisted (Devin). |
|
Reviewed
One nit, not a blocker: if the restore in Tested the CPU side only, no Windows box here. AI-assisted review. |
|
Tested d989f9e merged with main 03b09a0 on Linux (WSL2), Python 3.12.16: pass. |
…h a retry, and keep an abort a failure Review of ItsNotRexed#4462. The Debugger value is changed only when it is exactly the REG_SZ default or the query shows it absent (another command, a wrapper, REG_EXPAND_SZ, an empty value or a failed query is left alone). A restore that fails is retried once and then reported with the command that restores it by hand. A test that Wine aborted is a failure whatever WILL_FAIL, the exit code or PASS_REGULAR_EXPRESSION say, as it was when the crash debugger kept it waiting until the timeout. docs/testing.md names the SIGKILL and shared-prefix limits.
|
Thank you all for testing and reading this. Fixes for the review are pushed to the branch as a39e559 (on top of d989f9e). Thanks to mrbean56 and AGInformatique81: you both found the real bug. A Debugger value that exists but is REG_EXPAND_SZ, or an empty REG_SZ, was treated as "absent": the run overwrote it with REG_SZ false and deleted it at exit. Now the value is touched only when the query succeeds and the value is exactly REG_SZ "winedbg --auto %ld %ld", or when the query shows the value is absent ("unable to find ..."). Any other successful query, and any query that fails for another reason, leaves the prefix alone and prints a note. This also drops the old "contains winedbg" check, which matched a user's own wrapper. Tests: expandable string, default text in the wrong type, a wrapper around winedbg, an empty value, a failed query (all fail on d989f9e, pass now). Thanks to SebSilent, SweatierKey, Atomic258 and kapitche for the independent runs (55/55 on Python 3.10 to 3.14, and the negative controls: the new tests fail without the change). The mutation kapitche ran, dropping the delete of a value that was absent, is still covered by test_a_value_the_query_proves_absent_is_removed_again. Also changed:
Real Wine 11 on a fresh prefix, 7 synthetic tests (stub abort, null write, pass, skip), --timeout 30, with the new head: PASS/FAIL/SKIP list and summary line identical to main's script (2 passed, 4 failed, 1 skipped), 46 s instead of 130 s, Debugger back to "winedbg --auto %ld %ld" afterwards. Not bugs:
|
|
Verified the fix at
AI-assisted. |
|
Code read + local run, head Tested: reconstructed the PR locally (base files + this diff) on macOS (POSIX), The same 3 tests fail on unmodified Code-read notes:
Verdict: pass (CPU review). AI-assisted review. |
AGInformatique81
left a comment
There was a problem hiding this comment.
Retested a39e559c with Wine 10.0 in a disposable 64-bit prefix under WSL. My original REG_EXPAND_SZ and empty REG_SZ debugger values were unchanged during and after the run. Both final queries returned success with the original type and value. All 62 runner tests passed on Python 3.14.7.
I also combined this head with #4446 at da67a855 (including #4359) and #4378 at 9beff025 without conflicts. Linux passed all 71 tests; Windows passed 59 with 12 POSIX-only skips. AI-assisted with Codex.
Flyander
left a comment
There was a problem hiding this comment.
[P3] The SIGKILL recovery command only restores the default value when that was the original state. WineDebugger also supports a missing Debugger value: it temporarily writes false, but after SIGKILL the documented command adds winedbg --auto %ld %ld instead of restoring absence. Please record whether the value existed and document both recovery actions (set the default or delete the value), so users can restore the state the context manager preserves during a normal exit.
…he value) before the run (review)
|
Thanks @Flyander, right: the documented command only covered the prefix that had the default value. Fixed in 7ae183f:
Test: |
|
Tested 7ae183f on macOS 27.2.1 / CPython 3.15, no Wine, no game data: pass.
Two notes, not blockers: |
|
Re-checked at
Nothing further from me on this one. No game data. AI-assisted. |
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 39e6e98d on Windows 11: python -I tests/test_run_wine_tests.py -> 63 tests, OK (5 skipped); git diff --check clean.
WineDebugger only rewrites AeDebug\Debugger when it is exactly the winedbg --auto %ld %ld default (or absent), restores it twice-best-effort in __exit__, prints the exact restore command before the tests start, and leaves a custom/REG_EXPAND_SZ/empty value, a missing prefix or --keep-wine-debugger alone. ABORTED turns Wine's starting debugger... report into a failure regardless of WILL_FAIL, the exit code or an output expression, which is the behaviour the 120 s wait used to hide. The 5 skipped cases are the ones that need a real Wine. No blocking issue.
# Conflicts: # scripts/run_wine_tests.py
|
Tested a47283d merged with main 98fa503 on Linux (Python 3.12.16): pass - tests/test_run_wine_tests.py 65 tests OK; tests/test_docs_*.py all 10 OK. Negative control: upstream/main scripts/run_wine_tests.py with the PR test file: 3 failures + 13 errors; restored, OK. Wine itself is not installed here, so the real winedbg behaviour is not exercised (the tests mock wine reg). |
…dict; the restore command uses the wine of the run
|
Thanks @wavehs. Commit 11f7c33 takes both notes. 1) ABORTED now applies only when the test exits non-zero: Wine ends an aborted process with a non-zero code, while a test that exits 0 with the "starting debugger..." line ran a child it expected to crash (queue_proxy_test --child-crash) and keeps its own verdict. The failure message says so. A test that expects a crashed child and also exits non-zero still shows as an abort. 2) restore_command() now prints the wine command the run uses (--wine or $WINE, shell-quoted, so a Proton path works), and docs/testing.md shows . New test for the Proton-path command; the old zero-exit test now asserts the new rule. RunPod, Python 3.13: 66 passed. AI-assisted. |
# Conflicts: # docs/testing.md # scripts/run_wine_tests.py
|
Tested |
shayderrr
left a comment
There was a problem hiding this comment.
Review
Reviewed test coverage in PR #4462: run_wine_tests: an aborted test ends at once instead of waiting 120 s for winedbg (~12 min off each Wine CI job).
Scope: docs/testing.md, scripts/run_wine_tests.py, tests/test_run_wine_tests.py
Diff: +310 / -2 across 3 file(s).
The change stays inside the stated scope and the touched files line up with the description. No unrelated production paths are pulled in, and the stated behavior is directly exercised by the diff. I'm approving this one.
Reviewed by shayderrr via automated batch review.
|
Thanks @tedin7 - I went through run_wine_tests: an aborted test ends at once instead of waiting 120 s for winedbg (~12 ... and the diff around |
|
Verified at a47283d: tests/test_run_wine_tests.py gives 65 tests / 55 subtests green under python -I (re-run at your rebased head 509eed6 too), with identical counts under pytest; test_docs_links, test_docs_table_rows and test_i18n_index pass. The earlier base conflict is resolved by your rebase — 509eed6 merges clean against current main 1cc6e3c. Nothing here is superseded: main has no crash-debugger handling (grep AeDebug/winedbg/ABORTED on the runner comes up empty). I checked the premise against Wine's source: dlls/kernelbase/debug.c prints the "starting debugger" line BEFORE reading the AeDebug Debugger value, so the new ABORTED classifier does fire with Debugger="false" (the ntdll/exception.c abort variant never hangs, so leaving it unclassified is right). The WILL_FAIL interaction is scoped correctly — d3d12_queue_wait_timeout is the only WILL_FAIL test. No Wine executed here. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
Item: new, claimed here.
Depends on: none.
What and why
Under Wine, a Windows process that hits an unhandled exception (for example a call to a function this Wine does not implement:
Unimplemented function KERNEL32.dll.CopyFile2 called ... aborting) starts Wine's crash debugger,winedbg --auto. On the Xvfb display of the CI job nothing ends it, so the test sits untilscripts/run_wine_tests.pykills it at--timeout(120 s) and reports a failure.In CI run 45043441962 (job "wine (ubuntu)", Wine 9) that is 6 tests (
d3d12_draw,d3d12_compute,d3d12_pipeline_library,d3d12_set0_compute,queue_proxy,file_system) x 120 s = 720 s of the 793 s step "Windows tests under Wine"; the other 106 tests take ~1.6 s each. The winehq-stable job of the same run spends 517 s for the same reason (4 tests).run_wine_tests.pynow setsHKLM\Software\Microsoft\Windows NT\CurrentVersion\AeDebug\Debuggertofalsein the prefix for the run and puts the old value back at the end (or deletes it if there was none). An aborted test then ends in under a second with a non-zero exit code: the same FAIL, found fast.run_testand the--timeouthelp line, so the two merge cleanly.--keep-wine-debugger, or when the prefix names a debugger other than winedbg. Ifwine regfails to run, the runner prints a note and goes on as before.--timeoutstill kills a real stall; it is unchanged.Proof (same results, much faster)
The pod's Wine is 11, which implements CopyFile2, so the real tests do not hang there. The proof uses a small synthetic exe (clang-cl, from
xwin) that raises Wine's own unimplemented-function stub exception for CopyFile2 (args), dereferences null (c), exits 0 (o) or exits 77 (k), and a fresh prefix made as the CI step does (xvfb-run -a sh -c 'wineboot --init && wineserver -w').Crash-debugger variants, exit code and time of one aborted process (stub / null write):
run_wine_tests.pyon 7 tests (2 pass, 1 skip via SKIP_RETURN_CODE, 4 aborts: 2 stub, 2 null write),--timeout 30, same prefix,xvfb-run, before = the main version of the script:[PASS]/[FAIL]/[SKIP]list--summaryMarkdown table--require ok --require ok2winedbg --auto %ld %ldWith the CI timeout of 120 s the same 4 aborts cost 480 s before; the expected saving in CI is about 700 s of the 793 s step and about 480 s of the 517 s one.
The backtrace winedbg would print is no longer in the log of an aborted test; the log keeps Wine's one-line message ("Unimplemented function ... called at address ..."), which names the missing function, and the exit code.
--keep-wine-debuggerbrings the old behaviour back for someone who wants the backtrace.Tests:
python -I tests/test_run_wine_tests.py(5 new cases through a stand-in forwine reg: off during the run and restored, removed again when absent, a user's own debugger left alone,--keepand a missing prefix change nothing, an unstartable wine does not stop the run). 55 tests pass;tests/test_tool_stdout_encoding.pypasses.Duplicate check: PR searches "CopyFile2", "winedbg", "AeDebug", "wine timeout", "wine debugger", "run_wine_tests", and
git log -Sfor AeDebug/winedbg/ShowCrashDialog on main: nothing sets the crash debugger. Coordination issue #4257: no mention. Closest open PRs: #3655, #2882, #4079, #4091.AI-assisted. No game files.