]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/system/st_rados_notify.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / test / system / st_rados_notify.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_NOTIFY_H
16 #define TEST_SYSTEM_ST_RADOS_NOTIFY_H
17
18 #include "systest_runnable.h"
19
20 class CrossProcessSem;
21
22 /*
23 * st_rados_notify
24 *
25 * 1. waits on and then posts to setup_sem
26 * 2. connects and opens the pool
27 * 3. waits on and then posts to notify_sem
28 * 4. notifies on the object
29 * 5. posts to notified_sem
30 */
31 class StRadosNotify : public SysTestRunnable
32 {
33 public:
34 StRadosNotify(int argc, const char **argv,
35 CrossProcessSem *setup_sem,
36 CrossProcessSem *notify_sem,
37 CrossProcessSem *notified_sem,
38 int notify_retcode,
39 const std::string &pool_name,
40 const std::string &obj_name);
41 ~StRadosNotify() override;
42 int run() override;
43 private:
44 CrossProcessSem *m_setup_sem;
45 CrossProcessSem *m_notify_sem;
46 CrossProcessSem *m_notified_sem;
47 int m_notify_retcode;
48 std::string m_pool_name;
49 std::string m_obj_name;
50 };
51
52 #endif