]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: add override in test submodule 13773/head
authorliuchang0812 <liuchang0812@gmail.com>
Fri, 3 Mar 2017 13:18:38 +0000 (21:18 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Fri, 3 Mar 2017 13:18:38 +0000 (21:18 +0800)
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
43 files changed:
src/test/ObjectMap/KeyValueDBMemory.cc
src/test/ObjectMap/KeyValueDBMemory.h
src/test/TestTimers.cc
src/test/bench/bencher.h
src/test/bench/detailed_stat_collector.h
src/test/bench/distribution.h
src/test/bench/dumb_backend.h
src/test/bench/rados_backend.h
src/test/bench/rbd_backend.h
src/test/bench/testfilestore_backend.h
src/test/compressor/compressor_example.h
src/test/compressor/test_compression.cc
src/test/encoding/ceph_dencoder.cc
src/test/erasure-code/ErasureCodeExample.h
src/test/erasure-code/TestErasureCode.cc
src/test/journal/RadosTestFixture.h
src/test/librados/TestCase.h
src/test/librados/misc.cc
src/test/librados/tier.cc
src/test/librados_test_stub/MockTestMemIoCtxImpl.h
src/test/librados_test_stub/TestIoCtxImpl.h
src/test/librados_test_stub/TestMemIoCtxImpl.h
src/test/librados_test_stub/TestMemRadosClient.h
src/test/libradosstriper/TestCase.h
src/test/messenger/simple_dispatcher.h
src/test/msgr/perf_msgr_server.cc
src/test/objectstore/FileStoreTracker.h
src/test/objectstore/TestObjectStoreState.h
src/test/objectstore/workload_generator.h
src/test/omap_bench.h
src/test/osd/Object.h
src/test/osd/RadosModel.h
src/test/osdc/FakeWriteback.h
src/test/osdc/MemWriteback.h
src/test/system/rados_list_parallel.cc
src/test/system/rados_open_pools_parallel.cc
src/test/system/st_rados_create_pool.h
src/test/system/st_rados_delete_objs.h
src/test/system/st_rados_delete_pool.h
src/test/system/st_rados_list_objects.h
src/test/system/st_rados_notify.h
src/test/system/st_rados_watch.h
src/test/test_snap_mapper.cc

index a7fc929ead30e06e0c1238679602d122fcf12271..f4b3719eff5f747d48cce16b46f430b378c0116f 100644 (file)
@@ -27,7 +27,7 @@ protected:
 
 public:
   explicit WholeSpaceMemIterator(KeyValueDBMemory *db) : db(db), ready(false) { }
-  ~WholeSpaceMemIterator() { }
+  ~WholeSpaceMemIterator() override { }
 
   int seek_to_first() override {
     if (db->db.empty()) {
@@ -240,7 +240,7 @@ public:
 
   explicit WholeSpaceSnapshotMemIterator(KeyValueDBMemory *db) :
     WholeSpaceMemIterator(db) { }
-  ~WholeSpaceSnapshotMemIterator() {
+  ~WholeSpaceSnapshotMemIterator() override {
     delete db;
   }
 };
index d0ee9dc59d5353850940ca3abe86ccbb7e6d313b..767d56f1be4ea31eeed2b2e0b82daa616f5a2d58 100644 (file)
@@ -17,15 +17,15 @@ public:
 
   KeyValueDBMemory() { }
   explicit KeyValueDBMemory(KeyValueDBMemory *db) : db(db->db) { }
-  virtual ~KeyValueDBMemory() { }
+  ~KeyValueDBMemory() override { }
 
-  virtual int init(string _opt) {
+  int init(string _opt) override {
     return 0;
   }
-  virtual int open(ostream &out) {
+  int open(ostream &out) override {
     return 0;
   }
-  virtual int create_and_open(ostream &out) {
+  int create_and_open(ostream &out) override {
     return 0;
   }
 
@@ -33,7 +33,7 @@ public:
     const string &prefix,
     const std::set<string> &key,
     std::map<string, bufferlist> *out
-    );
+    ) override;
   using KeyValueDB::get;
 
   int get_keys(
@@ -73,12 +73,12 @@ public:
            const std::pair<string,string> &key,
            const bufferlist &value)
        : db(db), key(key), value(value) {}
-      void finish(int r) {
+      void finish(int r) override {
        db->set(key.first, key.second, value);
       }
     };
 
-    void set(const string &prefix, const string &k, const bufferlist& bl) {
+    void set(const string &prefix, const string &k, const bufferlist& bl) override {
       on_commit.push_back(new SetOp(db, std::make_pair(prefix, k), bl));
     }
 
@@ -88,12 +88,12 @@ public:
       RmKeysOp(KeyValueDBMemory *db,
               const std::pair<string,string> &key)
        : db(db), key(key) {}
-      void finish(int r) {
+      void finish(int r) override {
        db->rmkey(key.first, key.second);
       }
     };
 
-    void rmkey(const string &prefix, const string &key) {
+    void rmkey(const string &prefix, const string &key) override {
       on_commit.push_back(new RmKeysOp(db, std::make_pair(prefix, key)));
     }
 
@@ -103,11 +103,11 @@ public:
       RmKeysByPrefixOp(KeyValueDBMemory *db,
                       const string &prefix)
        : db(db), prefix(prefix) {}
-      void finish(int r) {
+      void finish(int r) override {
        db->rmkeys_by_prefix(prefix);
       }
     };
-    void rmkeys_by_prefix(const string &prefix) {
+    void rmkeys_by_prefix(const string &prefix) override {
       on_commit.push_back(new RmKeysByPrefixOp(db, prefix));
     }
 
@@ -120,7 +120,7 @@ public:
       return 0;
     }
 
-    ~TransactionImpl_() {
+    ~TransactionImpl_() override {
       for (list<Context *>::iterator i = on_commit.begin();
           i != on_commit.end();
           on_commit.erase(i++)) {
@@ -129,15 +129,15 @@ public:
     }
   };
 
-  Transaction get_transaction() {
+  Transaction get_transaction() override {
     return Transaction(new TransactionImpl_(this));
   }
 
-  int submit_transaction(Transaction trans) {
+  int submit_transaction(Transaction trans) override {
     return static_cast<TransactionImpl_*>(trans.get())->complete();
   }
 
-  uint64_t get_estimated_size(map<string,uint64_t> &extras) {
+  uint64_t get_estimated_size(map<string,uint64_t> &extras) override {
     uint64_t total_size = 0;
 
     for (map<pair<string,string>,bufferlist>::iterator p = db.begin();
@@ -165,5 +165,5 @@ private:
   friend class WholeSpaceMemIterator;
 
 protected:
-  WholeSpaceIterator _get_iterator();
+  WholeSpaceIterator _get_iterator() override;
 };
index 77b64d9356e8dc1722dcd4567dee954fc14aa20b..691cab3e718a6abbc2df1458f0783a7e84603690 100644 (file)
@@ -39,7 +39,7 @@ public:
     array_lock.Unlock();
   }
 
-  ~TestContext()
+  ~TestContext() override
   {
   }
 
@@ -63,7 +63,7 @@ public:
     array_lock.Unlock();
   }
 
-  ~StrictOrderTestContext()
+  ~StrictOrderTestContext() override
   {
   }
 };
index 28d743351f33f87f38d26d1d47d944e92ee23b98..1fe9b888d6c1e531e29b17418ef21c83d59639bf 100644 (file)
@@ -101,7 +101,7 @@ public:
     );
 
   void run_bench();
-  void *entry() {
+  void *entry() override {
     run_bench();
     return 0;
   }
@@ -131,7 +131,7 @@ public:
       op_dist(op_dist) {}
 
   boost::tuple<string, uint64_t, uint64_t, Bencher::OpType>
-  operator()() {
+  operator()() override {
     boost::tuple<string, uint64_t, uint64_t, Bencher::OpType> ret =
       boost::make_tuple(*object_pos, cur_pos, length, (*op_dist)());
     cur_pos += length;
index 60b7cab3cdcafec3fde1b673711fff8098edf3ea..ad622f91a6c791a8dbe98844486672cf5e056177 100644 (file)
@@ -84,12 +84,12 @@ public:
     AdditionalPrinting *details = 0
     );
 
-  uint64_t next_seq();
-  void start_write(uint64_t seq, uint64_t size);
-  void start_read(uint64_t seq, uint64_t size);
-  void write_applied(uint64_t seq);
-  void write_committed(uint64_t seq);
-  void read_complete(uint64_t seq);
+  uint64_t next_seq() override;
+  void start_write(uint64_t seq, uint64_t size) override;
+  void start_read(uint64_t seq, uint64_t size) override;
+  void write_applied(uint64_t seq) override;
+  void write_committed(uint64_t seq) override;
+  void read_complete(uint64_t seq) override;
 
 };
 
index 545195fc8b43eac9df746b5828dd03c15a1f846e..fdad5dd39ef0ac5983c60b0ab4efdef374d62221 100644 (file)
@@ -35,7 +35,7 @@ public:
     Distribution<V> *v,
     Distribution<W> *w)
     : t(t), u(u), v(v), w(w) {}
-  boost::tuple<T, U, V, W> operator()() {
+  boost::tuple<T, U, V, W> operator()() override {
     return boost::make_tuple((*t)(), (*u)(), (*v)(), (*w)());
   }
 };
@@ -53,7 +53,7 @@ public:
       contents.insert(std::make_pair(count, *i));
     }
   }
-  virtual T operator()() {
+  T operator()() override {
     assert(contents.size());
     boost::uniform_int<> value(0, contents.size() - 1);
     return contents.find(value(rng))->second;
@@ -76,7 +76,7 @@ public:
       contents.insert(std::make_pair(total, i->second));
     }
   }
-  virtual T operator()() {
+  T operator()() override {
     return contents.lower_bound(
       boost::uniform_real<>(0, total)(rng))->second;
   }
@@ -107,7 +107,7 @@ class UniformRandom : public Distribution<uint64_t> {
 public:
   UniformRandom(const rngen_t &rng, uint64_t min, uint64_t max) :
     rng(rng), min(min), max(max) {}
-  virtual uint64_t operator()() {
+  uint64_t operator()() override {
     return boost::uniform_int<uint64_t>(min, max)(rng);
   }
 };
@@ -118,7 +118,7 @@ class Align : public Distribution<uint64_t> {
 public:
   Align(Distribution<uint64_t> *dist, uint64_t align) :
     dist(dist), align(align) {}
-  virtual uint64_t operator()() {
+  uint64_t operator()() override {
     uint64_t ret = (*dist)();
     return ret - (ret % align);
   }
@@ -128,7 +128,7 @@ class Uniform : public Distribution<uint64_t> {
   uint64_t val;
 public:
   explicit Uniform(uint64_t val) : val(val) {}
-  virtual uint64_t operator()() {
+  uint64_t operator()() override {
     return val;
   }
 };
index 50f3908d84ba6f91a2b7bc681054e8499c0a4f7c..11843f1599da3c0f0be14f89f901f0c51b9d5516 100644 (file)
@@ -43,7 +43,7 @@ class DumbBackend : public Backend {
     DumbBackend *backend;
   public:
     explicit SyncThread(DumbBackend *backend) : backend(backend) {}
-    void *entry() {
+    void *entry() override {
       backend->sync_loop();
       return 0;
     }
@@ -69,19 +69,19 @@ class DumbBackend : public Backend {
       ThreadPool *tp) :
       ThreadPool::WorkQueue<write_item>("DumbBackend::queue", ti, ti*10, tp),
       backend(_backend) {}
-    bool _enqueue(write_item *item) {
+    bool _enqueue(write_item *item) override {
       item_queue.push_back(item);
       return true;
     }
-    void _dequeue(write_item*) { ceph_abort(); }
-    write_item *_dequeue() {
+    void _dequeue(write_item*) override { ceph_abort(); }
+    write_item *_dequeue() override {
       if (item_queue.empty())
        return 0;
       write_item *retval = item_queue.front();
       item_queue.pop_front();
       return retval;
     }
-    bool _empty() {
+    bool _empty() override {
       return item_queue.empty();
     }
     void _process(write_item *item, ThreadPool::TPHandle &) override {
@@ -92,7 +92,7 @@ class DumbBackend : public Backend {
        item->on_applied,
        item->on_commit);
     }
-    void _clear() {
+    void _clear() override {
       return item_queue.clear();
     }
   } queue;
@@ -134,7 +134,7 @@ public:
       sem.Put();
     }
   }
-  ~DumbBackend() {
+  ~DumbBackend() override {
     {
       Mutex::Locker l(sync_loop_mutex);
       if (sync_loop_stop == 0)
@@ -150,7 +150,7 @@ public:
     uint64_t offset,
     const bufferlist &bl,
     Context *on_applied,
-    Context *on_commit) {
+    Context *on_commit) override {
     sem.Get();
     queue.queue(
       new write_item(
@@ -162,7 +162,7 @@ public:
     uint64_t offset,
     uint64_t length,
     bufferlist *bl,
-    Context *on_complete);
+    Context *on_complete) override;
 };
 
 #endif
index a607ae7c8cc583ee4c33065b981eda6e41baa87a..fa46ab3b185add43f4703d16f95560c624f15df5 100644 (file)
@@ -18,14 +18,14 @@ public:
     uint64_t offset,
     const bufferlist &bl,
     Context *on_applied,
-    Context *on_commit);
+    Context *on_commit) override;
 
   void read(
     const string &oid,
     uint64_t offset,
     uint64_t length,
     bufferlist *bl,
-    Context *on_complete);
+    Context *on_complete) override;
 };
 
 #endif
index 9994bc727b526a08b8531bb88f1de5d9db93a0ea..d245c99716b86713480ffc4abba52733e57e81a7 100644 (file)
@@ -17,14 +17,14 @@ public:
     uint64_t offset,
     const bufferlist &bl,
     Context *on_applied,
-    Context *on_commit);
+    Context *on_commit) override;
 
   void read(
     const string &oid,
     uint64_t offset,
     uint64_t length,
     bufferlist *bl,
-    Context *on_complete);
+    Context *on_complete) override;
 };
 
 #endif
index 2c3f8e6dc05216aabfcbc7655c58e701e3d02d87..412d93c860fe001f7c3a9c37a6047157013d6637 100644 (file)
@@ -16,7 +16,7 @@ class TestFileStoreBackend : public Backend {
 
 public:
   TestFileStoreBackend(ObjectStore *os, bool write_infos);
-  ~TestFileStoreBackend() {
+  ~TestFileStoreBackend() override {
     finisher.stop();
   }
   void write(
@@ -24,14 +24,14 @@ public:
     uint64_t offset,
     const bufferlist &bl,
     Context *on_applied,
-    Context *on_commit);
+    Context *on_commit) override;
 
   void read(
     const string &oid,
     uint64_t offset,
     uint64_t length,
     bufferlist *bl,
-    Context *on_complete);
+    Context *on_complete) override;
 };
 
 #endif
index 058dbcaf0cbb2679ef4887ff1a97d93cc1aa2b3c..334a4eecd0fae38fe412f7487a8597621835fa6d 100644 (file)
 class CompressorExample : public Compressor {
 public:
   CompressorExample() : Compressor(COMP_ALG_NONE, "example") {}
-  virtual ~CompressorExample() {}
+  ~CompressorExample() override {}
 
-  virtual int compress(const bufferlist &in, bufferlist &out)
+  int compress(const bufferlist &in, bufferlist &out) override
   {
     out = in;
     return 0;
   }
 
-  virtual int decompress(const bufferlist &in, bufferlist &out)
+  int decompress(const bufferlist &in, bufferlist &out) override
   {
     out = in;
     return 0;
   }
-  virtual int decompress(bufferlist::iterator &p, size_t compressed_len, bufferlist &out)
+  int decompress(bufferlist::iterator &p, size_t compressed_len, bufferlist &out) override
   {
     p.copy(MIN(p.get_remaining(), compressed_len), out);
     return 0;
index f4006c6d2ff1ca597ff8cc771d503ca3b349d5d1..11678e024e86012ea2af9df31313c8230cd4a052 100644 (file)
@@ -51,7 +51,7 @@ public:
     }
     cout << "[plugin " << plugin << " (" << GetParam() << ")]" << std::endl;
   }
-  ~CompressorTest() {
+  ~CompressorTest() override {
     g_conf->set_val("compressor_zlib_isal", old_zlib_isal ? "true" : "false");
     g_ceph_context->_conf->apply_changes(NULL);
   }
index 676e7d4ad050406151ea0eb0d266e56383de53aa..3875aaae00e344c0be76aa30b16735f7f2add4a4 100644 (file)
@@ -104,7 +104,7 @@ public:
     : m_object(new T),
       stray_okay(stray_okay),
       nondeterministic(nondeterministic) {}
-  ~DencoderBase() {
+  ~DencoderBase() override {
     delete m_object;
   }
 
@@ -220,7 +220,7 @@ public:
   MessageDencoderImpl() {
     m_object = new T;
   }
-  ~MessageDencoderImpl() {
+  ~MessageDencoderImpl() override {
     m_object->put();
   }
 
index d56ae2e4cac838a71e01ec0681ab3d8b1c72703e..f235c8f13fe4871e4107f30706fb56d68ef2908b 100644 (file)
 
 class ErasureCodeExample : public ErasureCode {
 public:
-  virtual ~ErasureCodeExample() {}
+  ~ErasureCodeExample() override {}
 
-  virtual int create_ruleset(const string &name,
+  int create_ruleset(const string &name,
                             CrushWrapper &crush,
-                            ostream *ss) const {
+                            ostream *ss) const override {
     return crush.add_simple_ruleset(name, "default", "host",
                                    "indep", pg_pool_t::TYPE_ERASURE, ss);
   }
   
-  virtual int minimum_to_decode(const set<int> &want_to_read,
+  int minimum_to_decode(const set<int> &want_to_read,
                                 const set<int> &available_chunks,
-                                set<int> *minimum) {
+                                set<int> *minimum) override {
     if (includes(available_chunks.begin(), available_chunks.end(),
                 want_to_read.begin(), want_to_read.end())) {
       *minimum = want_to_read;
@@ -61,9 +61,9 @@ public:
     }
   }
 
-  virtual int minimum_to_decode_with_cost(const set<int> &want_to_read,
+  int minimum_to_decode_with_cost(const set<int> &want_to_read,
                                           const map<int, int> &available,
-                                          set<int> *minimum) {
+                                          set<int> *minimum) override {
     //
     // If one chunk is more expensive to fetch than the others,
     // recover it instead. For instance, if the cost reflects the
@@ -91,21 +91,21 @@ public:
     return minimum_to_decode(want_to_read, available_chunks, minimum);
   }
 
-  virtual unsigned int get_chunk_count() const {
+  unsigned int get_chunk_count() const override {
     return DATA_CHUNKS + CODING_CHUNKS;
   }
 
-  virtual unsigned int get_data_chunk_count() const {
+  unsigned int get_data_chunk_count() const override {
     return DATA_CHUNKS;
   }
 
-  virtual unsigned int get_chunk_size(unsigned int object_size) const {
+  unsigned int get_chunk_size(unsigned int object_size) const override {
     return ( object_size / DATA_CHUNKS ) + 1;
   }
 
-  virtual int encode(const set<int> &want_to_encode,
+  int encode(const set<int> &want_to_encode,
                      const bufferlist &in,
-                     map<int, bufferlist> *encoded) {
+                     map<int, bufferlist> *encoded) override {
     //
     // make sure all data chunks have the same length, allocating
     // padding if necessary.
@@ -138,15 +138,15 @@ public:
     return 0;
   }
 
-  virtual int encode_chunks(const set<int> &want_to_encode,
-                           map<int, bufferlist> *encoded) {
+  int encode_chunks(const set<int> &want_to_encode,
+                           map<int, bufferlist> *encoded) override {
     ceph_abort();
     return 0;
   }
 
-  virtual int decode(const set<int> &want_to_read,
+  int decode(const set<int> &want_to_read,
                      const map<int, bufferlist> &chunks,
-                     map<int, bufferlist> *decoded) {
+                     map<int, bufferlist> *decoded) override {
     //
     // All chunks have the same size
     //
@@ -186,14 +186,14 @@ public:
     return 0;
   }
 
-  virtual int decode_chunks(const set<int> &want_to_read,
+  int decode_chunks(const set<int> &want_to_read,
                            const map<int, bufferlist> &chunks,
-                           map<int, bufferlist> *decoded) {
+                           map<int, bufferlist> *decoded) override {
     ceph_abort();
     return 0;
   }
 
-  virtual const vector<int> &get_chunk_mapping() const {
+  const vector<int> &get_chunk_mapping() const override {
     static vector<int> mapping;
     return mapping;
   }
index ddd571fb5a4f6f3eebc0412b2436e4bf341cb7e6..0bf01b05c3e15a0fa887414ab8663c371bb0d4fd 100644 (file)
@@ -31,7 +31,7 @@ public:
 
   ErasureCodeTest(unsigned int _k, unsigned int _m, unsigned int _chunk_size) :
     k(_k), m(_m), chunk_size(_chunk_size) {}
-  ~ErasureCodeTest() {}
+  ~ErasureCodeTest() override {}
 
   int init(ErasureCodeProfile &profile, ostream *ss) override {
     return 0;
index 64d3011a69f0e70ca000dfd04bf2b29fa7fb1d40..860329e61079f8534ade739ff13295a0464e30da 100644 (file)
@@ -18,8 +18,8 @@ public:
   static std::string get_temp_oid();
 
   RadosTestFixture();
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
 
   int create(const std::string &oid, uint8_t order = 14,
              uint8_t splay_width = 2);
@@ -46,7 +46,7 @@ public:
     Listener(RadosTestFixture *_test_fixture)
       : test_fixture(_test_fixture), mutex("mutex") {}
 
-    virtual void handle_update(journal::JournalMetadata *metadata) {
+    void handle_update(journal::JournalMetadata *metadata) override {
       Mutex::Locker locker(mutex);
       ++updates[metadata];
       cond.Signal();
index 8e9a93d5351b64a074aa39d10e43cb41ef3b931b..2bb1f1f4aa90947b380bc28adeca1de74fb0966f 100644 (file)
@@ -22,7 +22,7 @@
 class RadosTestNS : public ::testing::Test {
 public:
   RadosTestNS() {}
-  virtual ~RadosTestNS() {}
+  ~RadosTestNS() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
@@ -30,8 +30,8 @@ protected:
   static rados_t s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   rados_t cluster;
   rados_ioctx_t ioctx;
 };
@@ -39,7 +39,7 @@ protected:
 class RadosTestPPNS : public ::testing::Test {
 public:
   RadosTestPPNS() : cluster(s_cluster) {}
-  virtual ~RadosTestPPNS() {}
+  ~RadosTestPPNS() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
@@ -47,8 +47,8 @@ protected:
   static librados::Rados s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
 };
@@ -56,7 +56,7 @@ protected:
 class RadosTestParamPPNS : public ::testing::TestWithParam<const char*> {
 public:
   RadosTestParamPPNS() : cluster(s_cluster) {}
-  virtual ~RadosTestParamPPNS() {}
+  ~RadosTestParamPPNS() override {}
   static void SetUpTestCase();
   static void TearDownTestCase();
 protected:
@@ -65,8 +65,8 @@ protected:
   static std::string pool_name;
   static std::string cache_pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
 };
@@ -74,15 +74,15 @@ protected:
 class RadosTestECNS : public RadosTestNS {
 public:
   RadosTestECNS() {}
-  virtual ~RadosTestECNS() {}
+  ~RadosTestECNS() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
   static rados_t s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   rados_t cluster;
   rados_ioctx_t ioctx;
   uint64_t alignment;
@@ -91,15 +91,15 @@ protected:
 class RadosTestECPPNS : public RadosTestPPNS {
 public:
   RadosTestECPPNS() : cluster(s_cluster) {}
-  virtual ~RadosTestECPPNS() {}
+  ~RadosTestECPPNS() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
   static librados::Rados s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
   uint64_t alignment;
@@ -116,7 +116,7 @@ protected:
 class RadosTest : public ::testing::Test {
 public:
   RadosTest() {}
-  virtual ~RadosTest() {}
+  ~RadosTest() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
@@ -125,8 +125,8 @@ protected:
   static rados_t s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   rados_t cluster;
   rados_ioctx_t ioctx;
   std::string nspace;
@@ -135,7 +135,7 @@ protected:
 class RadosTestPP : public ::testing::Test {
 public:
   RadosTestPP() : cluster(s_cluster) {}
-  virtual ~RadosTestPP() {}
+  ~RadosTestPP() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
@@ -144,8 +144,8 @@ protected:
   static librados::Rados s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
   std::string nspace;
@@ -154,7 +154,7 @@ protected:
 class RadosTestParamPP : public ::testing::TestWithParam<const char*> {
 public:
   RadosTestParamPP() : cluster(s_cluster) {}
-  virtual ~RadosTestParamPP() {}
+  ~RadosTestParamPP() override {}
   static void SetUpTestCase();
   static void TearDownTestCase();
 protected:
@@ -164,8 +164,8 @@ protected:
   static std::string pool_name;
   static std::string cache_pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
   std::string nspace;
@@ -174,15 +174,15 @@ protected:
 class RadosTestEC : public RadosTest {
 public:
   RadosTestEC() {}
-  virtual ~RadosTestEC() {}
+  ~RadosTestEC() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
   static rados_t s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   rados_t cluster;
   rados_ioctx_t ioctx;
   std::string nspace;
@@ -192,15 +192,15 @@ protected:
 class RadosTestECPP : public RadosTestPP {
 public:
   RadosTestECPP() : cluster(s_cluster) {}
-  virtual ~RadosTestECPP() {}
+  ~RadosTestECPP() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
   static librados::Rados s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
   std::string nspace;
@@ -216,7 +216,7 @@ protected:
 class RadosTestNP: public ::testing::Test {
 public:
   RadosTestNP() {}
-  virtual ~RadosTestNP() {}
+  ~RadosTestNP() override {}
 };
 
 #endif
index 74065842829de3d020f4958b3d06938726cf321a..96348a1090ceb8b3b64a8090fd0edb546d381631 100644 (file)
@@ -836,7 +836,7 @@ class LibRadosTwoPoolsECPP : public RadosTestECPP
 {
 public:
   LibRadosTwoPoolsECPP() {};
-  ~LibRadosTwoPoolsECPP() {};
+  ~LibRadosTwoPoolsECPP() override {};
 protected:
   static void SetUpTestCase() {
     pool_name = get_temp_pool_name();
index 0b0c78385c7c935e0c8412d89847c1f390d081b3..ab7130ce5a41a6c95e8fe1855900012ab48aade4 100755 (executable)
@@ -67,7 +67,7 @@ class LibRadosTwoPoolsPP : public RadosTestPP
 {
 public:
   LibRadosTwoPoolsPP() {};
-  ~LibRadosTwoPoolsPP() {};
+  ~LibRadosTwoPoolsPP() override {};
 protected:
   static void SetUpTestCase() {
     pool_name = get_temp_pool_name();
@@ -2742,7 +2742,7 @@ class LibRadosTwoPoolsECPP : public RadosTestECPP
 {
 public:
   LibRadosTwoPoolsECPP() {};
-  ~LibRadosTwoPoolsECPP() {};
+  ~LibRadosTwoPoolsECPP() override {};
 protected:
   static void SetUpTestCase() {
     pool_name = get_temp_pool_name();
index 291853990ebe9eef0ec68e61e510788cc5f87e51..bc1250d84a9f0a0fdedd5e2ef4f9f462881ded1b 100644 (file)
@@ -26,7 +26,7 @@ public:
     return m_mock_client;
   }
 
-  virtual TestIoCtxImpl *clone() {
+  TestIoCtxImpl *clone() override {
     TestIoCtxImpl *io_ctx_impl = new ::testing::NiceMock<MockTestMemIoCtxImpl>(
       m_mock_client, m_client, get_pool_id(), get_pool_name(), get_pool());
     io_ctx_impl->set_snap_read(get_snap_read());
index 30f1206169183676d3cecf745cd02a904b071fbe..aa5318e1171d253716a369478ca71c85fcc6f046 100644 (file)
@@ -169,7 +169,7 @@ private:
     C_AioNotify(TestIoCtxImpl *_io_ctx, AioCompletionImpl *_aio_comp)
       : io_ctx(_io_ctx), aio_comp(_aio_comp) {
     }
-    virtual void finish(int r) {
+    void finish(int r) override {
       io_ctx->handle_aio_notify_complete(aio_comp, r);
     }
   };
index 97e9e89525ee54c2753b100a3e0050a991d730ad..bfe45df5d1b36babcea1dc0c7e8ef44fbf0c9c0d 100644 (file)
@@ -15,50 +15,51 @@ public:
   TestMemIoCtxImpl(TestMemRadosClient *client, int64_t m_pool_id,
                    const std::string& pool_name,
                    TestMemRadosClient::Pool *pool);
-  virtual ~TestMemIoCtxImpl();
-
-  virtual TestIoCtxImpl *clone();
-
-  virtual int aio_remove(const std::string& oid, AioCompletionImpl *c);
-
-  virtual int append(const std::string& oid, const bufferlist &bl,
-                     const SnapContext &snapc);
-  virtual int assert_exists(const std::string &oid);
-
-  virtual int create(const std::string& oid, bool exclusive);
-  virtual int list_snaps(const std::string& o, snap_set_t *out_snaps);
-  virtual int omap_get_vals(const std::string& oid,
-                            const std::string& start_after,
-                            const std::string &filter_prefix,
-                            uint64_t max_return,
-                            std::map<std::string, bufferlist> *out_vals);
-  virtual int omap_rm_keys(const std::string& oid,
-                           const std::set<std::string>& keys);
-  virtual int omap_set(const std::string& oid, const std::map<std::string,
-                       bufferlist> &map);
-  virtual int read(const std::string& oid, size_t len, uint64_t off,
-                   bufferlist *bl);
-  virtual int remove(const std::string& oid, const SnapContext &snapc);
-  virtual int selfmanaged_snap_create(uint64_t *snapid);
-  virtual int selfmanaged_snap_remove(uint64_t snapid);
-  virtual int selfmanaged_snap_rollback(const std::string& oid,
-                                        uint64_t snapid);
-  virtual int sparse_read(const std::string& oid, uint64_t off, uint64_t len,
-                          std::map<uint64_t,uint64_t> *m, bufferlist *data_bl);
-  virtual int stat(const std::string& oid, uint64_t *psize, time_t *pmtime);
-  virtual int truncate(const std::string& oid, uint64_t size,
-                       const SnapContext &snapc);
-  virtual int write(const std::string& oid, bufferlist& bl, size_t len,
-                    uint64_t off, const SnapContext &snapc);
-  virtual int write_full(const std::string& oid, bufferlist& bl,
-                         const SnapContext &snapc);
-  virtual int writesame(const std::string& oid, bufferlist& bl, size_t len,
-                        uint64_t off, const SnapContext &snapc);
-  virtual int xattr_get(const std::string& oid,
-                        std::map<std::string, bufferlist>* attrset);
-  virtual int xattr_set(const std::string& oid, const std::string &name,
-                        bufferlist& bl);
-  virtual int zero(const std::string& oid, uint64_t off, uint64_t len);
+  ~TestMemIoCtxImpl() override;
+
+  TestIoCtxImpl *clone() override;
+
+  int aio_remove(const std::string& oid, AioCompletionImpl *c) override;
+
+  int append(const std::string& oid, const bufferlist &bl,
+             const SnapContext &snapc) override;
+
+  int assert_exists(const std::string &oid) override;
+
+  int create(const std::string& oid, bool exclusive) override;
+  int list_snaps(const std::string& o, snap_set_t *out_snaps) override;
+  int omap_get_vals(const std::string& oid,
+                    const std::string& start_after,
+                    const std::string &filter_prefix,
+                    uint64_t max_return,
+                    std::map<std::string, bufferlist> *out_vals) override;
+  int omap_rm_keys(const std::string& oid,
+                   const std::set<std::string>& keys) override;
+  int omap_set(const std::string& oid, const std::map<std::string,
+               bufferlist> &map) override;
+  int read(const std::string& oid, size_t len, uint64_t off,
+           bufferlist *bl) override;
+  int remove(const std::string& oid, const SnapContext &snapc) override;
+  int selfmanaged_snap_create(uint64_t *snapid) override;
+  int selfmanaged_snap_remove(uint64_t snapid) override;
+  int selfmanaged_snap_rollback(const std::string& oid,
+                                        uint64_t snapid) override;
+  int sparse_read(const std::string& oid, uint64_t off, uint64_t len,
+                          std::map<uint64_t,uint64_t> *m, bufferlist *data_bl) override;
+  int stat(const std::string& oid, uint64_t *psize, time_t *pmtime) override;
+  int truncate(const std::string& oid, uint64_t size,
+                       const SnapContext &snapc) override;
+  int write(const std::string& oid, bufferlist& bl, size_t len,
+                    uint64_t off, const SnapContext &snapc) override;
+  int write_full(const std::string& oid, bufferlist& bl,
+                         const SnapContext &snapc) override;
+  int writesame(const std::string& oid, bufferlist& bl, size_t len,
+                        uint64_t off, const SnapContext &snapc) override;
+  int xattr_get(const std::string& oid,
+                        std::map<std::string, bufferlist>* attrset) override;
+  int xattr_set(const std::string& oid, const std::string &name,
+                        bufferlist& bl) override;
+  int zero(const std::string& oid, uint64_t off, uint64_t len) override;
 
 protected:
   TestMemRadosClient::Pool *get_pool() {
index dada74ec62a1a9713124d38053b9326ab79a754e..e574a1361b45d07d0eb772e3544beb7e5ecfd095 100644 (file)
@@ -67,25 +67,25 @@ public:
 
   TestMemRadosClient(CephContext *cct);
 
-  virtual TestIoCtxImpl *create_ioctx(int64_t pool_id,
-                                      const std::string &pool_name);
+  TestIoCtxImpl *create_ioctx(int64_t pool_id,
+                                      const std::string &pool_name) override;
 
-  virtual void object_list(int64_t pool_id, 
-                          std::list<librados::TestRadosClient::Object> *list);
+  void object_list(int64_t pool_id, 
+                          std::list<librados::TestRadosClient::Object> *list) override;
 
-  virtual int pool_create(const std::string &pool_name);
-  virtual int pool_delete(const std::string &pool_name);
-  virtual int pool_get_base_tier(int64_t pool_id, int64_t* base_tier);
-  virtual int pool_list(std::list<std::pair<int64_t, std::string> >& v);
-  virtual int64_t pool_lookup(const std::string &name);
-  virtual int pool_reverse_lookup(int64_t id, std::string *name);
+  int pool_create(const std::string &pool_name) override;
+  int pool_delete(const std::string &pool_name) override;
+  int pool_get_base_tier(int64_t pool_id, int64_t* base_tier) override;
+  int pool_list(std::list<std::pair<int64_t, std::string> >& v) override;
+  int64_t pool_lookup(const std::string &name) override;
+  int pool_reverse_lookup(int64_t id, std::string *name) override;
 
-  virtual int watch_flush();
+  int watch_flush() override;
 
-  virtual int blacklist_add(const std::string& client_address,
-                           uint32_t expire_seconds);
+  int blacklist_add(const std::string& client_address,
+                           uint32_t expire_seconds) override;
 protected:
-  ~TestMemRadosClient();
+  ~TestMemRadosClient() override;
 
   Pool *get_pool(const std::string &pool_name);
 
index cfa9f72ad7471d7e52fe8b74d6f9050127316537..301f53a8e68760f9a27fdd70578d3dba2ab9cb8c 100644 (file)
 class StriperTest : public ::testing::Test {
 public:
   StriperTest() {}
-  virtual ~StriperTest() {}
+  ~StriperTest() override {}
 protected:
   static void SetUpTestCase();
   static void TearDownTestCase();
   static rados_t s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
   rados_t cluster;
   rados_ioctx_t ioctx;
   rados_striper_t striper;
@@ -40,14 +40,14 @@ protected:
 class StriperTestPP : public ::testing::Test {
 public:
   StriperTestPP() : cluster(s_cluster) {}
-  virtual ~StriperTestPP() {}
+  ~StriperTestPP() override {}
   static void SetUpTestCase();
   static void TearDownTestCase();
 protected:
   static librados::Rados s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
+  void SetUp() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
   libradosstriper::RadosStriper striper;
@@ -66,14 +66,14 @@ struct TestData {
 class StriperTestParam : public ::testing::TestWithParam<TestData> {
 public:
   StriperTestParam() : cluster(s_cluster) {}
-  virtual ~StriperTestParam() {}
+  ~StriperTestParam() override {}
   static void SetUpTestCase();
   static void TearDownTestCase();
 protected:
   static librados::Rados s_cluster;
   static std::string pool_name;
 
-  virtual void SetUp();
+  void SetUp() override;
   librados::Rados &cluster;
   librados::IoCtx ioctx;
   libradosstriper::RadosStriper striper;
index 57427901ca66fb6d5b3ba140fdb43ff9dea016cd..c5345d662d1a379d0d0d22dbf4f9aa68e8cd04af 100644 (file)
@@ -25,7 +25,7 @@ private:
   uint64_t dcount;
 public:
   explicit SimpleDispatcher(Messenger *msgr);
-  virtual ~SimpleDispatcher();
+  ~SimpleDispatcher() override;
 
   uint64_t get_dcount() { return dcount; }
 
@@ -34,7 +34,7 @@ public:
   };
 
   // how i receive messages
-  virtual bool ms_dispatch(Message *m);
+  bool ms_dispatch(Message *m) override;
 
   /**
    * This function will be called whenever a new Connection is made to the
@@ -43,14 +43,14 @@ public:
    * @param con The new Connection which has been established. You are not
    * granted a reference to it -- take one if you need one!
    */
-  virtual void ms_handle_connect(Connection *con) { };
+  void ms_handle_connect(Connection *con) override { };
 
   /**
    * Callback indicating we have accepted an incoming connection.
    *
    * @param con The (new or existing) Connection associated with the session
    */
-  virtual void ms_handle_accept(Connection *con) { };
+  void ms_handle_accept(Connection *con) override { };
 
   /*
    * this indicates that the ordered+reliable delivery semantics have
@@ -62,7 +62,7 @@ public:
    * @param con The Connection which broke. You are not granted
    * a reference to it.
    */
-  virtual bool ms_handle_reset(Connection *con);
+  bool ms_handle_reset(Connection *con) override;
 
   /**
    * This indicates that the ordered+reliable delivery semantics
@@ -73,9 +73,9 @@ public:
    * @param con The Connection which broke. You are not granted
    * a reference to it.
    */
-  virtual void ms_handle_remote_reset(Connection *con);
+  void ms_handle_remote_reset(Connection *con) override;
   
-  virtual bool ms_handle_refused(Connection *con) { return false; }
+  bool ms_handle_refused(Connection *con) override { return false; }
 
   /**
    * @defgroup Authentication
@@ -94,8 +94,8 @@ public:
    *
    * @return True if this function call properly filled in *a, false otherwise.
    */
-  virtual bool ms_get_authorizer(int dest_type, AuthAuthorizer **a,
-                                bool force_new) { return false; };
+  bool ms_get_authorizer(int dest_type, AuthAuthorizer **a,
+                                bool force_new) override { return false; };
 
   /**
    * Verify the authorizer for a new incoming Connection.
@@ -112,10 +112,10 @@ public:
    * @return True if we were able to prove or disprove correctness of
    * authorizer, false otherwise.
    */
-  virtual bool ms_verify_authorizer(Connection *con, int peer_type,
+  bool ms_verify_authorizer(Connection *con, int peer_type,
                                    int protocol, bufferlist& authorizer,
                                    bufferlist& authorizer_reply,
-                                   bool& isvalid, CryptoKey& session_key) {
+                                   bool& isvalid, CryptoKey& session_key) override {
     /* always succeed */
     isvalid = true;
     return true;
index 2d428386ecb90a55dac761ed4dfc8c95ebeae526..ded62d28918b96d6564cf617d527c06baa6adf20 100644 (file)
@@ -75,7 +75,7 @@ class ServerDispatcher : public Dispatcher {
     op_wq(30, 30, &op_tp) {
     op_tp.start();
   }
-  ~ServerDispatcher() {
+  ~ServerDispatcher() override {
     op_tp.stop();
   }
   bool ms_can_fast_dispatch_any() const override { return true; }
index a324fa25e32b608055afbf4135110976309dde38..d422d1cf1444c410ccbb54ffebae95311cbf178f 100644 (file)
@@ -42,7 +42,7 @@ public:
            const string &oid)
        : coll(coll), oid(oid) {}
       void operator()(FileStoreTracker *harness,
-                     OutTransaction *out) {
+                     OutTransaction *out) override {
        harness->write(make_pair(coll, oid), out);
       }
     };
@@ -56,7 +56,7 @@ public:
                 const string &to)
        : coll(coll), from(from), to(to) {}
       void operator()(FileStoreTracker *harness,
-                     OutTransaction *out) {
+                     OutTransaction *out) override {
        harness->clone_range(make_pair(coll, from), make_pair(coll, to),
                             out);
       }
@@ -71,7 +71,7 @@ public:
                 const string &to)
        : coll(coll), from(from), to(to) {}
       void operator()(FileStoreTracker *harness,
-                     OutTransaction *out) {
+                     OutTransaction *out) override {
        harness->clone(make_pair(coll, from), make_pair(coll, to),
                             out);
       }
@@ -84,7 +84,7 @@ public:
             const string &obj)
        : coll(coll), obj(obj) {}
       void operator()(FileStoreTracker *harness,
-                     OutTransaction *out) {
+                     OutTransaction *out) override {
        harness->remove(make_pair(coll, obj),
                        out);
       }
index 80164c3bf7c15b5a5fbcb756c43d4053c927032f..c59d4769113ee76243b763542a1d1601d4ddf88d 100644 (file)
@@ -135,7 +135,7 @@ public:
    public:
     explicit C_OnFinished(TestObjectStoreState *state) : m_state(state) { }
 
-    void finish(int r) {
+    void finish(int r) override {
       Mutex::Locker locker(m_state->m_finished_lock);
       m_state->dec_in_flight();
       m_state->m_finished_cond.Signal();
index 0d5360ee20ef5e6daff89c3a8bb5c24bc85114df..978cd043b1ec2d34ad9ae3c3d2d4c22ff1bdf303 100644 (file)
@@ -132,7 +132,7 @@ public:
     explicit C_OnReadable(WorkloadGenerator *state)
      :TestObjectStoreState::C_OnFinished(state), wrkldgen_state(state) { }
 
-    void finish(int r)
+    void finish(int r) override
     {
       TestObjectStoreState::C_OnFinished::finish(r);
       wrkldgen_state->m_nr_runs.inc();
@@ -146,7 +146,7 @@ public:
     C_OnDestroyed(WorkloadGenerator *state, coll_entry_t *entry) :
           C_OnReadable(state), m_entry(entry) {}
 
-    void finish(int r) {
+    void finish(int r) override {
       C_OnReadable::finish(r);
       delete m_entry;
     }
@@ -160,7 +160,7 @@ public:
     C_StatWrapper(C_StatState *state, Context *context)
       : stat_state(state), ctx(context) { }
 
-    void finish(int r) {
+    void finish(int r) override {
       ctx->complete(r);
 
       stat_state->wrkldgen->m_stats_lock.Lock();
index d764a5d9ba35af05cffa9de41c133d30484a3e90..45637489c9ac6f32ff0d7d88cc22d203ae7ce599 100644 (file)
@@ -72,7 +72,7 @@ protected:
 
 public:
   AioWriter(OmapBench *omap_bench);
-  ~AioWriter();
+  ~AioWriter() override;
   virtual librados::AioCompletion * get_aioc();
   virtual void set_aioc(librados::callback_t complete,
       librados::callback_t safe);
index 47fcfd62eb632653e804d4b8b3c4cfc72eddb7f1..85a75a56ca9d70980cbf99b4d7414620ce6d38c2 100644 (file)
@@ -167,20 +167,20 @@ public:
       current = rand();
     }
 
-    ContDesc get_cont() const { return cont; }
-    uint64_t get_pos() const { return pos; }
+    ContDesc get_cont() const override { return cont; }
+    uint64_t get_pos() const override { return pos; }
 
-    iterator_impl &operator++() {
+    iterator_impl &operator++() override {
       pos++;
       current = rand();
       return *this;
     }
 
-    char operator*() {
+    char operator*() override {
       return current;
     }
 
-    void seek(uint64_t _pos) {
+    void seek(uint64_t _pos) override {
       if (_pos < pos) {
        iterator_impl begin = iterator_impl(cont, cont_gen);
        begin.seek(_pos);
@@ -191,22 +191,22 @@ public:
       }
     }
 
-    bool end() {
+    bool end() override {
       return pos >= cont_gen->get_length(cont);
     }
   };
 
-  ContentsGenerator::iterator_impl *get_iterator_impl(const ContDesc &in) {
+  ContentsGenerator::iterator_impl *get_iterator_impl(const ContDesc &in) override {
     RandGenerator::iterator_impl *i = new iterator_impl(in, this);
     return i;
   }
 
-  void put_iterator_impl(ContentsGenerator::iterator_impl *in) {
+  void put_iterator_impl(ContentsGenerator::iterator_impl *in) override {
     delete in;
   }
 
   ContentsGenerator::iterator_impl *dup_iterator_impl(
-    const ContentsGenerator::iterator_impl *in) {
+    const ContentsGenerator::iterator_impl *in) override {
     ContentsGenerator::iterator_impl *retval = get_iterator_impl(in->get_cont());
     retval->seek(in->get_pos());
     return retval;
@@ -224,8 +224,8 @@ public:
     min_stride_size(min_stride_size),
     max_stride_size(max_stride_size) {}
   void get_ranges_map(
-    const ContDesc &cont, std::map<uint64_t, uint64_t> &out);
-  uint64_t get_length(const ContDesc &in) {
+    const ContDesc &cont, std::map<uint64_t, uint64_t> &out) override;
+  uint64_t get_length(const ContDesc &in) override {
     RandWrap rand(in.seqnum);
     if (max_length == 0)
       return 0;
@@ -240,10 +240,10 @@ public:
   AttrGenerator(uint64_t max_len, uint64_t big_max_len)
     : max_len(max_len), big_max_len(big_max_len) {}
   void get_ranges_map(
-    const ContDesc &cont, std::map<uint64_t, uint64_t> &out) {
+    const ContDesc &cont, std::map<uint64_t, uint64_t> &out) override {
     out.insert(std::pair<uint64_t, uint64_t>(0, get_length(cont)));
   }
-  uint64_t get_length(const ContDesc &in) {
+  uint64_t get_length(const ContDesc &in) override {
     RandWrap rand(in.seqnum);
     // make some attrs big
     if (in.seqnum & 3)
@@ -292,11 +292,11 @@ public:
     RandWrap rand(in.seqnum);
     return round_up(rand() % max_append_total, alignment);
   }
-  uint64_t get_length(const ContDesc &in) {
+  uint64_t get_length(const ContDesc &in) override {
     return off + get_append_size(in);
   }
   void get_ranges_map(
-    const ContDesc &cont, std::map<uint64_t, uint64_t> &out);
+    const ContDesc &cont, std::map<uint64_t, uint64_t> &out) override;
 };
 
 class ObjectDesc {
index 21eaaa04602519f3bda40eae3666da20ffb24077..1cd0d83feeb6aef5aa9c809f1b97d6827462725e 100644 (file)
@@ -78,12 +78,12 @@ public:
                       lock("watch lock") {}
   void handle_notify(uint64_t notify_id, uint64_t cookie,
                     uint64_t notifier_id,
-                    bufferlist &bl) {
+                    bufferlist &bl) override {
     Mutex::Locker l(lock);
     waiting = false;
     cond.SignalAll();
   }
-  void handle_error(uint64_t cookie, int err) {
+  void handle_error(uint64_t cookie, int err) override {
     Mutex::Locker l(lock);
     cout << "watch handle_error " << err << std::endl;
   }
@@ -536,7 +536,7 @@ public:
     : TestOp(n, context, stat), oid(oid), comp(NULL)
   {}
 
-  void _begin()
+  void _begin() override
   {
     ContDesc cont;
     set<string> to_remove;
@@ -597,7 +597,7 @@ public:
     context->io_ctx.aio_operate(context->prefix+oid, comp, &op);
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     Mutex::Locker l(context->state_lock);
     done = true;
@@ -607,12 +607,12 @@ public:
     context->kick();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "RemoveAttrsOp";
   }
@@ -631,7 +631,7 @@ public:
       oid(oid), comp(NULL)
   {}
 
-  void _begin()
+  void _begin() override
   {
     ContDesc cont;
     {
@@ -687,7 +687,7 @@ public:
     context->io_ctx.aio_operate(context->prefix+oid, comp, &op);
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     Mutex::Locker l(context->state_lock);
     int r;
@@ -702,12 +702,12 @@ public:
     context->kick();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "SetAttrsOp";
   }
@@ -741,7 +741,7 @@ public:
       do_excl(do_excl)
   {}
                
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     done = 0;
@@ -855,7 +855,7 @@ public:
     context->state_lock.Unlock();
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     assert(info);
     context->state_lock.Lock();
@@ -915,12 +915,12 @@ public:
     context->state_lock.Unlock();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "WriteOp";
   }
@@ -948,7 +948,7 @@ public:
       last_acked_tid(0)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     done = 0;
@@ -1032,7 +1032,7 @@ public:
     context->state_lock.Unlock();
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     assert(info);
     context->state_lock.Lock();
@@ -1092,12 +1092,12 @@ public:
     context->state_lock.Unlock();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "WriteSameOp";
   }
@@ -1114,7 +1114,7 @@ public:
     : TestOp(n, context, stat), oid(oid)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     if (context->get_watch_context(oid)) {
@@ -1157,7 +1157,7 @@ public:
     context->state_lock.Unlock();
   }
 
-  string getType()
+  string getType() override
   {
     return "DeleteOp";
   }
@@ -1228,7 +1228,7 @@ public:
     }
   }
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     if (!(rand() % 4) && !context->snaps.empty()) {
@@ -1317,7 +1317,7 @@ public:
     context->state_lock.Unlock();
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     Mutex::Locker l(context->state_lock);
     assert(!done);
@@ -1473,12 +1473,12 @@ public:
     done = true;
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "ReadOp";
   }
@@ -1492,7 +1492,7 @@ public:
     : TestOp(n, context, stat)
   {}
 
-  void _begin()
+  void _begin() override
   {
     uint64_t snap;
     string snapname;
@@ -1539,11 +1539,11 @@ public:
     }
   }
 
-  string getType()
+  string getType() override
   {
     return "SnapCreateOp";
   }
-  bool must_quiesce_other_ops() { return context->pool_snaps; }
+  bool must_quiesce_other_ops() override { return context->pool_snaps; }
 };
 
 class SnapRemoveOp : public TestOp {
@@ -1556,7 +1556,7 @@ public:
       to_remove(snap)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     uint64_t snap = context->snaps[to_remove];
@@ -1587,7 +1587,7 @@ public:
     context->state_lock.Unlock();
   }
 
-  string getType()
+  string getType() override
   {
     return "SnapRemoveOp";
   }
@@ -1604,7 +1604,7 @@ public:
       oid(_oid)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     ObjectDesc contents;
@@ -1649,7 +1649,7 @@ public:
     }
   }
 
-  string getType()
+  string getType() override
   {
     return "WatchOp";
   }
@@ -1677,7 +1677,7 @@ public:
       last_finished(-1), outstanding(3)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     if (context->get_watch_context(oid)) {
@@ -1756,7 +1756,7 @@ public:
     }
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     Mutex::Locker l(context->state_lock);
     uint64_t tid = info->id;
@@ -1780,12 +1780,12 @@ public:
     }
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "RollBackOp";
   }
@@ -1815,7 +1815,7 @@ public:
       version(0), r(0)
   {}
 
-  void _begin()
+  void _begin() override
   {
     ContDesc cont;
     {
@@ -1861,7 +1861,7 @@ public:
 
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     Mutex::Locker l(context->state_lock);
 
@@ -1910,12 +1910,12 @@ public:
     }
   }
 
-  bool finished()
+  bool finished() override
   {
     return done == 2;
   }
 
-  string getType()
+  string getType() override
   {
     return "CopyFromOp";
   }
@@ -1937,7 +1937,7 @@ public:
       hash(hash)
   {}
 
-  void _begin()
+  void _begin() override
   {
     pair<TestOp*, TestOp::CallbackInfo*> *cb_arg =
       new pair<TestOp*, TestOp::CallbackInfo*>(this,
@@ -1948,7 +1948,7 @@ public:
     assert(r == 0);
   }
 
-  void _finish(CallbackInfo *info) {
+  void _finish(CallbackInfo *info) override {
     Mutex::Locker l(context->state_lock);
     if (!comp2) {
       if (ls.empty()) {
@@ -1987,11 +1987,11 @@ public:
     context->kick();
   }
 
-  bool finished() {
+  bool finished() override {
     return done;
   }
 
-  string getType() {
+  string getType() override {
     return "HitSetListOp";
   }
 };
@@ -2011,7 +2011,7 @@ public:
       oid(oid)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
     pair<TestOp*, TestOp::CallbackInfo*> *cb_arg =
@@ -2031,7 +2031,7 @@ public:
     assert(!r);
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     context->state_lock.Lock();
     assert(!done);
@@ -2044,12 +2044,12 @@ public:
     context->state_lock.Unlock();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "UndirtyOp";
   }
@@ -2075,7 +2075,7 @@ public:
       dirty(false)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
 
@@ -2112,7 +2112,7 @@ public:
     }
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     context->state_lock.Lock();
     assert(!done);
@@ -2137,12 +2137,12 @@ public:
     context->state_lock.Unlock();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "IsDirtyOp";
   }
@@ -2173,7 +2173,7 @@ public:
       can_fail(false)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
 
@@ -2224,7 +2224,7 @@ public:
     }
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     context->state_lock.Lock();
     assert(!done);
@@ -2251,12 +2251,12 @@ public:
     context->state_lock.Unlock();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "CacheFlushOp";
   }
@@ -2278,7 +2278,7 @@ public:
       oid(oid)
   {}
 
-  void _begin()
+  void _begin() override
   {
     context->state_lock.Lock();
 
@@ -2316,7 +2316,7 @@ public:
     }
   }
 
-  void _finish(CallbackInfo *info)
+  void _finish(CallbackInfo *info) override
   {
     context->state_lock.Lock();
     assert(!done);
@@ -2341,12 +2341,12 @@ public:
     context->state_lock.Unlock();
   }
 
-  bool finished()
+  bool finished() override
   {
     return done;
   }
 
-  string getType()
+  string getType() override
   {
     return "CacheEvictOp";
   }
index 8ab665c8c407c4a36ed9a1eab9ce9c6e63b1562d..d6d0235a4bf26c8507ab1c16fcbae5010d506483 100644 (file)
@@ -15,24 +15,24 @@ class Mutex;
 class FakeWriteback : public WritebackHandler {
 public:
   FakeWriteback(CephContext *cct, Mutex *lock, uint64_t delay_ns);
-  virtual ~FakeWriteback();
+  ~FakeWriteback() override;
 
-  virtual void read(const object_t& oid, uint64_t object_no,
+  void read(const object_t& oid, uint64_t object_no,
                    const object_locator_t& oloc, uint64_t off, uint64_t len,
                    snapid_t snapid, bufferlist *pbl, uint64_t trunc_size,
-                   __u32 trunc_seq, int op_flags, Context *onfinish);
+                   __u32 trunc_seq, int op_flags, Context *onfinish) override;
 
-  virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
                           uint64_t off, uint64_t len,
                           const SnapContext& snapc, const bufferlist &bl,
                           ceph::real_time mtime, uint64_t trunc_size,
                           __u32 trunc_seq, ceph_tid_t journal_tid,
-                          Context *oncommit);
+                          Context *oncommit) override;
 
   using WritebackHandler::write;
 
-  virtual bool may_copy_on_write(const object_t&, uint64_t, uint64_t,
-                                snapid_t);
+  bool may_copy_on_write(const object_t&, uint64_t, uint64_t,
+                                snapid_t) override;
 private:
   CephContext *m_cct;
   Mutex *m_lock;
index d5a057f0a7f3945a33e58406ccf5951015e6e740..726f297d4cadb058089f902c7b38ffabf9abc7b4 100644 (file)
@@ -15,24 +15,24 @@ class Mutex;
 class MemWriteback : public WritebackHandler {
 public:
   MemWriteback(CephContext *cct, Mutex *lock, uint64_t delay_ns);
-  virtual ~MemWriteback();
+  ~MemWriteback() override;
 
-  virtual void read(const object_t& oid, uint64_t object_no,
+  void read(const object_t& oid, uint64_t object_no,
                    const object_locator_t& oloc, uint64_t off, uint64_t len,
                    snapid_t snapid, bufferlist *pbl, uint64_t trunc_size,
-                   __u32 trunc_seq, int op_flags, Context *onfinish);
+                   __u32 trunc_seq, int op_flags, Context *onfinish) override;
 
-  virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
                           uint64_t off, uint64_t len,
                           const SnapContext& snapc, const bufferlist &bl,
                           ceph::real_time mtime, uint64_t trunc_size,
                           __u32 trunc_seq, ceph_tid_t journal_tid,
-                          Context *oncommit);
+                          Context *oncommit) override;
 
   using WritebackHandler::write;
 
-  virtual bool may_copy_on_write(const object_t&, uint64_t, uint64_t,
-                                snapid_t);
+  bool may_copy_on_write(const object_t&, uint64_t, uint64_t,
+                                snapid_t) override;
   void write_object_data(const object_t& oid, uint64_t off, uint64_t len,
                         const bufferlist& data_bl);
   int read_object_data(const object_t& oid, uint64_t off, uint64_t len,
index cb1724767673edc2be5d3e9468e92c5ad3aec019..d6b3dfc055f365ff57e257abcacfcea2ffa2dee0 100644 (file)
@@ -52,7 +52,7 @@ public:
   {
   }
 
-  ~RadosDeleteObjectsR()
+  ~RadosDeleteObjectsR() override
   {
   }
 
@@ -137,7 +137,7 @@ public:
   {
   }
 
-  ~RadosAddObjectsR()
+  ~RadosAddObjectsR() override
   {
   }
 
index 12d2f44a53c8abf6a50720bf14e3b445950186ad..0181e2b882570b29f6b066f0681bae02ab9fb7aa 100644 (file)
@@ -59,7 +59,7 @@ public:
   {
   }
 
-  ~StRadosOpenPool()
+  ~StRadosOpenPool() override
   {
   }
 
index 5554f3eec98c4476dcada9a1508eda7e730c6fda..ee65b22c62cc1299ee9acaad82db3eb01cfa7d11 100644 (file)
@@ -37,8 +37,8 @@ public:
                    const std::string &pool_name,
                    int num_objects,
                    const std::string &suffix);
-  ~StRadosCreatePool();
-  virtual int run();
+  ~StRadosCreatePool() override;
+  int run() override;
 private:
   CrossProcessSem *m_setup_sem;
   CrossProcessSem *m_pool_setup_sem;
index 718f88a60dc48f7da8b740b0e14d8b17ad44cb89..40771ee457cac86f184db1a27888f0ce68740dab 100644 (file)
@@ -35,8 +35,8 @@ public:
                    int num_objs,
                    const std::string &pool_name,
                    const std::string &suffix);
-  ~StRadosDeleteObjs();
-  virtual int run();
+  ~StRadosDeleteObjs() override;
+  int run() override;
 private:
   CrossProcessSem *m_setup_sem;
   CrossProcessSem *m_deleted_sem;
index 5aeb9513137b2ec1ec335b3dabb2cae76ad7d43f..cc48af9b9b3ca5319d80f4308a7e4ab34fff3fbc 100644 (file)
@@ -32,8 +32,8 @@ public:
                    CrossProcessSem *pool_setup_sem,
                    CrossProcessSem *delete_pool_sem,
                    const std::string &pool_name);
-  ~StRadosDeletePool();
-  virtual int run();
+  ~StRadosDeletePool() override;
+  int run() override;
 private:
   CrossProcessSem *m_pool_setup_sem;
   CrossProcessSem *m_delete_pool_sem;
index ddb1342e8b6710b73d2c0465a771351527bb5eec..b26d51844bbc4e0b916731e5c1a4fbc31a278313 100644 (file)
@@ -39,8 +39,8 @@ public:
                     CrossProcessSem *pool_setup_sem,
                     CrossProcessSem *midway_sem_wait,
                     CrossProcessSem *midway_sem_post);
-  ~StRadosListObjects();
-  virtual int run();
+  ~StRadosListObjects() override;
+  int run() override;
 private:
   std::string m_pool_name;
   bool m_accept_list_errors;
index 7c65efb6e7acd9d7d3aba4540227a00d04cb25ce..1d61b4d121b339729e92ec4796e3ca787c541378 100644 (file)
@@ -38,8 +38,8 @@ public:
                int notify_retcode,
                const std::string &pool_name,
                const std::string &obj_name);
-  ~StRadosNotify();
-  virtual int run();
+  ~StRadosNotify() override;
+  int run() override;
 private:
   CrossProcessSem *m_setup_sem;
   CrossProcessSem *m_notify_sem;
index e3e78c0cc0e176fa14919bd07a423ada28fdf187..366be3f87e0b8389fb70561bf2b73d8e861b55f2 100644 (file)
@@ -41,8 +41,8 @@ public:
               int watch_retcode,
               const std::string &pool_name,
               const std::string &obj_name);
-  ~StRadosWatch();
-  virtual int run();
+  ~StRadosWatch() override;
+  int run() override;
 private:
   CrossProcessSem *m_setup_sem;
   CrossProcessSem *m_watch_sem;
index cc39bc19aeefcdf160f53ddfb8e88ca00586beba..20d2a629b9640eae826541a08094542881f416cb 100644 (file)
@@ -167,7 +167,7 @@ public:
   PausyAsyncMap() : lock("PausyAsyncMap"), doer(this) {
     doer.create("doer");
   }
-  ~PausyAsyncMap() {
+  ~PausyAsyncMap() override {
     doer.join();
   }
   int get_keys(