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>
#include "global/global_context.h"
#include "global/global_init.h"
#include "common/lockdep.h"
+#include "include/coredumpctl.h"
TEST(lockdep, abba)
{
b.unlock();
b.lock();
+ PrCtl unset_dumpable;
EXPECT_DEATH(a.lock(), "");
b.unlock();
}
ceph::mutex a(ceph::make_mutex("a"));
a.lock();
+ PrCtl unset_dumpable;
EXPECT_DEATH(a.lock(), "");
a.unlock();
Mutex* m = new Mutex("Normal",false);
m->Lock();
testing::GTEST_FLAG(death_test_style) = "threadsafe";
+ PrCtl unset_dumpable;
EXPECT_DEATH(m->Lock(), ".*");
}