Merge pull request #23827 from trociny/wip-mock-valgrind

test/librbd: fix valgrind warnings 

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2018-09-04 15:04:56 -04:00 committed by GitHub
commit 221359cc89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public:
auto rados_client = (*io_ctx_impl)->get_mock_rados_client();
EXPECT_CALL(*rados_client, create_ioctx(_, _))
.WillOnce(Return(*io_ctx_impl));
.WillOnce(DoAll(GetReference(*io_ctx_impl), Return(*io_ctx_impl)));
}
void expect_child_detach(MockImageCtx &mock_image_ctx,

View File

@ -117,7 +117,8 @@ struct MockImageCtx {
enable_alloc_hint(image_ctx.enable_alloc_hint),
ignore_migrating(image_ctx.ignore_migrating),
mtime_update_interval(image_ctx.mtime_update_interval),
atime_update_interval(image_ctx.atime_update_interval)
atime_update_interval(image_ctx.atime_update_interval),
cache(image_ctx.cache)
{
md_ctx.dup(image_ctx.md_ctx);
data_ctx.dup(image_ctx.data_ctx);