mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
tests: correct update_features test for FAST_DIFF feature
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
c39691838c
commit
3e7a342b4b
@ -2870,16 +2870,26 @@ TEST_F(TestLibRBD, UpdateFeatures)
|
||||
ASSERT_EQ(-EINVAL, image.update_features(0, true));
|
||||
|
||||
ASSERT_EQ(0, image.update_features(RBD_FEATURE_EXCLUSIVE_LOCK |
|
||||
RBD_FEATURE_OBJECT_MAP, false));
|
||||
RBD_FEATURE_OBJECT_MAP |
|
||||
RBD_FEATURE_FAST_DIFF, false));
|
||||
|
||||
// cannot enable object map w/o exclusive lock
|
||||
ASSERT_EQ(-EINVAL, image.update_features(RBD_FEATURE_OBJECT_MAP, true));
|
||||
|
||||
ASSERT_EQ(0, image.update_features(RBD_FEATURE_EXCLUSIVE_LOCK, true));
|
||||
ASSERT_EQ(0, image.update_features(RBD_FEATURE_OBJECT_MAP, true));
|
||||
|
||||
// cannot enable fast diff w/o object map
|
||||
ASSERT_EQ(-EINVAL, image.update_features(RBD_FEATURE_FAST_DIFF, true));
|
||||
ASSERT_EQ(0, image.update_features(RBD_FEATURE_OBJECT_MAP |
|
||||
RBD_FEATURE_FAST_DIFF, true));
|
||||
|
||||
// cannot disable object map w/ fast diff
|
||||
ASSERT_EQ(-EINVAL, image.update_features(RBD_FEATURE_OBJECT_MAP, false));
|
||||
ASSERT_EQ(0, image.update_features(RBD_FEATURE_FAST_DIFF, false));
|
||||
|
||||
// cannot disable exclusive lock w/ object map
|
||||
ASSERT_EQ(-EINVAL, image.update_features(RBD_FEATURE_EXCLUSIVE_LOCK, false));
|
||||
ASSERT_EQ(0, image.update_features(RBD_FEATURE_OBJECT_MAP, false));
|
||||
ASSERT_EQ(0, image.update_features(RBD_FEATURE_EXCLUSIVE_LOCK, false));
|
||||
}
|
||||
|
||||
TEST_F(TestLibRBD, RebuildObjectMap)
|
||||
|
Loading…
Reference in New Issue
Block a user