summaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/exception_classes
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2016-10-19 14:36:18 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2016-10-19 14:36:18 +0200
commitef102a2c80b08924852514f733692e6495ade13f (patch)
tree47e96fde87501c188cc478b193d996c0ae3586af /vespalib/src/tests/exception_classes
parent1df00b8a64b73218ca2412535398e1e76129ae2a (diff)
Add 'ulimit -c 0 && ' in front of crashing exec-s
Diffstat (limited to 'vespalib/src/tests/exception_classes')
-rw-r--r--vespalib/src/tests/exception_classes/silenceuncaught_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
index 0f8e3de4595..532bd314279 100644
--- a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
+++ b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
@@ -6,43 +6,43 @@
using namespace vespalib;
TEST("that uncaught exception causes negative exitcode.") {
- SlaveProc proc("exec ./vespalib_caught_uncaught_app uncaught");
+ SlaveProc proc("ulimit -c 0 && exec ./vespalib_caught_uncaught_app uncaught");
proc.wait();
EXPECT_LESS(proc.getExitCode(), 0);
}
TEST("that uncaught silenced exception causes exitcode 66") {
- SlaveProc proc("exec ./vespalib_caught_uncaught_app silenced_and_uncaught");
+ SlaveProc proc("ulimit -c 0 && exec ./vespalib_caught_uncaught_app silenced_and_uncaught");
proc.wait();
EXPECT_EQUAL(proc.getExitCode(), 66);
}
TEST("that caught silenced exception followed by an uncaught causes negative exitcode.") {
- SlaveProc proc("exec ./vespalib_caught_uncaught_app uncaught_after_silenced_and_caught");
+ SlaveProc proc("ulimit -c 0 && exec ./vespalib_caught_uncaught_app uncaught_after_silenced_and_caught");
proc.wait();
EXPECT_LESS(proc.getExitCode(), 0);
}
TEST("that caught silenced exception causes exitcode 0") {
- SlaveProc proc("exec ./vespalib_caught_uncaught_app silenced_and_caught");
+ SlaveProc proc("ulimit -c 0 && exec ./vespalib_caught_uncaught_app silenced_and_caught");
proc.wait();
EXPECT_EQUAL(proc.getExitCode(), 0);
}
TEST("that mmap within limits are fine cause exitcode 0") {
- SlaveProc proc("exec ./vespalib_mmap_app 100000000 10485760 1");
+ SlaveProc proc("ulimit -c 0 && exec ./vespalib_mmap_app 100000000 10485760 1");
proc.wait();
EXPECT_EQUAL(proc.getExitCode(), 0);
}
TEST("that mmap beyond limits cause negative exitcode.") {
- SlaveProc proc("exec ./vespalib_mmap_app 100000000 10485760 10");
+ SlaveProc proc("ulimit -c 0 && exec ./vespalib_mmap_app 100000000 10485760 10");
proc.wait();
EXPECT_LESS(proc.getExitCode(), 0);
}
TEST("that mmap beyond limits with set VESPA_SILENCE_CORE_ON_OOM cause exitcode 66.") {
- SlaveProc proc("VESPA_SILENCE_CORE_ON_OOM=1 exec ./vespalib_mmap_app 100000000 10485760 10");
+ SlaveProc proc("ulimit -c 0 && VESPA_SILENCE_CORE_ON_OOM=1 exec ./vespalib_mmap_app 100000000 10485760 10");
proc.wait();
EXPECT_EQUAL(proc.getExitCode(), 66);
}