diff options
Diffstat (limited to 'src/test/librbd/io/test_mock_CopyupRequest.cc')
-rw-r--r-- | src/test/librbd/io/test_mock_CopyupRequest.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/test/librbd/io/test_mock_CopyupRequest.cc b/src/test/librbd/io/test_mock_CopyupRequest.cc index 03a668da260..e9034918ee7 100644 --- a/src/test/librbd/io/test_mock_CopyupRequest.cc +++ b/src/test/librbd/io/test_mock_CopyupRequest.cc @@ -13,6 +13,7 @@ #include "librbd/deep_copy/ObjectCopyRequest.h" #include "librbd/io/CopyupRequest.h" #include "librbd/io/ImageRequest.h" +#include "librbd/io/ImageRequestWQ.h" #include "librbd/io/ObjectRequest.h" #include "librbd/io/ReadResult.h" @@ -310,6 +311,10 @@ struct TestMockIoCopyupRequest : public TestMockFixture { })); } + void flush_async_operations(librbd::ImageCtx* ictx) { + ictx->io_work_queue->flush(); + } + std::string m_parent_image_name; }; @@ -450,7 +455,7 @@ TEST_F(TestMockIoCopyupRequest, CopyOnRead) { {{0, 4096}}, {}); mock_image_ctx.copyup_list[0] = req; req->send(); - ictx->flush_async_operations(); + flush_async_operations(ictx); } TEST_F(TestMockIoCopyupRequest, CopyOnReadWithSnaps) { @@ -496,7 +501,7 @@ TEST_F(TestMockIoCopyupRequest, CopyOnReadWithSnaps) { {{0, 4096}}, {}); mock_image_ctx.copyup_list[0] = req; req->send(); - ictx->flush_async_operations(); + flush_async_operations(ictx); } TEST_F(TestMockIoCopyupRequest, DeepCopy) { @@ -580,7 +585,7 @@ TEST_F(TestMockIoCopyupRequest, DeepCopyOnRead) { {{0, 4096}}, {}); mock_image_ctx.copyup_list[0] = req; req->send(); - ictx->flush_async_operations(); + flush_async_operations(ictx); } TEST_F(TestMockIoCopyupRequest, DeepCopyWithPostSnaps) { @@ -797,7 +802,7 @@ TEST_F(TestMockIoCopyupRequest, ZeroedCopyOnRead) { {{0, 4096}}, {}); mock_image_ctx.copyup_list[0] = req; req->send(); - ictx->flush_async_operations(); + flush_async_operations(ictx); } TEST_F(TestMockIoCopyupRequest, NoOpCopyup) { @@ -1054,7 +1059,7 @@ TEST_F(TestMockIoCopyupRequest, CopyupError) { req->send(); ASSERT_EQ(-EPERM, mock_write_request.ctx.wait()); - ictx->flush_async_operations(); + flush_async_operations(ictx); } } // namespace io |