summaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/exception_classes
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-07-20 10:49:58 +0200
committerGitHub <noreply@github.com>2020-07-20 10:49:58 +0200
commit9ba56dd4bcab7cad71f04737cf858a76236a5acf (patch)
treef9ff2bd25872e2a0368b340c4734b873002b7a52 /vespalib/src/tests/exception_classes
parentd0de44f2d5bf59a116edb10a09935e791cbbcd23 (diff)
parentf059e8ebe82d51c40ee1d488a7a30bec1d87caed (diff)
Merge pull request #13921 from vespa-engine/arnej/child-proc
Arnej/child proc
Diffstat (limited to 'vespalib/src/tests/exception_classes')
-rw-r--r--vespalib/src/tests/exception_classes/silenceuncaught_test.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
index 8d81d9e0821..89030a19cd6 100644
--- a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
+++ b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp
@@ -1,7 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/util/exception.h>
-#include <vespa/vespalib/util/slaveproc.h>
+#include <vespa/vespalib/util/child_process.h>
using namespace vespalib;
@@ -14,32 +14,32 @@ using namespace vespalib;
#endif
TEST("that uncaught exception causes negative exitcode.") {
- SlaveProc proc("ulimit -c 0 && exec ./vespalib_caught_uncaught_app uncaught");
+ ChildProcess 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");
+ ChildProcess proc("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("ulimit -c 0 && exec ./vespalib_caught_uncaught_app uncaught_after_silenced_and_caught");
+ ChildProcess 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");
+ ChildProcess proc("exec ./vespalib_caught_uncaught_app silenced_and_caught");
proc.wait();
EXPECT_EQUAL(proc.getExitCode(), 0);
}
#ifndef __SANITIZE_ADDRESS__
TEST("that mmap within limits are fine cause exitcode 0") {
- SlaveProc proc("exec ./vespalib_mmap_app 150000000 10485760 1");
+ ChildProcess proc("exec ./vespalib_mmap_app 150000000 10485760 1");
proc.wait();
EXPECT_EQUAL(proc.getExitCode(), 0);
}
@@ -48,13 +48,13 @@ TEST("that mmap within limits are fine cause exitcode 0") {
// setrlimit with RLIMIT_AS is broken on Darwin
#else
TEST("that mmap beyond limits cause negative exitcode.") {
- SlaveProc proc("ulimit -c 0 && exec ./vespalib_mmap_app 100000000 10485760 10");
+ ChildProcess 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");
+ ChildProcess proc("VESPA_SILENCE_CORE_ON_OOM=1 exec ./vespalib_mmap_app 100000000 10485760 10");
proc.wait();
EXPECT_EQUAL(proc.getExitCode(), 66);
}