]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os:kstore fix unittest for FiemapHole
authorNing Yao <yaoning@unitedstack.com>
Mon, 28 Aug 2017 15:48:50 +0000 (15:48 +0000)
committerNing Yao <yaoning@unitedstack.com>
Thu, 31 Aug 2017 12:31:55 +0000 (12:31 +0000)
kstore always return [0, object_size] regardless of offset and length

Signed-off-by: Ning Yao <yaoning@unitedstack.com>
(cherry picked from commit dddae89fa7956fdfca1c09910b4e5b42ecbd22cf)

src/test/objectstore/store_test.cc

index 4cada7e2e43539fbfdeb26f921651577e9f45a78..d78b4e6d6ec7458433af25a16d587a3fa863b0a8 100644 (file)
@@ -307,7 +307,12 @@ TEST_P(StoreTest, FiemapHoles) {
     ::decode(m, p);
     cout << " got " << m << std::endl;
     ASSERT_TRUE(!m.empty());
-    ASSERT_GE(m[SKIP_STEP], 3u);
+
+    // kstore always return [0, object_size] regardless of offset and length
+    // FIXME: if fiemap logic in kstore is refined
+    if (string(GetParam()) != "kstore") {
+      ASSERT_GE(m[SKIP_STEP], 3u);
+    }
     extents_exist = true;
     if (m.size() == (MAX_EXTENTS - 2)) {
       for (uint64_t i = 1; i < MAX_EXTENTS - 1; i++)