From: Willem Jan Withagen Date: Wed, 28 Nov 2018 21:17:53 +0000 (+0100) Subject: test: suppress core dumping in there tests as well X-Git-Tag: v14.1.0~769^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F25311%2Fhead;p=ceph.git test: suppress core dumping in there tests as well On FreeBSD coredumps are enabled by default. And thus tests in teardown() in ceph-helpers.sh can fail because of unwaranted cores. Signed-off-by: Willem Jan Withagen --- diff --git a/src/test/common/test_lockdep.cc b/src/test/common/test_lockdep.cc index cbbe081426a8..993fa4423c24 100644 --- a/src/test/common/test_lockdep.cc +++ b/src/test/common/test_lockdep.cc @@ -8,6 +8,7 @@ #include "global/global_context.h" #include "global/global_init.h" #include "common/lockdep.h" +#include "include/coredumpctl.h" TEST(lockdep, abba) { @@ -24,6 +25,7 @@ TEST(lockdep, abba) b.unlock(); b.lock(); + PrCtl unset_dumpable; EXPECT_DEATH(a.lock(), ""); b.unlock(); } @@ -34,6 +36,7 @@ TEST(lockdep, recursive) ceph::mutex a(ceph::make_mutex("a")); a.lock(); + PrCtl unset_dumpable; EXPECT_DEATH(a.lock(), ""); a.unlock(); diff --git a/src/test/common/test_mutex.cc b/src/test/common/test_mutex.cc index ed987e0d9ae0..95a9a6213028 100644 --- a/src/test/common/test_mutex.cc +++ b/src/test/common/test_mutex.cc @@ -32,6 +32,7 @@ TEST(Mutex, NormalAsserts) { Mutex* m = new Mutex("Normal",false); m->Lock(); testing::GTEST_FLAG(death_test_style) = "threadsafe"; + PrCtl unset_dumpable; EXPECT_DEATH(m->Lock(), ".*"); }