summaryrefslogtreecommitdiffstats
path: root/src/test/cls_lock
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2018-01-09 10:19:28 +0100
committerKefu Chai <kchai@redhat.com>2018-11-01 17:15:30 +0100
commit3730d10623650ce8569be96b28cbba599a9a0db6 (patch)
tree7ca8b78c7455d237ad06ebf38b3d33e8dd294863 /src/test/cls_lock
parentlibrados: move get_inconsistent_pgs() into RadosClient (diff)
downloadceph-3730d10623650ce8569be96b28cbba599a9a0db6.tar.xz
ceph-3730d10623650ce8569be96b28cbba599a9a0db6.zip
librados: move C++ APIs into libradospp
the goal is to decouple C++ API from C API, and to version them differently, as they are targeting different consumers. this allows us to change the C++ API and bumping up its soversion without requiring consumer to recompile the librados client for using the new librados. in this way, C++ API can move faster than C API. for example, if bufferlist interface is changed for better performance, and this breaks existing API/ABI, we can bump up the C++ library's soversion, and and the C library's version unchanged but ship the new librados's C binding. so the librados client linked against librados's C library will be able to take advantage of the improvement in C++ library. while the librados client linked against C++ library won't break at runtime due to unresolved symbol or changed structure layout. this is massive change, the genereal idea is to * split librados.cc into two source files: librados_c.cc and librados_cxx.cc, the former for implementing C APIs, the later for C++ APIs. * extract the C++ API in librados into librados-cxx, the library name will be libradospp. but we can change it before nautilus is released. * link these librados libraries with static libraries which it depends on, so "-Wl,--exclude-libs,ALL" link flags can help hide the non-public symbols. * extract the tests exercising librados' C++ API into a different source file named *_cxx.cc. for instance, to move the C++ tests in aio.cc into aio_cxx.cc * extract the shared helper functions which do not use any librados or librados-cxx APIs into test_shared{.cc,h}. the "shared" here means, *shared* by C++ and C tests. * extract the test fixtures, i.e., the subclasses of testing::Test, for testing C++ APIs into testcase_cxx.cc. * update qa/workunits/rados/test.sh accordingly to add the splitted tests * update the consumers of librados to link against librados-cxx instead, if they are using the C++ API. Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/test/cls_lock')
-rw-r--r--src/test/cls_lock/CMakeLists.txt4
-rw-r--r--src/test/cls_lock/test_cls_lock.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/cls_lock/CMakeLists.txt b/src/test/cls_lock/CMakeLists.txt
index 49214e17e68..53f36725c56 100644
--- a/src/test/cls_lock/CMakeLists.txt
+++ b/src/test/cls_lock/CMakeLists.txt
@@ -3,14 +3,14 @@ add_executable(ceph_test_cls_lock
)
target_link_libraries(ceph_test_cls_lock
cls_lock_client
- librados
+ librados-cxx
global
${UNITTEST_LIBS}
${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
${CRYPTO_LIBS}
${EXTRALIBS}
- radostest
+ radostest-cxx
)
install(TARGETS
ceph_test_cls_lock
diff --git a/src/test/cls_lock/test_cls_lock.cc b/src/test/cls_lock/test_cls_lock.cc
index 37d10a19cbc..c9bc2dd4b89 100644
--- a/src/test/cls_lock/test_cls_lock.cc
+++ b/src/test/cls_lock/test_cls_lock.cc
@@ -20,7 +20,7 @@
#include "msg/msg_types.h"
#include "include/rados/librados.hpp"
-#include "test/librados/test.h"
+#include "test/librados/test_cxx.h"
#include "gtest/gtest.h"
using namespace librados;