Repository navigation
fix(wine): match CTest output regexes across CRLF (Codex) - #6134
evilclanker9000 wants to merge 3 commits into
Conversation
CTest ignores carriage returns at line boundaries when applying output expressions. Matching the raw process output can hide a forbidden diagnostic under Wine.
Cover each CTest output expression and ensure that an embedded carriage return remains visible in diagnostics.
DoubleD17
left a comment
There was a problem hiding this comment.
CTest also treats NUL as a line boundary when matching output
At 6bf7c74d29d5da0336e8045ae63308b272c97796, the normalization covers LF and CRLF, including consecutive CRs. CTest's line reader also treats NUL as a line boundary and strips the preceding CRs there.
On Windows with CTest 3.31.12, a synthetic child that exits 0 after writing b"PREFIX\x00SUFFIX\n" fails under FAIL_REGULAR_EXPRESSION set to PREFIX\nSUFFIX. CTest exits 8 and its JUnit marks the test failed. With the same pattern as SKIP_REGULAR_EXPRESSION, CTest skips both the NUL and CR+NUL cases. At the reviewed head, the substitution leaves those byte sequences in the decoded output and the pattern misses, so the forbidden case would still pass. This gap also exists on the base.
Could the matching view treat both LF and NUL as boundaries and cover the NUL case in the existing synthetic matrix? The diagnostic output can retain the original text. I ran native CTest with a synthetic child, checked the regex input independently, and assessed the PR behavior by inspecting the diff.
No game files. AI-assisted.
CTest also starts a new output line at NUL and drops preceding carriage returns. Compare the same boundaries without changing the raw diagnostic.
|
Updated in 294ef56. Windows CTest 3.31.6-msvc6 reproduced fail on NUL, pass on CR+NUL, and skip on repeated CR+NUL. All nine new Wine-runner cases failed at the reviewed head and now pass. The full Windows suite reports 53 passed and 8 skipped. Diagnostics still retain the original bytes after decoding. AI-assisted. |
Claimed in the coordination issue as: EGEN-WINE-CTEST-CRLF-REGEX
What and why
Match Wine test output against CTest's line boundaries for all three output regex properties. Previously, a forbidden pattern spanning two CRLF-separated lines could go undetected. The runner now normalizes carriage returns at line boundaries for matching and retains raw diagnostic output.
Tested
561b65a8, six CRLF and repeated-CR cases returned the wrong fail, pass or skip result. On6bf7c74d, all cases passed, including the LF control, the lone-CR control and raw diagnostic checks.python -I tests/test_run_wine_tests.py: 60 tests with 8 skips at the implementation commit using the unchanged test suite, then 61 tests with 8 skips at the regression-test commit. Windows CTest 3.31.6-msvc6 independently failed the forbidden pattern on LF and CRLF, passed the required pattern and skipped the skip pattern.AI-assisted: yes
Checklist
AI-assisted.