From: Kefu Chai Date: Thu, 31 Aug 2017 08:48:22 +0000 (+0800) Subject: test: Don't dump core when using EXPECT_DEATH X-Git-Tag: v13.0.1~1098^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17390%2Fhead;p=ceph.git test: Don't dump core when using EXPECT_DEATH Signed-off-by: Kefu Chai --- diff --git a/src/test/common/Throttle.cc b/src/test/common/Throttle.cc index 1e80dc1f35b8..49d57dd96128 100644 --- a/src/test/common/Throttle.cc +++ b/src/test/common/Throttle.cc @@ -21,6 +21,13 @@ #include #include + +#include +#include +#include +#include +#include + #include "gtest/gtest.h" #include "common/backport14.h" #include "common/Mutex.h" @@ -28,13 +35,7 @@ #include "common/Throttle.h" #include "common/ceph_argparse.h" #include "common/backport14.h" - -#include -#include -#include -#include -#include -#include +#include "include/coredumpctl.h" class ThrottleTest : public ::testing::Test { protected: @@ -214,6 +215,7 @@ TEST_F(ThrottleTest, wait) { } TEST_F(ThrottleTest, destructor) { + PrCtl unset_dumpable; EXPECT_DEATH({ int64_t throttle_max = 10; auto throttle = ceph::make_unique(g_ceph_context, "throttle", @@ -348,6 +350,7 @@ std::pair > test_backoff( } TEST(BackoffThrottle, destruct) { + PrCtl unset_dumpable; EXPECT_DEATH({ auto throttle = ceph::make_unique( g_ceph_context, "destructor test", 10); @@ -421,6 +424,7 @@ TEST(BackoffThrottle, oversaturated) } TEST(OrderedThrottle, destruct) { + PrCtl unset_dumpable; EXPECT_DEATH({ auto throttle = ceph::make_unique(1, false); throttle->start_op(nullptr);