You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(stl): isolate ThreadLocal key-exhaustion test in its own process - #5338
Moves the #5310 pthread key-exhaustion test into its own file, tests/fl/stl/thread_local_key_exhaustion.cpp, so it runs in a separate process and cannot starve other ThreadLocal tests of keys. Test body unchanged.
Verified: bash test thread_local_key_exhaustion (incl. --debug), bash test thread_local, bash lint, ./lint.
Summary by CodeRabbit
Tests
Added regression coverage for thread-local storage behavior when system thread-local keys are exhausted, including value initialization and access across threads.
The exhaustion test is now maintained separately from the existing thread-local tests.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
The pthread-key-exhaustion regression test moved from thread_local.cpp to thread_local_key_exhaustion.cpp. The test checks ThreadLocal<int> default values and fallback-slot behavior across threads.
Changes: ThreadLocal test isolation
Layer / File(s)
Summary
Move the key-exhaustion test tests/fl/stl/thread_local.cpp, tests/fl/stl/thread_local_key_exhaustion.cpp
The test was removed from the shared ThreadLocal test file and added to a dedicated file. It checks default values and fallback-slot reads and updates across threads after pthread-key exhaustion.
#5335 — The tracking issue lists the test-isolation follow-up addressed by this change.
Possibly related PRs
FastLED/FastLED#5316 — This PR adds the fallback-slot behavior that the moved test checks.
Merge Risk: Minimal · up to be322
This is a test-only change that isolates the pthread-key-exhaustion test so it cannot affect other ThreadLocal tests. It has no production impact, and I found no merge-blocking risk.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "test(stl): isolate ThreadLocal key-exhaustion test in its own process" matches the main change. The PR moves the pthread key-exhaustion test out of thread_local.cpp into thread_local_key_ex…
Linked Issues check
Issue #5323 asks that the key-exhaustion test run in its own process or otherwise be isolated. At head, tests/fl/stl/thread_local.cpp no longer contains the key-exhaustion test. It has only a comment …
Out of Scope Changes check
The changes are limited to tests/fl/stl/thread_local.cpp (removal of the key-exhaustion test) and the new file tests/fl/stl/thread_local_key_exhaustion.cpp. Both changes directly implement the isolati…
Full details: Title check
Explanation
The title "test(stl): isolate ThreadLocal key-exhaustion test in its own process" matches the main change. The PR moves the pthread key-exhaustion test out of thread_local.cpp into thread_local_key_exhaustion.cpp so it runs in a separate process. The raw summary confirms the removal from thread_local.cpp and the addition of the new file. The title is specific, uses a conventional prefix, and aligns with linked issue #5323.
Full details: Linked Issues check
Explanation
Issue #5323 asks that the key-exhaustion test run in its own process or otherwise be isolated. At head, tests/fl/stl/thread_local.cpp no longer contains the key-exhaustion test. It has only a comment pointing to thread_local_key_exhaustion.cpp. The new file holds the test case with the same logic: it hoards pthread keys, constructs ThreadLocal<int> with and without a default, then checks the fallback-slot values across a second thread. The new file's comment states that each tests/**/*.cpp runs as its own process. That harness behavior is the basis for the isolation. I did not independently read the test runner to confirm it. The base-side diff could not be read, so I could not compare the test body line by line against the base revision. The head content matches the PR description's claim that the body is unchanged.
Full details: Out of Scope Changes check
Explanation
The changes are limited to tests/fl/stl/thread_local.cpp (removal of the key-exhaustion test) and the new file tests/fl/stl/thread_local_key_exhaustion.cpp. Both changes directly implement the isolation objective of #5323. No production code or unrelated test is changed in the reviewed evidence. The base-side diff was unavailable, so this verdict relies on the head file contents and the PR summary.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between b248352 and be322df.
Files selected for processing: 2
tests/fl/stl/thread_local.cpp
tests/fl/stl/thread_local_key_exhaustion.cpp
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
github-actionsBot
added
sanitized
Title, body and conversation screened; review text requires separate screening.
and removed
sanitized
Title, body and conversation screened; review text requires separate screening.
labels
Nov 21, 2026
github-actionsBot
added
sanitized
Title, body and conversation screened; review text requires separate screening.
and removed
sanitized
Title, body and conversation screened; review text requires separate screening.
labels
Nov 21, 2026
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
sanitizedTitle, body and conversation screened; review text requires separate screening.
1 participant
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.
Closes #5323
Moves the #5310 pthread key-exhaustion test into its own file, tests/fl/stl/thread_local_key_exhaustion.cpp, so it runs in a separate process and cannot starve other ThreadLocal tests of keys. Test body unchanged.
Verified: bash test thread_local_key_exhaustion (incl. --debug), bash test thread_local, bash lint, ./lint.
Summary by CodeRabbit