]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/seastore/test_transaction_manager: add test for large single-transaction...
authorSamuel Just <sjust@redhat.com>
Mon, 19 Oct 2020 21:11:31 +0000 (14:11 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 20 Oct 2020 19:27:12 +0000 (12:27 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/test/crimson/seastore/test_transaction_manager.cc

index a1548cfa9deecdfc3a7f331d7169ff777774b66c..f561cacff18bb39a0b3851fb70436300faf0fcfa 100644 (file)
@@ -359,6 +359,37 @@ TEST_F(transaction_manager_test_t, create_remove_same_transaction)
   });
 }
 
+TEST_F(transaction_manager_test_t, split_merge_read_same_transaction)
+{
+  constexpr laddr_t SIZE = 4096;
+  run_async([this] {
+    {
+      auto t = create_transaction();
+      for (unsigned i = 0; i < 300; ++i) {
+       auto extent = alloc_extent(
+         t,
+         laddr_t(i * SIZE),
+         SIZE);
+      }
+      check_mappings(t);
+      submit_transaction(std::move(t));
+      check();
+    }
+    {
+      auto t = create_transaction();
+      for (unsigned i = 0; i < 240; ++i) {
+       dec_ref(
+         t,
+         laddr_t(i * SIZE));
+      }
+      check_mappings(t);
+      submit_transaction(std::move(t));
+      check();
+    }
+  });
+}
+
+
 TEST_F(transaction_manager_test_t, inc_dec_ref)
 {
   constexpr laddr_t SIZE = 4096;