From: Jason Dillaman Date: Thu, 26 Mar 2015 02:40:17 +0000 (-0400) Subject: tests: relax diff_iterate discard test X-Git-Tag: v9.0.1~55^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dd82561c82905bab56c932a6cc3f1602a113dc48;p=ceph.git tests: relax diff_iterate discard test The fast diff algorithm can only flag an object as deleted if the full object is discarded -- not just a small section. Signed-off-by: Jason Dillaman --- diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 66bf4901572b..ea6009ec60d0 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -2185,7 +2185,7 @@ TYPED_TEST(DiffIterateTest, DiffIterateDiscard) ASSERT_EQ(diff_extent(0, 256, true, object_size), extents[0]); int obj_ofs = 256; - ASSERT_EQ(obj_ofs, image.discard(0, obj_ofs)); + ASSERT_EQ(1 << order, image.discard(0, 1 << order)); extents.clear(); ASSERT_EQ(0, image.diff_iterate2(NULL, 0, size, true, this->whole_object,