]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados_test_stub: implemented ObjectReadOperation::stat
authorJason Dillaman <dillaman@redhat.com>
Tue, 17 Nov 2015 00:00:16 +0000 (19:00 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 15 Dec 2015 01:30:50 +0000 (20:30 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librados_test_stub/LibradosTestStub.cc

index f66d274ce796552cfbec7542fc5a0eee4a973cb2..220a0ea94e11a45d288dd35086a28d5624f0ae72 100644 (file)
@@ -698,6 +698,19 @@ void ObjectReadOperation::sparse_read(uint64_t off, uint64_t len,
   o->ops.push_back(op);
 }
 
+void ObjectReadOperation::stat(uint64_t *psize, time_t *pmtime, int *prval) {
+  TestObjectOperationImpl *o = reinterpret_cast<TestObjectOperationImpl*>(impl);
+
+  ObjectOperationTestImpl op = boost::bind(&TestIoCtxImpl::stat, _1, _2,
+                                           psize, pmtime);
+
+  if (prval != NULL) {
+    op = boost::bind(save_operation_result,
+                     boost::bind(op, _1, _2, _3, _4), prval);
+  }
+  o->ops.push_back(op);
+}
+
 void ObjectWriteOperation::append(const bufferlist &bl) {
   TestObjectOperationImpl *o = reinterpret_cast<TestObjectOperationImpl*>(impl);
   o->ops.push_back(boost::bind(&TestIoCtxImpl::append, _1, _2, bl, _4));