From efa6442e7834e78c12d6ba7bbf36582c842f0d17 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Sat, 30 Sep 2017 02:36:20 +0000 Subject: [PATCH] test: assert(false)->ceph_abort() Signed-off-by: Li Wang --- src/test/kv_store_bench.cc | 2 +- src/test/librados_test_stub/TestClassHandler.cc | 2 +- src/test/librbd/test_librbd.cc | 2 +- src/test/librbd/watcher/test_mock_RewatchRequest.cc | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/kv_store_bench.cc b/src/test/kv_store_bench.cc index b36a088dfd6e0..e64aa3618eaf5 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 35d905aa3d622..739c3405bc23e 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 e8acd6d9ad140..7893244ed85d5 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 3b42b0e992491..33945e24ed45a 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(); } }; -- 2.39.5