Motr  M0
fol_ut.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2017-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_FDMI
24 #include "lib/trace.h"
25 
26 #include "lib/misc.h" /* m0_rnd64 */
27 #include "ut/ut.h"
28 #include "fop/fom_generic.h"
29 #include "fdmi/fdmi.h"
30 #include "fdmi/fops.h" /* m0_fop_fdmi_rec_not_fopt */
31 #include "fdmi/source_dock.h"
33 #include "fdmi/fol_fdmi_src.h"
34 #include "rpc/rpc_opcodes.h" /* M0_FDMI_RECORD_NOT_OPCODE */
35 #include "lib/finject.h"
36 
37 #include "fdmi/source_dock_internal.h" /* m0_fdmi__src_ctx_get */
38 
39 #include "fdmi/ut/sd_common.h"
40 
41 /* ------------------------------------------------------------------
42  * Test to make sure we've registered OK
43  * ------------------------------------------------------------------ */
44 
45 static void fdmi_fol_check_registered(void)
46 {
47  struct m0_fdmi_src_dock *dock;
48  struct m0_fdmi_src_ctx *src;
49 
50  M0_ENTRY();
51 
57  dock = m0_fdmi_src_dock_get();
58  M0_UT_ASSERT(dock != NULL);
60  M0_UT_ASSERT(src != NULL);
61 
62  M0_LEAVE();
63 }
64 
65 /* ------------------------------------------------------------------
66  * Test FOL source operations
67  * ------------------------------------------------------------------ */
68 
72 };
73 
74 /* Dummy State machine. */
75 
76 enum {
80 };
81 
83  [FFS_UT_FOM_INIT] = {
85  .sd_name = "init",
86  .sd_allowed = M0_BITS(FFS_UT_FOM_READY)
87  },
88  [FFS_UT_FOM_READY] = {
89  .sd_name = "ready",
90  .sd_allowed = M0_BITS(FFS_UT_FOM_FINISH)
91  },
92  [FFS_UT_FOM_FINISH] = {
93  .sd_flags = M0_SDF_TERMINAL,
94  .sd_name = "SM finish",
95  }
96 };
97 
99  { "Start", FFS_UT_FOM_INIT, FFS_UT_FOM_READY },
100  { "Finish", FFS_UT_FOM_READY, FFS_UT_FOM_FINISH },
101 };
102 
103 /* Test details machine. */
104 
105 static bool dummy_post_called = false;
107 
108 static void dummy_fdmi_post_record(struct m0_fdmi_src_rec *src_rec)
109 {
110  M0_ENTRY();
111 
112  /* Make sure this func is only called ONCE. */
114  dummy_post_called = true;
115 
116  M0_UT_ASSERT(src_rec->fsr_data == NULL);
117  dummy_rec_pointer = src_rec;
118 
119  M0_LEAVE();
120 }
121 
122 static void dummy_fol_rec_assert_eq(const struct m0_fol_rec *rec1,
123  const struct m0_fol_rec *rec2)
124 {
125  struct m0_fol_frag *frag1;
126  struct m0_fol_frag *frag2;
127 
128  M0_ASSERT(rec1 != NULL && rec2 != NULL);
129  M0_ENTRY("rec1 0x%p, rec2 0x%p", rec1, rec2);
130 
131  M0_UT_ASSERT(rec1->fr_tid == rec2->fr_tid);
132 
133  frag1 = m0_rec_frag_tlist_head(&rec1->fr_frags);
134  frag2 = m0_rec_frag_tlist_head(&rec2->fr_frags);
135 
136  do {
137  M0_UT_ASSERT((frag1 == NULL) == (frag2 == NULL));
138  M0_UT_ASSERT(frag1->rp_ops == frag2->rp_ops);
139  M0_UT_ASSERT(frag1->rp_magic == frag2->rp_magic);
140 
141  frag1 = m0_rec_frag_tlist_next(&rec1->fr_frags, frag1);
142  frag2 = m0_rec_frag_tlist_next(&rec2->fr_frags, frag2);
143  } while (frag1 != NULL || frag2 != NULL);
144 
145  M0_LEAVE();
146 }
147 
148 static void fdmi_fol_test_ops(enum ffs_ut_test_op test_op)
149 {
150  /* fdmi/ffs structures */
151  struct m0_fdmi_src_dock *dock;
152  struct m0_fdmi_src_ctx *src_ctx;
153  struct m0_fdmi_src *src_reg;
154 
155  /* system structures (be) */
156  struct m0_fom fom = {};
157  struct m0_be_tx *betx = &fom.fo_tx.tx_betx;
158  struct m0_fol_rec *fol_rec = &fom.fo_tx.tx_fol_rec;
159  struct m0_be_ut_backend ut_be = {};
160  struct m0_sm_group *grp = NULL;
161  struct m0_fop *fop = NULL;
162  struct m0_fop_fdmi_record *fop_data = NULL;
163 
164  /* temp vars */
165  struct m0_buf buf = {};
166  struct m0_fol_rec *fol_rec_cpy = NULL;
167  struct m0_fdmi_flt_var_node var_node = {};
168  struct m0_fdmi_flt_operand flt_operand = {};
169  struct m0_fdmi_src_rec *src_rec =
170  &fom.fo_tx.tx_fol_rec.fr_fdmi_rec;
171  void (*saved_fs_record_post)(struct m0_fdmi_src_rec *src_rec);
172 
173  int rc;
174 
175 
176  struct m0_sm_conf ffs_ut_sm_conf = {
177  .scf_name = "fol src dummy fom phases",
178  .scf_nr_states = ARRAY_SIZE(ffs_ut_fom_phases),
179  .scf_state = ffs_ut_fom_phases,
180  .scf_trans_nr = ARRAY_SIZE(ffs_ut_fom_trans),
181  .scf_trans = ffs_ut_fom_trans
182  };
183 
184  M0_ENTRY();
185 
186  /* get ops */
187  dock = m0_fdmi_src_dock_get();
188  M0_UT_ASSERT(dock != NULL);
189  dock->fsdc_started = true;
190  dock->fsdc_filters_defined = true;
192  M0_UT_ASSERT(src_ctx != NULL);
193  src_reg = &src_ctx->fsc_src;
194 
195  /* create system structures */
198 
199  /* TXN ini */
200  m0_be_ut_tx_init(betx, &ut_be);
201  M0_UT_ASSERT(betx->t_ref == 1);
202  m0_sm_conf_init(&ffs_ut_sm_conf);
203  m0_sm_init(&betx->t_sm, &ffs_ut_sm_conf, FFS_UT_FOM_INIT, grp);
204  /*
205  * XXX
206  * This UT has many flaws and it makes a lot of assumption about what is
207  * initialised in BE tx and what is not. It must be rewritten in a way
208  * that properly initialises foms and BE transactions and moves them
209  * from state to state using interfaces and not just "m0_sm_init() to
210  * make invariant pass, so this 'test' could 'test' something".
211  *
212  * The following assignment is added just because another invariant was
213  * added and this UT failed, because the UT doesn't use interfaces from
214  * be/tx.h for BE transaction in the way it should.
215  *
216  * This code could be used as an example of how to not to write tests.
217  */
218  betx->t_sm.sm_state = M0_BTS_LOGGED;
219  m0_fol_rec_init(fol_rec, NULL);
220 
221  /* FOM ini */
223  src_rec->fsr_src_ctx = src_ctx;
224 
225  /* FOP ini */
227  fop_data = m0_fop_data(fop);
228  fop_data->fr_rec_id = M0_UINT128(1,1);
229  fop_data->fr_rec_type = 1000;
230  fop_data->fr_payload = M0_BUF_INIT0;
231  fop_data->fr_matched_flts.fmf_count = 0;
232  fop_data->fr_matched_flts.fmf_flt_id = NULL;
233  rc = m0_fop_fol_add(fop, fop, &fom.fo_tx);
234 
235  /* inject our own post-record method */
236  saved_fs_record_post = src_reg->fs_record_post;
238 
239  /* start ops */
240  dummy_post_called = false;
242  switch (test_op) {
243 
245  /* post record */
249  M0_UT_ASSERT(betx->t_ref == 1);
250  /* processing start */
251  src_reg->fs_begin(dummy_rec_pointer);
252  /* get value */
253  src_reg->fs_node_eval(dummy_rec_pointer, &var_node,
254  &flt_operand);
255  M0_UT_ASSERT(flt_operand.ffo_type == M0_FF_OPND_PLD_UINT);
256  M0_UT_ASSERT(flt_operand.ffo_data.fpl_pld.fpl_uinteger ==
258  /* inc ref */
259  src_reg->fs_get(dummy_rec_pointer);
260  /* encode failure #1 */
261  m0_fi_enable("m0_alloc", "fail_allocation");
262  rc = src_reg->fs_encode(dummy_rec_pointer, &buf);
263  m0_fi_disable("m0_alloc", "fail_allocation");
264  M0_UT_ASSERT(rc == -ENOMEM);
265  M0_UT_ASSERT(buf.b_addr == NULL && buf.b_nob == 0);
266  /* encode failure #2 */
267  m0_fi_enable("ffs_op_encode", "fail_in_final");
268  rc = src_reg->fs_encode(dummy_rec_pointer, &buf);
269  m0_fi_disable("ffs_op_encode", "fail_in_final");
270  M0_UT_ASSERT(rc == -EINVAL);
271  M0_UT_ASSERT(buf.b_addr == NULL && buf.b_nob == 0);
272  /* encode */
273  rc = src_reg->fs_encode(dummy_rec_pointer, &buf);
274  M0_UT_ASSERT(rc >= 0);
275  M0_UT_ASSERT(buf.b_nob > 0 && buf.b_addr != NULL);
276  /* decode failure #1 */
277  m0_fi_enable("m0_alloc", "fail_allocation");
278  rc = src_reg->fs_decode(&buf, (void**)&fol_rec_cpy);
279  m0_fi_disable("m0_alloc", "fail_allocation");
280  M0_UT_ASSERT(rc == -ENOMEM);
281  M0_UT_ASSERT(fol_rec_cpy == NULL);
282  /* decode failure #2 */
283  m0_fi_enable("ffs_op_decode", "fail_in_final");
284  rc = src_reg->fs_decode(&buf, (void**)&fol_rec_cpy);
285  m0_fi_disable("ffs_op_decode", "fail_in_final");
286  M0_UT_ASSERT(rc == -EINVAL);
287  M0_UT_ASSERT(fol_rec_cpy == NULL);
288  /* decode */
289  fol_rec_cpy = NULL;
290  rc = src_reg->fs_decode(&buf, (void**)&fol_rec_cpy);
291  M0_UT_ASSERT(rc >= 0);
292  M0_UT_ASSERT(fol_rec_cpy != NULL);
293  dummy_fol_rec_assert_eq(fol_rec, fol_rec_cpy);
294  /* dec ref */
295  src_reg->fs_put(dummy_rec_pointer);
296  /* finalize processing */
298  M0_UT_ASSERT(betx->t_ref == 1);
299  src_reg->fs_end(dummy_rec_pointer);
300 
301  /* Run asts directly, so posted AST is invoked to
302  * decrement betx->t_ref. Maybe better way to run
303  * ASTs exist */
305 
306  /* reset record_post back to orig value */
307  src_reg->fs_record_post = saved_fs_record_post;
308 
309  break;
314  M0_UT_ASSERT(betx->t_ref == 1);
315 
317 
318  /* Run asts directly, so posted AST is invoked to
319  * decrement betx->t_ref. Maybe better way to run
320  * ASTs exist */
322  M0_UT_ASSERT(betx->t_ref == 1);
323 
324  /* We have to call this init manually, turns out UT framework
325  * does not re-initialize everything before a test suite... :( */
327  M0_UT_ASSERT(rc == 0);
328 
329  /* reset record_post back to orig value is not here because
330  * m0_fol_fdmi_src_init() does it. */
331  break;
332  default:
333  M0_UT_ASSERT(false);
334  }
335 
336  /* Temp vals fini */
337  if (buf.b_addr != NULL)
338  m0_buf_free(&buf);
339  if (fol_rec_cpy != NULL) {
340  m0_fol_rec_fini(fol_rec_cpy);
341  m0_free0(&fol_rec_cpy);
342  }
343 
344  /* FOP fini */
345  m0_fop_fini(fop);
346  m0_free0(&fop);
347 
348  /* transaction fini */
349  m0_fol_rec_fini(fol_rec);
350  betx->t_ref = 0;
351  betx->t_sm.sm_state = M0_BTS_FAILED;
352  m0_be_tx_fini(betx);
353 
354  /* system fini */
356 
357  dock->fsdc_started = false;
358  dock->fsdc_filters_defined = false;
359 
360  M0_LEAVE();
361 }
362 
363 static void fdmi_fol_test_basic_ops(void)
364 {
365  M0_ENTRY();
367  M0_LEAVE();
368 }
369 
370 static void fdmi_fol_test_sudden_fini(void)
371 {
372  M0_ENTRY();
374  M0_LEAVE();
375 }
376 
377 enum {
381 };
382 
384  const char **substrings,
385  bool expected)
386 {
387  bool result = m0_fol_fdmi__filter_kv_substring_match(value, substrings);
388  M0_UT_ASSERT(result == expected);
389 }
390 
392 {
393  size_t i;
394  struct {
395  char *value_s;
396  bool expected;
397  const char *substrings[0x10];
398  } tests[] = {
399  {"value", true, {NULL}},
400  {"value", true, {"value", NULL}},
401  {"value", true, {"valu", NULL}},
402  {"value", false, {"value1", NULL}},
403  {"value", false, {"valu1", NULL}},
404  {"value", true, {"v", "a", "l", "u", "e", NULL}},
405  {"value", false, {"value", "value1", NULL}},
406  {"value", true, {"value", "value", NULL}},
407  {"value", true, {"lue", NULL}},
408  {"value", true, {"lu", NULL}},
409  {"987 value 123", true, {"value", NULL}},
410  {"987 value 123", true, {"value ", NULL}},
411  {"987 value 123", true, {"987 ", " 123", NULL}},
412  {"987 value 123", false, {"987 123", "value", NULL}},
413  {"987 value 123", false, {"value", "987 123", NULL}},
414  {"", true, {NULL}},
415  {"", true, {"", NULL}},
416  {"", false, {"a", NULL}},
417  };
418  for (i = 0; i < ARRAY_SIZE(tests); ++i) {
420  &M0_BUF_INITS(tests[i].value_s), tests[i].substrings,
421  tests[i].expected);
422  }
423 }
424 
426 {
427  struct m0_buf value = {};
428  m0_bcount_t j;
429  uint64_t seed = 1;
430  char **substrings;
431  int rc;
432  int i;
433 
435  M0_UT_ASSERT(rc == 0);
436  for (j = 0; j < value.b_nob; ++j)
437  ((char *)value.b_addr)[j] = m0_rnd64(&seed) % CHAR_MAX;
439  M0_UT_ASSERT(substrings != NULL);
441  substrings[i] =
443  M0_UT_ASSERT(substrings[i] != NULL);
444  for (j = 0; j < FDMI_FOL_TEST_KV_SUBSTRING_FILTER_STR_SIZE; ++j)
445  substrings[i][j] = m0_rnd64(&seed) % (CHAR_MAX - 1) + 1;
446  }
448  &value, (const char **)substrings, false);
449 
451  m0_free(substrings[i]);
452  }
453  m0_free(substrings);
454  m0_buf_free(&value);
455 }
456 
457 /* ------------------------------------------------------------------
458  * Test Suite definition
459  * ------------------------------------------------------------------ */
460 
462  .ts_name = "fdmi-fol-ut",
463  .ts_tests = {
464  { "fdmi-fol-register", fdmi_fol_check_registered},
465  { "fdmi-fol-ops", fdmi_fol_test_basic_ops},
466  { "fdmi-filter-kv-substring",
468  { "fdmi-filter-kv-substring-random",
470  { NULL, NULL },
471  },
472 };
473 
475  .ts_name = "fdmi-fol-fini-ut",
476  .ts_tests = {
477  { "fdmi-fol-fini", fdmi_fol_test_sudden_fini},
478  { NULL, NULL },
479  },
480 };
481 
482 #undef M0_TRACE_SUBSYSTEM
483 
484 /*
485  * Local variables:
486  * c-indentation-style: "K&R"
487  * c-basic-offset: 8
488  * tab-width: 8
489  * fill-column: 80
490  * scroll-step: 1
491  * End:
492  */
493 /*
494  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
495  */
M0_INTERNAL void m0_sm_conf_init(struct m0_sm_conf *conf)
Definition: sm.c:340
#define M0_ALLOC_ARR(arr, nr)
Definition: memory.h:84
struct m0_fdmi_flt_id_arr fr_matched_flts
Definition: fops.h:78
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_fol_rec_fini(struct m0_fol_rec *rec)
Definition: fol.c:104
const struct m0_fol_frag_ops * rp_ops
Definition: fol.h:244
static void fdmi_fol_test_basic_ops(void)
Definition: fol_ut.c:363
Definition: sm.h:350
uint64_t fsr_magic
Definition: src_rec.h:67
void(* fs_get)(struct m0_fdmi_src_rec *src_rec)
Definition: source_dock.h:66
static struct m0_sm_group * grp
Definition: bytecount.c:38
M0_LEAVE()
static void fdmi_fol_test_filter_kv_substring_random(void)
Definition: fol_ut.c:425
M0_INTERNAL void m0_be_tx_fini(struct m0_be_tx *tx)
Definition: stubs.c:163
static struct m0_fdmi_src_rec * dummy_rec_pointer
Definition: fol_ut.c:106
static char * tests
Definition: st_kmain.c:52
static void fdmi_fol_test_filter_kv_substring(void)
Definition: fol_ut.c:391
M0_INTERNAL int m0_fol_fdmi_src_init(void)
Definition: fol_fdmi_src.c:551
static void dummy_fol_rec_assert_eq(const struct m0_fol_rec *rec1, const struct m0_fol_rec *rec2)
Definition: fol_ut.c:122
struct m0_fdmi_flt_opnd_pld ffo_data
Definition: filter.h:177
int(* fs_node_eval)(struct m0_fdmi_src_rec *src_rec, struct m0_fdmi_flt_var_node *value_desc, struct m0_fdmi_flt_operand *value)
Definition: source_dock.h:62
int const char const void * value
Definition: dir.c:325
struct m0_tl fr_frags
Definition: fol.h:201
static void fdmi_fol_test_sudden_fini(void)
Definition: fol_ut.c:370
void * m0_fop_data(const struct m0_fop *fop)
Definition: fop.c:220
uint32_t ffo_type
Definition: filter.h:175
#define M0_BITS(...)
Definition: misc.h:236
uint64_t m0_bcount_t
Definition: types.h:77
Definition: ut.h:77
void(* fs_put)(struct m0_fdmi_src_rec *src_rec)
Definition: source_dock.h:68
Definition: sock.c:887
int(* fs_decode)(struct m0_buf *buf, void **handle)
Definition: source_dock.h:92
#define M0_ENTRY(...)
Definition: trace.h:170
Definition: buf.h:37
int(* fs_encode)(struct m0_fdmi_src_rec *src_rec, struct m0_buf *buf)
Definition: source_dock.h:82
static int expected
Definition: locality.c:102
ffs_ut_test_op
Definition: fol_ut.c:69
struct m0_buf fr_payload
Definition: fops.h:75
M0_INTERNAL void m0_fol_rec_init(struct m0_fol_rec *rec, struct m0_fol *fol)
Definition: fol.c:98
int i
Definition: dir.c:1033
union m0_fdmi_flt_opnd_pld::@169 fpl_pld
struct m0_be_ut_backend ut_be
Definition: ad.c:72
M0_INTERNAL int m0_fop_fol_add(struct m0_fop *fop, struct m0_fop *rep, struct m0_dtx *dtx)
Definition: fop.c:427
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
Definition: finject.c:485
static struct m0_sm_state_descr ffs_ut_fom_phases[]
Definition: fol_ut.c:82
static void m0_fi_enable(const char *func, const char *tag)
Definition: finject.h:276
static bool dummy_post_called
Definition: fol_ut.c:105
#define m0_free0(pptr)
Definition: memory.h:77
#define M0_ASSERT(cond)
const char * scf_name
Definition: sm.h:352
static void fdmi_fol_check_registered(void)
Definition: fol_ut.c:45
uint64_t fr_tid
Definition: fol.h:191
void * fsr_data
Definition: src_rec.h:75
M0_INTERNAL struct m0_fdmi_src_dock * m0_fdmi_src_dock_get(void)
Definition: fdmi.c:890
#define M0_BUF_INIT0
Definition: buf.h:71
void m0_be_ut_backend_init(struct m0_be_ut_backend *ut_be)
Definition: stubs.c:238
M0_INTERNAL void m0_fol_fdmi_src_fini(void)
Definition: fol_fdmi_src.c:594
M0_INTERNAL int m0_buf_alloc(struct m0_buf *buf, size_t size)
Definition: buf.c:43
void * m0_alloc(size_t size)
Definition: memory.c:126
uint32_t fr_rec_type
Definition: fops.h:72
M0_INTERNAL void m0_fol_fdmi_post_record(struct m0_fom *fom)
Definition: fol_fdmi_src.c:646
#define M0_BUF_INITS(str)
Definition: buf.h:70
static void fdmi_fol_test_filter_kv_substring_match(struct m0_buf *value, const char **substrings, bool expected)
Definition: fol_ut.c:383
struct m0_sm_group * m0_be_ut_backend_sm_group_lookup(struct m0_be_ut_backend *ut_be)
Definition: stubs.c:277
Definition: dump.c:103
struct m0_ut_suite fdmi_fol_fini_ut
Definition: fol_ut.c:474
M0_INTERNAL void m0_buf_free(struct m0_buf *buf)
Definition: buf.c:55
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
Definition: fop.c:136
uint32_t t_ref
Definition: tx.h:374
struct m0_sm t_sm
Definition: tx.h:281
static void fdmi_fol_test_ops(enum ffs_ut_test_op test_op)
Definition: fol_ut.c:148
M0_INTERNAL bool m0_fol_fdmi__filter_kv_substring_match(struct m0_buf *value, const char **substrings)
Definition: fol_fdmi_src.c:710
uint32_t sd_flags
Definition: sm.h:378
Definition: fom.h:481
struct m0_fop_type m0_fop_fdmi_rec_not_fopt
Definition: fops.c:47
const char * ts_name
Definition: ut.h:99
M0_INTERNAL uint64_t m0_rnd64(uint64_t *seed)
Definition: misc.c:100
M0_INTERNAL void m0_sm_init(struct m0_sm *mach, const struct m0_sm_conf *conf, uint32_t state, struct m0_sm_group *grp)
Definition: sm.c:313
static void dummy_fdmi_post_record(struct m0_fdmi_src_rec *src_rec)
Definition: fol_ut.c:108
uint32_t fmf_count
Definition: fops.h:58
void m0_be_ut_tx_init(struct m0_be_tx *tx, struct m0_be_ut_backend *ut_be)
Definition: stubs.c:286
struct m0_fdmi_src_ctx * fsr_src_ctx
Definition: src_rec.h:98
void(* fs_begin)(struct m0_fdmi_src_rec *src_rec)
Definition: source_dock.h:70
static struct m0_fop * fop
Definition: item.c:57
void m0_be_ut_backend_fini(struct m0_be_ut_backend *ut_be)
Definition: stubs.c:242
struct m0_fid * fmf_flt_id
Definition: fops.h:61
struct m0_fdmi_src fsc_src
struct m0_uint128 fr_rec_id
Definition: fops.h:69
#define M0_UINT128(hi, lo)
Definition: types.h:40
static struct m0_sm_trans_descr ffs_ut_fom_trans[]
Definition: fol_ut.c:98
struct m0_ut_suite fdmi_fol_ut
Definition: fol_ut.c:461
uint64_t rp_magic
Definition: fol.h:253
void(* fs_record_post)(struct m0_fdmi_src_rec *src_rec)
Definition: source_dock.h:54
M0_INTERNAL struct m0_fdmi_src_ctx * m0_fdmi__src_ctx_get(enum m0_fdmi_rec_type_id src_type_id)
Definition: source_dock.c:374
M0_INTERNAL void m0_sm_asts_run(struct m0_sm_group *grp)
Definition: sm.c:150
void(* fs_end)(struct m0_fdmi_src_rec *src_rec)
Definition: source_dock.h:72
void m0_free(void *data)
Definition: memory.c:146
uint32_t sm_state
Definition: sm.h:307
struct m0_pdclust_src_addr src
Definition: fd.c:108
int32_t rc
Definition: trigger_fop.h:47
#define ARRAY_SIZE(a)
Definition: misc.h:45
#define M0_UT_ASSERT(a)
Definition: ut.h:46
Definition: fop.h:79
Definition: tx.h:280
struct m0_fop * m0_fop_alloc(struct m0_fop_type *fopt, void *data, struct m0_rpc_machine *mach)
Definition: fop.c:96