Repository navigation
[cppinterop] Use threadsafe death-test style in TracingTests - #22162
Merged
Merged
Conversation
Test Results 22 files 22 suites 3d 7h 54m 44s ⏱️ Results for commit 6c34c97. |
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.
This should fix the failures seen on mac-beta and mac26. On apple systems, gtest's default "fast" death-test style forks the child without exec(), so the child inherits parent process state (atfork handlers, dyld closures, stdio locks) which can kill/stall before EXPECT_DEATH writes to stderr, so gtest captures an empty buffer and reports "died but not with expected error" with an empty Actualmsg.
This is a known issue and the fix as seen in LLVM's compiler-rt sanitizer tests, which set
testing::GTEST_FLAG(death_test_style) = "threadsafe";in their gtest entry points. Also seegtest-death-test.cc:250 - "Death tests use fork(), which is unsafe particularly in a threaded context", and the project's docs recommend threadsafe for this case.