Comments (2)
It's impossible for gtest to anticipate all possible side effects in a death
test and
clean them up. Instead, it's the test author's responsibility to ensure that
the
tests clean up after themselves. Some people may even find the core dump
useful.
Please try to rewrite your test to disable core dump. You can see 'man core'
on how
to do it.
Original comment by [email protected]
on 21 Dec 2009 at 7:07
- Changed state: WontFix
- Added labels: OpSys-Linux, Priority-Low, Type-Enhancement, Usability
- Removed labels: Priority-Medium, Type-Defect
from googletest.
In case anyone else comes here looking for a solution I'll post what I've
decided to go
with.
This works on linux and is likely not portable:
Index: gtest-death-test.cpp
====================================================
===============
--- gtest-death-test.cpp (revision 60319)
+++ gtest-death-test.cpp (working copy)
@@ -990,6 +990,11 @@
// This function is called in a clone()-ed process and thus must avoid
// any potentially unsafe operations like malloc or libc functions.
static int ExecDeathTestChildMain(void* child_arg) {
+ rlimit core_limit;
+ core_limit.rlim_cur = 0;
+ core_limit.rlim_max = 0;
+ setrlimit(RLIMIT_CORE, &core_limit);
+
ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);
GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));
Original comment by [email protected]
on 21 Dec 2009 at 7:56
from googletest.
Related Issues (20)
- Netbeans IDE hates googletest macros HOT 1
- Hexadecimal Printing in Test Fail messages HOT 1
- Python testing scripts allow binaries under test to write XML output HOT 1
- Need to simplify Python test scripts to pass required env deltas into Subproces calls HOT 2
- Visual Studio 2010 Express does not compile googletest due to tuple issue HOT 3
- google test compilation fails on visual studio 2010 beta HOT 1
- gtest_break_on_failure does not honour EXPECT_FATAL_FAILURE HOT 3
- gtest compile error with STLPort Debug (MSVC++ 9.0) in death tests HOT 8
- define macros to simplify warning suppression HOT 1
- gtest may invoke an ANSI WIn32 API on a Unicode argument. HOT 2
- Enhancement: comparison between containers HOT 2
- Report failing tests to stderr instead of stdout HOT 1
- On SUN Warning: A non-POD object of type ... passed as a variable argument to function "testing::internal::IsNullLiteralHelper(...)". HOT 1
- Death tests don't pass when using FAIL() in a child process on Windows. HOT 5
- 奇怪的tuple 编译错误 HOT 2
- configure.ac:29: error: possibly undefined macro: AC_PROG_LIBTOOL HOT 4
- gtest-port_test.cc tries to use testing::Types without looking at GTEST_HAS_TYPED_TEST HOT 1
- gtest should treat - as _ when parsing command line flags HOT 1
- gtest-port.h use of #if prevents compilation with -Wundef HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googletest.