]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: assert(false)->ceph_abort()
authorLi Wang <laurence.liwang@gmail.com>
Sat, 30 Sep 2017 02:32:07 +0000 (02:32 +0000)
committerLi Wang <laurence.liwang@gmail.com>
Mon, 2 Oct 2017 07:19:31 +0000 (07:19 +0000)
Signed-off-by: Li Wang <laurence.liwang@gmail.com>
src/common/config.cc
src/common/lockdep.cc

index 3cbb27e3484c043788d3412786c7a48b9908cea8..564039b9c81ec2e0ca016493755263891ca4a511 100644 (file)
@@ -87,7 +87,7 @@ md_config_t::md_config_t(bool is_daemon)
       // We may be instantiated pre-logging so send 
       std::cerr << "Duplicate config key in schema: '" << i.name << "'"
                 << std::endl;
-      assert(false);
+      ceph_abort();
     }
     schema.insert({i.name, i});
   }
@@ -131,7 +131,7 @@ md_config_t::md_config_t(bool is_daemon)
         // This is the compiled-in default that is failing its own option's
         // validation, so this is super-invalid and should never make it
         // past a pull request: crash out.
-        assert(false);
+        ceph_abort();
       }
     }
 
@@ -160,7 +160,7 @@ void md_config_t::validate_schema()
       if (schema.count(see_also_key) == 0) {
         std::cerr << "Non-existent see-also key '" << see_also_key
                   << "' on option '" << opt.name << "'" << std::endl;
-        assert(false);
+        ceph_abort();
       }
     }
   }
@@ -169,7 +169,7 @@ void md_config_t::validate_schema()
     if (schema.count(i.first) == 0) {
       std::cerr << "Schema is missing legacy field '" << i.first << "'"
                 << std::endl;
-      assert(false);
+      ceph_abort();
     }
   }
 }
index d7a165ff9cf1beb73ab6c0fdb79864acc3649461..0ca8f777cc5a64263ac5467eb3a683445dc60e96 100644 (file)
@@ -180,7 +180,7 @@ static int _lockdep_register(const char *name)
       for (auto& p : lock_names) {
        lockdep_dout(0) << "  lock " << p.first << " " << p.second << dendl;
       }
-      assert(false);
+      ceph_abort();
     }
     if (current_maxid <= (unsigned)id) {
         current_maxid = (unsigned)id + 1;