]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/librbd: drop test_internal.ShrinkFlushCase test case
authorJason Dillaman <dillaman@redhat.com>
Thu, 16 Jul 2020 21:19:04 +0000 (17:19 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 16 Jul 2020 21:19:04 +0000 (17:19 -0400)
It's a racey test that is better exercised by the existing resize
state machine mock tests.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librbd/test_internal.cc

index 283fd7c55923052d9fbbd1f1c236a4198fd071e7..3164e3e7b7eff31249164ec121830a5581002826 100644 (file)
@@ -1026,32 +1026,6 @@ TEST_F(TestInternal, DiscardCopyup)
   }
 }
 
-TEST_F(TestInternal, ShrinkFlushesCache) {
-  librbd::ImageCtx *ictx;
-  ASSERT_EQ(0, open_image(m_image_name, &ictx));
-
-  std::string buffer(4096, '1');
-
-  // ensure write-path is initialized
-  bufferlist write_bl;
-  write_bl.append(buffer);
-  api::Io<>::write(*ictx, 0, buffer.size(), bufferlist{write_bl}, 0);
-
-  C_SaferCond cond_ctx;
-  auto c = librbd::io::AioCompletion::create(&cond_ctx);
-  c->get();
-  api::Io<>::aio_write(*ictx, c, 0, buffer.size(), bufferlist{write_bl}, 0,
-                       true);
-
-  librbd::NoOpProgressContext no_op;
-  ASSERT_EQ(0, ictx->operations->resize(m_image_size >> 1, true, no_op));
-
-  ASSERT_TRUE(c->is_complete());
-  ASSERT_EQ(0, c->wait_for_complete());
-  ASSERT_EQ(0, cond_ctx.wait());
-  c->put();
-}
-
 TEST_F(TestInternal, ImageOptions) {
   rbd_image_options_t opts1 = NULL, opts2 = NULL;
   uint64_t uint64_val1 = 10, uint64_val2 = 0;