From: Li Wang Date: Sat, 30 Sep 2017 02:36:20 +0000 (+0000) Subject: test: assert(false)->ceph_abort() X-Git-Tag: v13.0.1~675^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=efa6442e7834e78c12d6ba7bbf36582c842f0d17;p=ceph.git test: assert(false)->ceph_abort() Signed-off-by: Li Wang --- diff --git a/src/test/kv_store_bench.cc b/src/test/kv_store_bench.cc index b36a088dfd6e..e64aa3618eaf 100644 --- a/src/test/kv_store_bench.cc +++ b/src/test/kv_store_bench.cc @@ -363,7 +363,7 @@ int KvStoreBench::test_teuthology_aio(next_gen_t distr, if (ops_in_flight == max_ops_in_flight) { int err = op_avail.Wait(ops_in_flight_lock); if (err < 0) { - assert(false); + ceph_abort(); return err; } assert(ops_in_flight < max_ops_in_flight); diff --git a/src/test/librados_test_stub/TestClassHandler.cc b/src/test/librados_test_stub/TestClassHandler.cc index 35d905aa3d62..739c3405bc23 100644 --- a/src/test/librados_test_stub/TestClassHandler.cc +++ b/src/test/librados_test_stub/TestClassHandler.cc @@ -50,7 +50,7 @@ void TestClassHandler::open_all_classes() { std::string CEPH_LIB(env ? env : ".libs"); DIR *dir = ::opendir(CEPH_LIB.c_str()); if (dir == NULL) { - assert(false);; + ceph_abort();; } struct dirent *pde = nullptr; diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index e8acd6d9ad14..7893244ed85d 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -5988,6 +5988,6 @@ TEST_F(TestLibRBD, TestTrashMoveAndRestore) { namespace ceph { void __ceph_assert_fail(const char *assertion, const char *file, int line, const char *func) { - assert(false); + ceph_abort(); } } diff --git a/src/test/librbd/watcher/test_mock_RewatchRequest.cc b/src/test/librbd/watcher/test_mock_RewatchRequest.cc index 3b42b0e99249..33945e24ed45 100644 --- a/src/test/librbd/watcher/test_mock_RewatchRequest.cc +++ b/src/test/librbd/watcher/test_mock_RewatchRequest.cc @@ -59,10 +59,10 @@ struct TestMockWatcherRewatchRequest : public TestMockFixture { struct WatchCtx : public librados::WatchCtx2 { void handle_notify(uint64_t, uint64_t, uint64_t, ceph::bufferlist&) override { - assert(false); + ceph_abort(); } void handle_error(uint64_t, int) override { - assert(false); + ceph_abort(); } };