]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/osd: Removed Commented Code - 2 15540/head
authorJos Collin <jcollin@redhat.com>
Wed, 7 Jun 2017 05:54:59 +0000 (11:24 +0530)
committerJos Collin <jcollin@redhat.com>
Tue, 20 Jun 2017 14:10:06 +0000 (19:40 +0530)
Removed commented code found in test/osd/.

Fixes: http://tracker.ceph.com/issues/20207 (Partially)
Signed-off-by: Jos Collin <jcollin@redhat.com>
src/test/osd/Object.cc
src/test/osd/RadosModel.cc
src/test/osd/RadosModel.h
src/test/osd/TestOSDMap.cc
src/test/osd/TestPGLog.cc
src/test/osd/TestRados.cc
src/test/osd/types.cc

index 587e37ee13f56c9113e30e13222c0ca79ee7b8bd..077146573971f216f60de5d7559fccee0bba3970 100644 (file)
@@ -35,7 +35,6 @@ std::ostream &operator<<(std::ostream &out, const ContDesc &rhs)
   return out << "(ObjNum " << rhs.objnum
             << " snap " << rhs.cursnap
             << " seq_num " << rhs.seqnum
-    //<< " prefix " << rhs.prefix
             << ")";
 }
 
index 66058b0ceb85d0aeb5516b00fa8fa051b2efa85b..501bf3b134a220f56053a14325f64c3a0182cfb4 100644 (file)
 
 void TestOp::begin()
 {
-  //if (stat) stat->begin(this);
   _begin();
 }
 
 void TestOp::finish(TestOp::CallbackInfo *info)
 {
   _finish(info);
-  //if (stat && finished()) stat->end(this);
 }
 
 void read_callback(librados::completion_t comp, void *arg) {
index ff44fee01e97d44a6152a18b184e245e9315627f..0de5e35a9cf0306a3d11825fe0ba72015350891d 100644 (file)
@@ -569,7 +569,6 @@ public:
             i != obj.attrs.end();
             ++i, ++iter) {
          if (!(*iter % 3)) {
-           //op.rmxattr(i->first.c_str());
            to_remove.insert(i->first);
            op.rmxattr(i->first.c_str());
          }
@@ -799,7 +798,6 @@ public:
     context->seq_num++;
 
     waiting_on = ranges.size();
-    //cout << " waiting_on = " << waiting_on << std::endl;
     ContentsGenerator::iterator gen_pos = cont_gen->get_iterator(cont);
     uint64_t tid = 1;
     for (map<uint64_t, uint64_t>::iterator i = ranges.begin(); 
@@ -2441,7 +2439,7 @@ public:
     // not being particularly specific here about knowing which
     // flushes are on the oldest clean snap and which ones are not.
     can_fail = !blocking || !context->snaps.empty();
-    // FIXME: we can could fail if we've ever removed a snap due to
+    // FIXME: we could fail if we've ever removed a snap due to
     // the async snap trimming.
     can_fail = true;
     cout << num << ": " << (blocking ? "cache_flush" : "cache_try_flush")
@@ -2456,9 +2454,6 @@ public:
                                               new TestOp::CallbackInfo(0));
     completion = context->rados.aio_create_completion((void *) cb_arg, NULL,
                                                      &write_callback);
-    // leave object in unused list so that we race with other operations
-    //context->oid_in_use.insert(oid);
-    //context->oid_not_in_use.erase(oid);
     context->oid_flushing.insert(oid);
     context->oid_not_flushing.erase(oid);
     context->state_lock.Unlock();
@@ -2484,8 +2479,6 @@ public:
     context->state_lock.Lock();
     assert(!done);
     assert(completion->is_complete());
-    //context->oid_in_use.erase(oid);
-    //context->oid_not_in_use.insert(oid);
     context->oid_flushing.erase(oid);
     context->oid_not_flushing.insert(oid);
     int r = completion->get_return_value();
@@ -2555,9 +2548,6 @@ public:
                                               new TestOp::CallbackInfo(0));
     completion = context->rados.aio_create_completion((void *) cb_arg, NULL,
                                                      &write_callback);
-    // leave object in unused list so that we race with other operations
-    //context->oid_in_use.insert(oid);
-    //context->oid_not_in_use.erase(oid);
     context->state_lock.Unlock();
 
     op.cache_evict();
@@ -2576,8 +2566,7 @@ public:
     context->state_lock.Lock();
     assert(!done);
     assert(completion->is_complete());
-    //context->oid_in_use.erase(oid);
-    //context->oid_not_in_use.insert(oid);
+
     int r = completion->get_return_value();
     cout << num << ":  got " << cpp_strerror(r) << std::endl;
     if (r == 0) {
index 300a38528c653d221dce8f7aef2c190be8d46ccd..a99498c0f652bdc8dd9374d74e940a44643b2046 100644 (file)
@@ -354,16 +354,6 @@ TEST_F(OSDMapTest, KeepsNecessaryTemps) {
 TEST_F(OSDMapTest, PrimaryAffinity) {
   set_up_map();
 
-  /*
-  osdmap.print(cout);
-  Formatter *f = Formatter::create("json-pretty");
-  f->open_object_section("CRUSH");
-  osdmap.crush->dump(f);
-  f->close_section();
-  f->flush(cout);
-  delete f;
-  */
-
   int n = get_num_osds();
   for (map<int64_t,pg_pool_t>::const_iterator p = osdmap.get_pools().begin();
        p != osdmap.get_pools().end();
@@ -376,7 +366,6 @@ TEST_F(OSDMapTest, PrimaryAffinity) {
       vector<int> primary(n, 0);
       test_mappings(0, 10000, &any, &first, &primary);
       for (int i=0; i<n; ++i) {
-       //cout << "osd." << i << " " << any[i] << " " << first[i] << " " << primary[i] << std::endl;
        ASSERT_LT(0, any[i]);
        ASSERT_LT(0, first[i]);
        ASSERT_LT(0, primary[i]);
@@ -391,7 +380,6 @@ TEST_F(OSDMapTest, PrimaryAffinity) {
       vector<int> primary(n, 0);
       test_mappings(pool, 10000, &any, &first, &primary);
       for (int i=0; i<n; ++i) {
-       //cout << "osd." << i << " " << any[i] << " " << first[i] << " " << primary[i] << std::endl;
        ASSERT_LT(0, any[i]);
        if (i >= 2) {
          ASSERT_LT(0, first[i]);
@@ -413,7 +401,6 @@ TEST_F(OSDMapTest, PrimaryAffinity) {
       vector<int> primary(n, 0);
       test_mappings(pool, 10000, &any, &first, &primary);
       for (int i=0; i<n; ++i) {
-       //cout << "osd." << i << " " << any[i] << " " << first[i] << " " << primary[i] << std::endl;
        ASSERT_LT(0, any[i]);
        if (i >= 2) {
          ASSERT_LT(0, first[i]);
index 626c3cef57ccea1fbb469aad4bfed8a330c1ca97..8e10c7532f3a2190149299b21e0d03d797723cc2 100644 (file)
@@ -1871,7 +1871,6 @@ TEST_F(PGLogTest, filter_log_1) {
     int num_internal = 10;
 
     // Set up splitting map
-    //ceph::shared_ptr<OSDMap> osdmap(new OSDMap());
     OSDMap *osdmap = new OSDMap;
     uuid_d test_uuid;
     test_uuid.generate_random();
@@ -1909,7 +1908,6 @@ TEST_F(PGLogTest, filter_log_1) {
         log.log.push_back(e);
         if (i == 1)
           log.tail = e.version;
-        //cout << "object " << e.soid << std::endl;
       }
       log.head = e.version;
       log.index();
index 61759c26ae7d04116d8d798340cbe27279309d17..b0c5ae7d476bb7320de7e6f369de2e0b91f33ab3 100644 (file)
@@ -174,7 +174,6 @@ private:
   TestOp *gen_op(RadosTestContext &context, TestOpType type)
   {
     string oid, oid2;
-    //cout << "oids not in use " << context.oid_not_in_use.size() << std::endl;
     assert(context.oid_not_in_use.size());
 
     switch (type) {
@@ -465,14 +464,12 @@ int main(int argc, char **argv)
       set_redirect = true;
     } else {
       cerr << "unknown arg " << argv[i] << std::endl;
-      //usage();
       exit(1);
     }
   }
 
   if (op_weights.empty()) {
     cerr << "No operations specified" << std::endl;
-    //usage();
     exit(1);
   }
 
index b4616ea4f2b1f4748084cf4956fc30c9fb979f94..13159a5d073bcbf568bc91f2abf056fb2c37d6f6 100644 (file)
@@ -1258,8 +1258,7 @@ TEST(pg_pool_t_test, get_pg_num_divisor) {
 
   p.set_pg_num(12);
   p.set_pgp_num(12);
-  //cout << "num " << p.get_pg_num()
-  //     << " mask " << p.get_pg_num_mask() << std::endl;
+
   ASSERT_EQ(16u, p.get_pg_num_divisor(pg_t(0, 1)));
   ASSERT_EQ(16u, p.get_pg_num_divisor(pg_t(1, 1)));
   ASSERT_EQ(16u, p.get_pg_num_divisor(pg_t(2, 1)));