From: Kefu Chai Date: Wed, 26 Apr 2017 14:58:30 +0000 (+0800) Subject: test/librados/tmap_migrate: g_ceph_context->put() upon return X-Git-Tag: v10.2.8~62^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14809%2Fhead;p=ceph.git test/librados/tmap_migrate: g_ceph_context->put() upon return Signed-off-by: Kefu Chai 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. --- diff --git a/src/test/librados/tmap_migrate.cc b/src/test/librados/tmap_migrate.cc index 98be69a1128f..b9eb2474e796 100644 --- a/src/test/librados/tmap_migrate.cc +++ b/src/test/librados/tmap_migrate.cc @@ -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 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("");