]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: suppress core dumping in there tests as well 25311/head
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 28 Nov 2018 21:17:53 +0000 (22:17 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 29 Nov 2018 09:25:01 +0000 (10:25 +0100)
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 <wjw@digiware.nl>
src/test/common/test_lockdep.cc
src/test/common/test_mutex.cc

index cbbe081426a8180e763ab955774eed40b9f40e05..993fa4423c24f439035d347a46e44862f2253286 100644 (file)
@@ -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();
 
index ed987e0d9ae09b5ae8b1e45cf54853cf8a8da97c..95a9a621302894782b762a2f10b92617c63f006a 100644 (file)
@@ -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(), ".*");
 }