]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: aio_write/aio_discard have been refactored
authorJason Dillaman <dillaman@redhat.com>
Tue, 7 Jul 2015 23:07:03 +0000 (19:07 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 13 Nov 2015 01:17:52 +0000 (20:17 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librbd/test_internal.cc

index 19ed009fc94ea7b5bd433b272360eef883530013..1bf8bce4074b4e4843dd20d4fa9c22b5cd55f5f5 100644 (file)
@@ -3,6 +3,7 @@
 #include "test/librbd/test_fixture.h"
 #include "test/librbd/test_support.h"
 #include "librbd/AioCompletion.h"
+#include "librbd/AioImageRequest.h"
 #include "librbd/ImageWatcher.h"
 #include "librbd/internal.h"
 #include "librbd/ObjectMap.h"
@@ -254,7 +255,7 @@ TEST_F(TestInternal, AioWriteRequestsLock) {
   librbd::AioCompletion *c =
     librbd::aio_create_completion_internal(ctx, librbd::rbd_ctx_cb);
   c->get();
-  aio_write(ictx, 0, buffer.size(), buffer.c_str(), c, 0);
+  librbd::AioImageWrite(*ictx, c, 0, buffer.size(), buffer.c_str(), 0).send();
 
   bool is_owner;
   ASSERT_EQ(0, librbd::is_exclusive_lock_owner(ictx, &is_owner));
@@ -277,7 +278,7 @@ TEST_F(TestInternal, AioDiscardRequestsLock) {
   librbd::AioCompletion *c =
     librbd::aio_create_completion_internal(ctx, librbd::rbd_ctx_cb);
   c->get();
-  aio_discard(ictx, 0, 256, c);
+  librbd::AioImageDiscard(*ictx, c, 0, 256).send();
 
   bool is_owner;
   ASSERT_EQ(0, librbd::is_exclusive_lock_owner(ictx, &is_owner));