]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/seastore: test removing objects with omap and data 49020/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Wed, 30 Nov 2022 09:26:21 +0000 (17:26 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Thu, 12 Jan 2023 04:01:35 +0000 (12:01 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/test/crimson/seastore/test_seastore.cc

index ae0c5eafa6689d7ba21d0b48f49ef985d87f8c43..fc4457cdf7ca2c18174e941e88e0f2e4a7254211 100644 (file)
@@ -232,6 +232,7 @@ struct seastore_test_t :
        bl.length(),
        bl);
     }
+
     void write(
       SeaStore &seastore,
       uint64_t offset,
@@ -927,6 +928,35 @@ TEST_P(seastore_test_t, omap_test_iterator)
   });
 }
 
+TEST_P(seastore_test_t, object_data_omap_remove)
+{
+  run_async([this] {
+    auto make_key = [](unsigned i) {
+      std::stringstream ss;
+      ss << "key" << i;
+      return ss.str();
+    };
+    auto &test_obj = get_object(make_oid(0));
+    test_obj.touch(*seastore);
+    for (unsigned i = 0; i < 1024; ++i) {
+      test_obj.set_omap(
+       *seastore,
+       make_key(i),
+       make_bufferlist(128));
+    }
+    test_obj.check_omap(*seastore);
+
+    for (uint64_t i = 0; i < 16; i++) {
+      test_obj.write(
+       *seastore,
+       4096 * i,
+       4096,
+       'a');
+    }
+    test_obj.remove(*seastore);
+  });
+}
+
 
 TEST_P(seastore_test_t, simple_extent_test)
 {