Skip to content

Fix win tests freeze - #45

Merged
igagis merged 6 commits into
mainfrom
fix_win_tests_freeze
Nov 4, 2026
Merged

igagis merged 6 commits into
mainfrom
fix_win_tests_freeze

Conversation

@igagis

@igagis igagis commented Nov 4, 2026

Copy link
Copy Markdown
Member

No description provided.

Run the test exe in separate steps with per-step timeouts (kill on hang):
- single non-IO test on the main thread (no runner involved)
- single IO test on the main thread (no runner involved)
- parser suite via the runner thread
- full suite with --about-to-run --print-passed to identify the hanging test

Also add job-level timeout-minutes: 30 so the job cannot hang indefinitely.
clargs only supports '--key=value' form for key arguments with values
(and the passed-test flag is named '--passed', not '--print-passed').
The previous arguments hit the clargs parser assertion (parser.cpp:271)
or were rejected as unknown, which masked the real test behaviour.
Each suite is run separately via the runner thread with a 45s kill timeout,
to find which suite (or multi-test handshake) deadlocks. Previous round
proved single-test runs (main thread and runner thread) pass, while the full
531-test run hangs before any per-test output is flushed.
The per-suite run found that ONLY the 'tree_reading' suite hangs (all other
11 suites pass via the runner thread, including the other file-I/O suites).
The parser is provably linear in the input, so the hang must be a silent
thread death or deadlock. Added unbuffered stderr markers to the test body
to locate the exact stop point, plus a main-thread variant of the test
(--test implies no_catch, so thrown exceptions print before the break).
The tree_reading test evaluated i->children.front().value.string as
the '<<' argument of a passing check. 'front()' on the empty children
vector is undefined behaviour: the MSVC debug CRT (vcpkg CI builds
with /MDd + /RTC1) detects it and the test runner thread dies without
any visible message, so the main thread waits forever for a reply that
never comes and the CI job appears frozen.

Use the print-function overload of tst::check (the lambda is only
invoked when the check fails) and guard front() with an empty() check.

Also remove the temporary diagnostic CI steps and give the test step
a 2-minute timeout as a safety net.
The print-function lambda of tst::check is only invoked when the check
has failed, i.e. when the children list is not empty, so the empty()
guard was redundant. Assert the invariant instead.
@igagis igagis self-assigned this Nov 4, 2026
@igagis
igagis merged commit b34b45a into main Nov 4, 2026
21 of 46 checks passed
@igagis
igagis deleted the fix_win_tests_freeze branch November 4, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant