Merge pull request #45297 from idryomov/wip-test-notify-rebuild-object-map

test/librbd/test_notify.py: effect post object map rebuild assert

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
This commit is contained in:
Ilya Dryomov 2022-03-09 10:15:56 +01:00 committed by GitHub
commit 249e5e352c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,11 +140,6 @@ def slave(ioctx):
assert(not image.is_exclusive_lock_owner())
assert(list(image.list_snaps()) == [])
print("rebuild object map")
image.rebuild_object_map()
assert(not image.is_exclusive_lock_owner())
assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) == 0)
if 'RBD_DISABLE_UPDATE_FEATURES' not in os.environ:
print("update_features")
assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
@ -155,6 +150,13 @@ def slave(ioctx):
assert(not image.is_exclusive_lock_owner())
assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) != 0)
else:
print("skipping update_features")
print("rebuild object map")
image.rebuild_object_map()
assert(not image.is_exclusive_lock_owner())
assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) == 0)
print("write")
data = os.urandom(512)