Repository navigation
Fix win tests freeze - #45
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.