Add TIMED_TEST_SUITE_INITIALIZE/CLEANUP guidelines to coding instructions#335
Open
parth21999 wants to merge 1 commit intomasterfrom
Open
Add TIMED_TEST_SUITE_INITIALIZE/CLEANUP guidelines to coding instructions#335parth21999 wants to merge 1 commit intomasterfrom
parth21999 wants to merge 1 commit intomasterfrom
Conversation
…ions Document that test suites must use TIMED_TEST_SUITE_INITIALIZE and TIMED_TEST_SUITE_CLEANUP instead of the raw TEST_SUITE_INITIALIZE/CLEANUP macros. The timed versions inject a process watchdog that terminates test suites that hang, preventing CI pipelines from stalling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 2, 2026
Closed
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.
Summary
Adds a new section to
general_coding_instructions.mddocumenting that test suites must useTIMED_TEST_SUITE_INITIALIZEandTIMED_TEST_SUITE_CLEANUP(fromc_pal/timed_test_suite.h) instead of the rawTEST_SUITE_INITIALIZE/TEST_SUITE_CLEANUPmacros.Why
We are adding a process watchdog to all test suites that terminates the test process if a suite hangs, preventing CI pipelines from stalling indefinitely. The timed wrapper macros inject the watchdog fixtures automatically. The raw
TEST_SUITE_INITIALIZE/TEST_SUITE_CLEANUPmacros have been renamed to_INTERNALin c-testrunnerswitcher (see Azure/c-testrunnerswitcher#287) and will produce a compile error if used directly.What's documented
TIMED_TEST_SUITE_INITIALIZE/TIMED_TEST_SUITE_CLEANUPc_pal/timed_test_suite.h, useTIMED_TEST_DEFAULT_TIMEOUT_MSunless a custom timeout is needed