Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable warning in os-test.cc #2437

Closed
abar52 opened this issue Jul 27, 2021 · 2 comments
Closed

disable warning in os-test.cc #2437

abar52 opened this issue Jul 27, 2021 · 2 comments

Comments

@abar52
Copy link

abar52 commented Jul 27, 2021

better to be all green

diff --git a/test/os-test.cc b/test/os-test.cc
index 44a2988f..2615c317 100644
--- a/test/os-test.cc
+++ b/test/os-test.cc
@@ -269,6 +269,8 @@ TEST(BufferedFileTest, CloseError) {
 TEST(BufferedFileTest, Fileno) {
   buffered_file f;
 #  ifndef __COVERITY__
+  // disable warning Death tests use fork(), which is unsafe
+  ::testing::FLAGS_gtest_death_test_style = "threadsafe";
   // fileno on a null FILE pointer either crashes or returns an error.
   // Disable Coverity because this is intentional.
   EXPECT_DEATH_IF_SUPPORTED(
@vitaut
Copy link
Contributor

vitaut commented Jul 27, 2021

Thanks for the suggestion. I think it's better to set the option for all tests here:

return RUN_ALL_TESTS();
A PR would be welcome.

@vitaut
Copy link
Contributor

vitaut commented Jul 29, 2021

Switched to threadsafe mode in f1794a8.

@vitaut vitaut closed this as completed Jul 29, 2021
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

No branches or pull requests

2 participants