]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_rados_api_watch_notify: s/handle/cookie/
authorSage Weil <sage@redhat.com>
Sat, 8 Nov 2014 00:04:25 +0000 (16:04 -0800)
committerSage Weil <sage@redhat.com>
Thu, 4 Dec 2014 18:32:38 +0000 (10:32 -0800)
Use consist nameing for C and C++ tests.

Signed-off-by: Sage Weil <sage@redhat.com>
src/test/librados/watch_notify.cc

index 9e6536b77988cb689348ac2b115c38360bd9104e..ca2d2adb93dfd562e0b904f9abc1b5f79d815b97 100644 (file)
@@ -45,19 +45,26 @@ int notify_err = 0;
 
 static void watch_notify2_test_cb(void *arg,
                                  uint64_t notify_id,
-                                 uint64_t handle,
+                                 uint64_t cookie,
                                  uint64_t notifier_gid,
                                  void *data,
                                  size_t data_len)
 {
   std::cout << __func__ << " from " << notifier_gid << " notify_id " << notify_id
-           << " handle " << handle << std::endl;
+           << " cookie " << cookie << std::endl;
   assert(notifier_gid > 0);
+  notify_cookies.insert(cookie);
   notify_bl.clear();
   notify_bl.append((char*)data, data_len);
   if (notify_sleep)
     sleep(notify_sleep);
-  rados_notify_ack(notify_io, notify_oid, notify_id, handle, "reply", 5);
+  rados_notify_ack(notify_io, notify_oid, notify_id, cookie, "reply", 5);
+}
+
+static void watch_notify2_test_errcb(void *arg, uint64_t cookie, int err)
+{
+  std::cout << __func__ << " cookie " << cookie << std::endl;
+  notify_err = err;
 }
 
 IoCtx *notify_ioctx;