this change helps to silence warnings like:
Failed to load class: cas
(/home/jenkins-build/build/workspace/ceph-pull-requests/build/lib/libcls_cas.so):
/home/jenkins-build/build/workspace/ceph-pull-requests/build/lib/libcls_cas.so:
undefined symbol:
_Z27cls_cxx_chunk_write_and_setPviiPN4ceph6buffer7v14_2_04listEjS4_i
currently, LibradosTestStub.cc only offers the minimum set of APIs used by
class objects to support librbd related tests. but when
`TestClassHandler::open_class()` enumates the object classes and then
tries to load them, some of the classes fail to load due to unresolvable
symbols. it's fine in the sense that these classes are not tested by the
librbd tests. but these warning messages are just annoying and sometimes
misleading, so in this change, the missing symbols are added as dummy
stubs which just returns `-ENOTSUP` to silence the messages.
Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph_release_t cls_get_required_osd_release(cls_handle_t hclass) {
return ceph_release_t::nautilus;
}
+
+// stubs to silence TestClassHandler::open_class()
+PGLSFilter::~PGLSFilter()
+{}
+
+int cls_gen_rand_base64(char *, int) {
+ return -ENOTSUP;
+}
+
+int cls_cxx_chunk_write_and_set(cls_method_handle_t, int,
+ int, bufferlist *,
+ uint32_t, bufferlist *, int) {
+ return -ENOTSUP;
+}
+
+int cls_cxx_map_read_header(cls_method_handle_t, bufferlist *) {
+ return -ENOTSUP;
+}