Motr
M0
module.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014-2020 Seagate Technology LLC and/or its Affiliates
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
* For any questions about this software or licensing,
17
* please email opensource@seagate.com or cortx-questions@seagate.com.
18
*
19
*/
20
21
#pragma once
22
#ifndef __MOTR_UT_MODULE_H__
23
#define __MOTR_UT_MODULE_H__
24
25
#include "
module/module.h
"
26
#include "
lib/atomic.h
"
/* m0_atomic64 */
27
35
struct
m0_ut_moddep
{
36
struct
m0_module
*
ud_module
;
/* XXX FIXME: Use enum m0_module_id. */
37
int
ud_level
;
38
};
39
40
enum
{
M0_UT_SUITES_MAX
= 1024 };
41
42
struct
m0_ut_module
{
43
struct
m0_module
ut_module
;
50
const
char
*
ut_tests
;
55
bool
ut_exclude
;
57
const
char
*
ut_sandbox
;
59
bool
ut_keep_sandbox
;
60
bool
ut_small_credits
;
61
struct
m0_ut_suite
*
ut_suites
[
M0_UT_SUITES_MAX
];
62
unsigned
ut_suites_nr
;
63
struct
m0_atomic64
ut_asserts
;
64
};
65
67
enum
{
69
M0_LEVEL_UT_PREPARE
,
74
M0_LEVEL_UT_KLUDGE
,
76
M0_LEVEL_UT_READY
77
};
78
80
enum
{
M0_LEVEL_UT_SUITE_READY
};
81
82
/*
83
* m0_ut_suite m0_ut_module
84
* +-------------------------+ * 1 +---------------------+
85
* [<-----]| M0_LEVEL_UT_SUITE_READY |<-----| M0_LEVEL_UT_READY |
86
* +-------------------------+ +---------------------+
87
* | M0_LEVEL_UT_PREPARE |
88
* +---------------------+
89
*/
90
/* XXX DELETEME */
91
M0_INTERNAL
void
m0_ut_suite_module_setup
(
struct
m0_ut_suite
*ts,
92
struct
m0
*
instance
);
93
94
/*
95
* m0_ut_module m0
96
* +---------------------+ +--------------------------+
97
* | M0_LEVEL_UT_READY |<-----| M0_LEVEL_INST_READY |
98
* +---------------------+ +--------------------------+
99
* | M0_LEVEL_UT_KLUDGE | ,--| M0_LEVEL_INST_SUBSYSTEMS |
100
* +---------------------+ | +--------------------------+
101
* | M0_LEVEL_UT_PREPARE |<--' | M0_LEVEL_INST_ONCE |
102
* +---------------------+ +--------------------------+
103
* | M0_LEVEL_INST_PREPARE |
104
* +--------------------------+
105
*/
106
extern
const
struct
m0_module_type
m0_ut_module_type
;
107
109
#endif
/* __MOTR_UT_MODULE_H__ */
m0_ut_module::ut_tests
const char * ut_tests
Definition:
module.h:50
m0_module_type
Definition:
module.h:184
m0_ut_module::ut_suites_nr
unsigned ut_suites_nr
Definition:
module.h:62
m0_ut_module::ut_sandbox
const char * ut_sandbox
Definition:
module.h:57
m0_ut_module::ut_suites
struct m0_ut_suite * ut_suites[M0_UT_SUITES_MAX]
Definition:
module.h:61
M0_LEVEL_UT_SUITE_READY
Definition:
module.h:80
m0_ut_module::ut_small_credits
bool ut_small_credits
Definition:
module.h:60
m0_ut_module::ut_module
struct m0_module ut_module
Definition:
module.h:43
m0_ut_suite
Definition:
ut.h:77
module.h
m0_module
Definition:
module.h:151
m0_ut_module::ut_exclude
bool ut_exclude
Definition:
module.h:55
m0_ut_moddep
Definition:
module.h:35
m0_ut_module::ut_keep_sandbox
bool ut_keep_sandbox
Definition:
module.h:59
m0
Definition:
instance.h:80
M0_LEVEL_UT_PREPARE
Definition:
module.h:69
m0_ut_moddep::ud_module
struct m0_module * ud_module
Definition:
module.h:36
m0_ut_module_type
const struct m0_module_type m0_ut_module_type
Definition:
module.c:37
atomic.h
m0_ut_moddep::ud_level
int ud_level
Definition:
module.h:37
M0_UT_SUITES_MAX
Definition:
module.h:40
M0_LEVEL_UT_KLUDGE
Definition:
module.h:74
instance
static struct m0 instance
Definition:
main.c:78
m0_ut_module
Definition:
module.h:42
m0_ut_suite_module_setup
M0_INTERNAL void m0_ut_suite_module_setup(struct m0_ut_suite *ts, struct m0 *instance)
Definition:
module.c:90
m0_atomic64
Definition:
atomic64.h:37
M0_LEVEL_UT_READY
Definition:
module.h:76
m0_ut_module::ut_asserts
struct m0_atomic64 ut_asserts
Definition:
module.h:63
ut
module.h
Generated on Thu Apr 14 2022 14:02:54 for Motr by
1.8.14