31 #include "reqh/ut/service_xc.h" 40 #define DUMMY_DBNAME "dummy-db" 41 #define DUMMY_COB_ID 20 42 #define DUMMY_SERVER_ADDR "0@lo:12345:34:10" 53 m0_xc_reqh_ut_service_init();
56 .
name =
"Reqh unit test",
58 .
xt = m0_reqhut_dummy_xc,
69 m0_xc_reqh_ut_service_fini();
struct m0_reqh_service * reqh_svc
M0_INTERNAL int m0_reqh_service_start(struct m0_reqh_service *service)
M0_INTERNAL void m0_ut_rpc_mach_init_and_add(struct m0_ut_rpc_mach_ctx *ctx)
static void test_service(void)
static struct m0_semaphore sem
#define M0_FOP_TYPE_INIT(ft,...)
M0_INTERNAL int m0_reqh_fop_handle(struct m0_reqh *reqh, struct m0_fop *fop)
static int m0_reqhut_fop_init(void)
struct m0_rpc_machine rmc_rpc
struct m0_reqh_service_type ds1_service_type
struct m0_cob_domain_id rmc_cob_id
void m0_fop_type_fini(struct m0_fop_type *fopt)
static struct m0_fop_type m0_reqhut_dummy_fopt
static struct m0_ut_rpc_mach_ctx rmach_ctx
static struct m0_xcode_type ** xt[]
const struct m0_sm_conf m0_generic_conf
M0_INTERNAL struct m0_reqh_service_type * m0_reqh_service_type_find(const char *sname)
struct m0_ut_suite reqh_service_ut
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
M0_INTERNAL int m0_reqh_service_allocate(struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
M0_INTERNAL void m0_reqh_service_init(struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
M0_INTERNAL void m0_reqh_idle_wait(struct m0_reqh *reqh)
#define DUMMY_SERVER_ADDR
static const struct m0_fom_type_ops reqhut_fom_type_ops
M0_INTERNAL void m0_ut_rpc_mach_fini(struct m0_ut_rpc_mach_ctx *ctx)
void m0_fop_put_lock(struct m0_fop *fop)
static struct m0_fop * fop
static void m0_reqhut_fop_fini(void)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
struct m0_fop * m0_fop_alloc(struct m0_fop_type *fopt, void *data, struct m0_rpc_machine *mach)