From: Ilya Dryomov Date: Fri, 21 Jun 2024 13:56:27 +0000 (+0200) Subject: test/librbd: extend DiffIterateTest.DiffIterateDeterministic{,PP} X-Git-Tag: testing/wip-rishabh-testing-20240628.135345-debug~6^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=da69d1fdbf69cf37ba8b75ea9a230634bb25ae76;p=ceph-ci.git test/librbd: extend DiffIterateTest.DiffIterateDeterministic{,PP} Currently we are laying data only at the beginning of an object. Extend the skeletons to write to three different offsets in the middle and also at the end of the object. Separately, make C and C++ API test variants slightly different in terms of offsets being targeted to not go through exactly the same scenario twice. Signed-off-by: Ilya Dryomov --- diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 3c7864676ca..7445c6710fc 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -7652,8 +7652,8 @@ private: void test_deterministic_pp(librbd::Image& image, uint64_t object_off, uint64_t len, uint64_t block_size) { - uint64_t off1 = 0 << 20; - uint64_t off2 = 4 << 20; + uint64_t off1 = 8 << 20; + uint64_t off2 = 16 << 20; uint64_t size = 20 << 20; uint64_t extent_len = round_up_to(object_off + len, block_size); @@ -7876,14 +7876,22 @@ TYPED_TEST(DiffIterateTest, DiffIterateDeterministic) { REQUIRE(!is_feature_enabled(RBD_FEATURE_STRIPINGV2)); - this->test_deterministic(0, 256); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic(0, 256)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic((1 << 20) - 256, 256)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic((1 << 20) - 128, 256)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic(1 << 20, 256)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic((4 << 20) - 256, 256)); } TYPED_TEST(DiffIterateTest, DiffIterateDeterministicPP) { REQUIRE(!is_feature_enabled(RBD_FEATURE_STRIPINGV2)); - this->test_deterministic_pp(0, 256); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic_pp(0, 2)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic_pp((3 << 20) - 2, 2)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic_pp((3 << 20) - 1, 2)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic_pp(3 << 20, 2)); + EXPECT_NO_FATAL_FAILURE(this->test_deterministic_pp((4 << 20) - 2, 2)); } TYPED_TEST(DiffIterateTest, DiffIterateDiscard)