]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados/tmap_migrate: g_ceph_context->put() upon return 14809/head
authorKefu Chai <kchai@redhat.com>
Wed, 26 Apr 2017 14:58:30 +0000 (22:58 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 26 Apr 2017 15:08:14 +0000 (23:08 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
Conflict: test/librados/tmap_migrate.cc
  this change is not cherry-picked from master, because tmap_migrate was
removed in master. so we are applying the same change in
cb1cda96713b2ec0f6418c4cbe3d964c2020729c to this test.

src/test/librados/tmap_migrate.cc

index 98be69a1128f22937715b2bc38363b423709e772..b9eb2474e7966d6eed284327fdbf3b52593e71a4 100644 (file)
@@ -2,6 +2,7 @@
 #include "include/rados/librados.hpp"
 #include "test/librados/test.h"
 #include "test/librados/TestCase.h"
+#include "test/unit.h"
 #include "include/encoding.h"
 #include "tools/cephfs/DataScan.h"
 #include "global/global_init.h"
@@ -16,10 +17,6 @@ using namespace librados;
 typedef RadosTestPP TmapMigratePP;
 
 TEST_F(TmapMigratePP, DataScan) {
-  std::vector<const char *> args;
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
   // DataScan isn't namespace-aware, so override RadosTestPP's default
   // behaviour of putting everything into a namespace
   ioctx.set_namespace("");