From: Josh Durgin Date: Tue, 24 Feb 2015 22:31:27 +0000 (-0800) Subject: test_librbd: close ioctx after imagectx X-Git-Tag: v0.93~6^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df42fd383301aef6c9fbc32044bd0f1ab6d9cf3e;p=ceph.git test_librbd: close ioctx after imagectx There's no need to explicitly close the ioctx. Doing so may cause problems when the Images using it are destroyed afterwards. Just let normal cleanup at the end of the block take care of it in the correct order. Signed-off-by: Josh Durgin --- diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 10693ef8ae1c..abfb4bcf0d4b 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -2151,7 +2151,6 @@ TEST_F(TestLibRBD, DiffIterateDiscard) ASSERT_EQ(1u, extents.size()); ASSERT_EQ(diff_extent(0, 256, false), extents[0]); ASSERT_PASSED(validate_object_map, image); - ioctx.close(); } TEST_F(TestLibRBD, DiffIterateStress) @@ -2211,7 +2210,6 @@ TEST_F(TestLibRBD, DiffIterateStress) } ASSERT_PASSED(validate_object_map, image); - ioctx.close(); } TEST_F(TestLibRBD, DiffIterateRegression6926) @@ -2252,7 +2250,6 @@ TEST_F(TestLibRBD, DiffIterateRegression6926) ASSERT_EQ(0, image.diff_iterate(NULL, 0, size, vector_iterate_cb, (void *) &extents)); ASSERT_EQ(static_cast(0), extents.size()); - ioctx.close(); } TEST_F(TestLibRBD, ZeroLengthWrite)