diff options
author | arnej27959 <arnej@yahoo-inc.com> | 2016-09-19 09:19:53 +0200 |
---|---|---|
committer | arnej27959 <arnej@yahoo-inc.com> | 2016-09-19 09:19:53 +0200 |
commit | b2b3e60a6ca18fa447f9d01d699993d09fd1e2e3 (patch) | |
tree | d5be3ef8d9d1a7e321a6ef9da4fe38248c4efab2 /vespalib/src/tests/exception_classes | |
parent | 412cf15147edc7bb29e14477eb8e4dc1d8736067 (diff) |
get rid of intermediate shell process
* we want to get the actual exit code directly,
so use "exec" to avoid an intermediate shell.
Diffstat (limited to 'vespalib/src/tests/exception_classes')
-rw-r--r-- | vespalib/src/tests/exception_classes/silenceuncaught_test.cpp | 14 |
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 17961872c76..0f8e3de4595 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("./vespalib_caught_uncaught_app uncaught"); + SlaveProc proc("exec ./vespalib_caught_uncaught_app uncaught"); proc.wait(); EXPECT_LESS(proc.getExitCode(), 0); } TEST("that uncaught silenced exception causes exitcode 66") { - SlaveProc proc("./vespalib_caught_uncaught_app silenced_and_uncaught"); + SlaveProc 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("./vespalib_caught_uncaught_app uncaught_after_silenced_and_caught"); + SlaveProc proc("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("./vespalib_caught_uncaught_app silenced_and_caught"); + SlaveProc proc("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("./vespalib_mmap_app 100000000 10485760 1"); + SlaveProc proc("exec ./vespalib_mmap_app 100000000 10485760 1"); proc.wait(); EXPECT_EQUAL(proc.getExitCode(), 0); } TEST("that mmap beyond limits cause negative exitcode.") { - SlaveProc proc("./vespalib_mmap_app 100000000 10485760 10"); + SlaveProc proc("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 ./vespalib_mmap_app 100000000 10485760 10"); + SlaveProc proc("VESPA_SILENCE_CORE_ON_OOM=1 exec ./vespalib_mmap_app 100000000 10485760 10"); proc.wait(); EXPECT_EQUAL(proc.getExitCode(), 66); } |