From: Jason Dillaman Date: Wed, 23 Dec 2015 15:31:07 +0000 (-0500) Subject: tests: rebuild exclusive lock test should acquire exclusive lock X-Git-Tag: v9.2.1~37^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7038%2Fhead;p=ceph.git tests: rebuild exclusive lock test should acquire exclusive lock Starting with Jewel, the object map will not be loaded until the exclusive lock is acquired since it might be updated by the lock owner. Fixes: #14121 Signed-off-by: Jason Dillaman --- diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 689e285267bd..09eeb6595b75 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -3059,6 +3059,12 @@ TEST_F(TestLibRBD, RebuildObjectMap) librbd::Image image1; ASSERT_EQ(0, rbd.open(ioctx, image1, name.c_str(), NULL)); + bool lock_owner; + bl.clear(); + ASSERT_EQ(0, image1.write(0, 0, bl)); + ASSERT_EQ(0, image1.is_exclusive_lock_owner(&lock_owner)); + ASSERT_TRUE(lock_owner); + uint64_t flags; ASSERT_EQ(0, image1.get_flags(&flags)); ASSERT_TRUE((flags & RBD_FLAG_OBJECT_MAP_INVALID) != 0);