]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/system/st_rados_watch.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / test / system / st_rados_watch.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2011 New Dream Network
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15 #ifndef TEST_SYSTEM_ST_RADOS_WATCH_H
16 #define TEST_SYSTEM_ST_RADOS_WATCH_H
17
18 #include "systest_runnable.h"
19
20 class CrossProcessSem;
21
22 /*
23 * st_rados_watch
24 *
25 * 1. waits on setup_sem
26 * 2. posts to setup_sem
27 * 3. watches an object
28 * 4. posts to watch_sem
29 * 5. waits on notify_sem
30 * 6. posts to notify_sem
31 * 7. checks that the correct number of notifies were received
32 */
33 class StRadosWatch : public SysTestRunnable
34 {
35 public:
36 StRadosWatch(int argc, const char **argv,
37 CrossProcessSem *setup_sem,
38 CrossProcessSem *watch_sem,
39 CrossProcessSem *notify_sem,
40 int num_notifies,
41 int watch_retcode,
42 const std::string &pool_name,
43 const std::string &obj_name);
44 ~StRadosWatch() override;
45 int run() override;
46 private:
47 CrossProcessSem *m_setup_sem;
48 CrossProcessSem *m_watch_sem;
49 CrossProcessSem *m_notify_sem;
50 int m_num_notifies;
51 int m_watch_retcode;
52 std::string m_pool_name;
53 std::string m_obj_name;
54 };
55
56 #endif