Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kraken: tests: [librados_test_stub] cls_cxx_map_get_XYZ methods don't return correct value #16097

Merged
merged 1 commit into from
Jul 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/test/librados_test_stub/LibradosTestStub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ int cls_cxx_map_get_keys(cls_method_context_t hctx, const string &start_obj,
keys->insert(last_key);
}
} while (!vals.empty());
return 0;
return keys->size();
}

int cls_cxx_map_get_val(cls_method_context_t hctx, const string &key,
Expand Down Expand Up @@ -1094,8 +1094,12 @@ int cls_cxx_map_get_vals(cls_method_context_t hctx, const string &start_obj,
std::map<string, bufferlist> *vals) {
librados::TestClassHandler::MethodContext *ctx =
reinterpret_cast<librados::TestClassHandler::MethodContext*>(hctx);
return ctx->io_ctx_impl->omap_get_vals(ctx->oid, start_obj, filter_prefix,
max_to_get, vals);
int r = ctx->io_ctx_impl->omap_get_vals(ctx->oid, start_obj, filter_prefix,
max_to_get, vals);
if (r < 0) {
return r;
}
return vals->size();
}

int cls_cxx_map_remove_key(cls_method_context_t hctx, const string &key) {
Expand Down