]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: remove ceph_test_rados_api_tmap_migrate 10256/head
authorKefu Chai <kchai@redhat.com>
Tue, 12 Jul 2016 07:07:48 +0000 (15:07 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 12 Jul 2016 08:08:09 +0000 (16:08 +0800)
see also: http://tracker.ceph.com/issues/16144

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/rados/test.sh
src/test/Makefile-client.am
src/test/librados/CMakeLists.txt
src/test/librados/tmap_migrate.cc [deleted file]

index fbc3797651e7216dd95a395f7c355b36e05c2c06..3b2d8cf96f07ec0808b7d7418ae97a966b647c3a 100755 (executable)
@@ -17,7 +17,6 @@ for f in \
     api_tier api_pool api_snapshots api_stat api_watch_notify api_cmd \
     api_c_write_operations \
     api_c_read_operations \
-    api_tmap_migrate \
     list_parallel \
     open_pools_parallel \
     delete_pools_parallel \
index f9534e5e1a301c42153307e9dd7316236997deba..69f3384ee9c138bbe523ecd19251a1c34e3a19a7 100644 (file)
@@ -291,14 +291,6 @@ ceph_test_rados_api_lock_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDAD
 ceph_test_rados_api_lock_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph_test_rados_api_lock
 
-if WITH_MDS
-ceph_test_rados_api_tmap_migrate_SOURCES = test/librados/tmap_migrate.cc tools/cephfs/DataScan.cc tools/cephfs/MDSUtility.cc
-ceph_test_rados_api_tmap_migrate_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(LIBMDS) libcls_cephfs_client.la  $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
-ceph_test_rados_api_tmap_migrate_CXXFLAGS = $(UNITTEST_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_rados_api_tmap_migrate
-endif
-
-
 ceph_test_stress_watch_SOURCES = test/test_stress_watch.cc
 ceph_test_stress_watch_LDADD = \
        $(LIBRADOS) $(LIBCOMMON) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
index 964af6a1d76cd1a44c70476b9da3ac2d35351d30..53dedfcf2d21f19bf3ec72e449f8f759640fd6f5 100644 (file)
@@ -141,16 +141,6 @@ set_target_properties(ceph_test_rados_api_snapshots PROPERTIES COMPILE_FLAGS
 target_link_libraries(ceph_test_rados_api_snapshots
   librados ${UNITTEST_LIBS} radostest)
 
-# ceph_test_rados_api_tmap_migrate
-add_executable(ceph_test_rados_api_tmap_migrate
-  ${CMAKE_SOURCE_DIR}/src/tools/cephfs/DataScan.cc
-  ${CMAKE_SOURCE_DIR}/src/tools/cephfs/MDSUtility.cc
-  tmap_migrate.cc
-  )
-set_target_properties(ceph_test_rados_api_tmap_migrate PROPERTIES COMPILE_FLAGS
-  ${UNITTEST_CXX_FLAGS})
-target_link_libraries(ceph_test_rados_api_tmap_migrate
-  librados mds osdc global cls_cephfs_client ${UNITTEST_LIBS} radostest)
 install(TARGETS
   ceph_test_rados_api_aio
   ceph_test_rados_api_c_read_operations
@@ -164,7 +154,6 @@ install(TARGETS
   ceph_test_rados_api_snapshots
   ceph_test_rados_api_stat
   ceph_test_rados_api_tier
-  ceph_test_rados_api_tmap_migrate
   ceph_test_rados_api_watch_notify
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 
diff --git a/src/test/librados/tmap_migrate.cc b/src/test/librados/tmap_migrate.cc
deleted file mode 100644 (file)
index 7231984..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "include/rados/librados.h"
-#include "include/rados/librados.hpp"
-#include "test/librados/test.h"
-#include "test/librados/TestCase.h"
-#include "include/encoding.h"
-#include "tools/cephfs/DataScan.h"
-#include "global/global_init.h"
-
-#include <algorithm>
-#include <errno.h>
-#include "gtest/gtest.h"
-
-
-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("");
-
-  bufferlist header;
-  std::map<std::string, bufferlist> kvs;
-  bufferlist val;
-  val.append("custard");
-  kvs.insert({"rhubarb", val});
-
-  bufferlist tmap_trans;
-  ::encode(header, tmap_trans);
-  ::encode(kvs, tmap_trans);
-
-  // Create a TMAP object
-  ASSERT_EQ(0, ioctx.tmap_put("10000000000.00000000", tmap_trans));
-
-  // Create an OMAP object
-  std::map<std::string, bufferlist> omap_kvs;
-  bufferlist omap_val;
-  omap_val.append("waffles");
-  omap_kvs.insert({"tasty", omap_val});
-  ASSERT_EQ(0, ioctx.omap_set("10000000001.00000000", omap_kvs));
-
-  // Check that the TMAP object is now an omap object
-  std::map<std::string, bufferlist> read_vals;
-  ASSERT_EQ(0, ioctx.omap_get_vals("10000000000.00000000", "", 1, &read_vals));
-  ASSERT_EQ(read_vals.size(), 1u);
-  bufferlist tmap_expect_val;
-  tmap_expect_val.append("custard");
-  ASSERT_EQ(read_vals.at("rhubarb"), tmap_expect_val);
-
-
-  // Check that the OMAP object is still readable
-  read_vals.clear();
-  ASSERT_EQ(0, ioctx.omap_get_vals("10000000001.00000000", "", 1, &read_vals));
-  ASSERT_EQ(read_vals.size(), 1u);
-  bufferlist expect_omap_val;
-  expect_omap_val.append("waffles");
-  ASSERT_EQ(read_vals.at("tasty"), expect_omap_val);
-}
-