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

Warnings when using death tests on Linux #464

Open
GoogleCodeExporter opened this issue Jun 20, 2015 · 4 comments
Open

Warnings when using death tests on Linux #464

GoogleCodeExporter opened this issue Jun 20, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Google Test produces the following warning for every death test on Linux:

[WARNING] .../gtest/src/gtest-death-test.cc:825:: Death tests use fork(), which 
is unsafe particularly in a threaded context. For this test, Google Test 
couldn't detect the number of threads.

Here's the code that reproduces the problem:

TEST(Test, Death) {
  EXPECT_DEATH(exit(1), "");
}

This is trivially fixed with the attached patch.

I'm using Google Test 1.7.0.

Original issue reported on code.google.com by [email protected] on 4 Jun 2014 at 9:15

Attachments:

@GoogleCodeExporter
Copy link
Author

Anyone?

Original comment by [email protected] on 19 Mar 2015 at 1:54

@GoogleCodeExporter
Copy link
Author

It would be really nice to see this fixed for Linux

Original comment by morse.caleb on 29 Apr 2015 at 8:58

@GoogleCodeExporter
Copy link
Author

Indeed. Unfortunately it looks like this repository is not maintained any more.

Original comment by [email protected] on 29 Apr 2015 at 9:00

@GoogleCodeExporter
Copy link
Author

It's still maintained. New commits have been made in the last 24 hours.

Original comment by morse.caleb on 29 Apr 2015 at 9:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant