mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge pull request #44500 from idryomov/wip-rbd-test-group-leak
test/librbd: fix group_info.name leaks in TestGroup.add_image Reviewed-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
commit
966830f651
@ -99,8 +99,9 @@ TEST_F(TestGroup, add_image)
|
||||
|
||||
rbd_group_info_t group_info;
|
||||
ASSERT_EQ(0, rbd_get_group(image, &group_info, sizeof(group_info)));
|
||||
ASSERT_EQ(0,strcmp("", group_info.name));
|
||||
ASSERT_EQ(0, strcmp("", group_info.name));
|
||||
ASSERT_EQ(RBD_GROUP_INVALID_POOL, group_info.pool);
|
||||
rbd_group_info_cleanup(&group_info, sizeof(group_info));
|
||||
|
||||
ASSERT_EQ(0, rbd_group_image_add(ioctx, group_name, ioctx,
|
||||
m_image_name.c_str()));
|
||||
@ -109,6 +110,7 @@ TEST_F(TestGroup, add_image)
|
||||
ASSERT_EQ(0, rbd_get_group(image, &group_info, sizeof(group_info)));
|
||||
ASSERT_EQ(0, strcmp(group_name, group_info.name));
|
||||
ASSERT_EQ(rados_ioctx_get_id(ioctx), group_info.pool);
|
||||
rbd_group_info_cleanup(&group_info, sizeof(group_info));
|
||||
|
||||
ASSERT_EQ(0, rbd_get_features(image, &features));
|
||||
ASSERT_TRUE((features & RBD_FEATURE_OPERATIONS) ==
|
||||
|
Loading…
Reference in New Issue
Block a user