]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: assert(false)->ceph_abort()
authorLi Wang <laurence.liwang@gmail.com>
Sat, 30 Sep 2017 02:36:20 +0000 (02:36 +0000)
committerLi Wang <laurence.liwang@gmail.com>
Mon, 2 Oct 2017 14:43:17 +0000 (14:43 +0000)
Signed-off-by: Li Wang <laurence.liwang@gmail.com>
src/test/kv_store_bench.cc
src/test/librados_test_stub/TestClassHandler.cc
src/test/librbd/test_librbd.cc
src/test/librbd/watcher/test_mock_RewatchRequest.cc

index b36a088dfd6e022d77082d6f556024a09342751b..e64aa3618eaf5a3eeec5370ce25e3842ec123aaf 100644 (file)
@@ -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);
index 35d905aa3d622062af00cea5c169701ec9ecbcb8..739c3405bc23eec16dc45ea96faeb81a04212897 100644 (file)
@@ -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;
index e8acd6d9ad1407368317f076f29febfd87b0baa1..7893244ed85d54bc6a24ca3281af9a5f0164669e 100644 (file)
@@ -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();
   }
 }
index 3b42b0e992491ac8ba857f7f6fa026d11af51656..33945e24ed45a19dc22ea9d6ae1f77f50a26363e 100644 (file)
@@ -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();
     }
   };