summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@inktank.com>2012-12-11 12:26:21 -0800
committerJosh Durgin <josh.durgin@inktank.com>2012-12-11 15:44:32 -0800
commit39501822680633b2921925addb24d2498690c781 (patch)
tree9f8d1510855849340de078a6a89792e3fc1e006e
parentc3107009f66bc06b5e14c465142e14120f9a4412 (diff)
downloadceph-39501822680633b2921925addb24d2498690c781.tar.gz
st_rados_watch: tolerate extra notifies
With retries, it's possible for notifies to be received more than once when they are resent to different OSDs, since the OSDs only track them in memory. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r--src/test/system/st_rados_watch.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/system/st_rados_watch.cc b/src/test/system/st_rados_watch.cc
index d6647ded8dc..991dde8ea77 100644
--- a/src/test/system/st_rados_watch.cc
+++ b/src/test/system/st_rados_watch.cc
@@ -73,10 +73,16 @@ run()
m_notify_sem->wait();
m_notify_sem->post();
- RETURN1_IF_NOT_VAL(m_num_notifies, num_notifies);
+ int r = 0;
+ if (num_notifies < m_num_notifies) {
+ printf("Received fewer notifies than expected: %d < %d\n",
+ num_notifies, m_num_notifies);
+ r = 1;
+ }
+
rados_unwatch(io_ctx, m_obj_name.c_str(), handle);
rados_ioctx_destroy(io_ctx);
rados_shutdown(cl);
- return 0;
+ return r;
}