Motr  M0
main.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-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 #include <linux/module.h>
24 #include <linux/kernel.h>
25 #include <linux/init.h>
26 
27 #include "ut/ut.h"
28 
29 /* These unit tests are done in the kernel */
30 M0_INTERNAL void test_bitmap(void);
31 M0_INTERNAL void test_bitmap_onwire(void);
32 M0_INTERNAL void test_chan(void);
33 M0_INTERNAL void test_cookie(void);
34 M0_INTERNAL void test_finject(void);
35 M0_INTERNAL void test_list(void);
36 M0_INTERNAL void test_locality(void);
37 M0_INTERNAL void test_locality_chore(void);
38 M0_INTERNAL void test_lockers(void);
39 M0_INTERNAL void test_tlist(void);
40 M0_INTERNAL void test_mutex(void);
41 M0_INTERNAL void test_queue(void);
42 M0_INTERNAL void test_refs(void);
43 M0_INTERNAL void test_rw(void);
44 M0_INTERNAL void test_thread(void);
45 M0_INTERNAL void m0_ut_time_test(void);
46 M0_INTERNAL void test_trace(void);
47 M0_INTERNAL void test_varr(void);
48 M0_INTERNAL void test_vec(void);
49 M0_INTERNAL void test_zerovec(void);
50 M0_INTERNAL void test_memory(void);
51 M0_INTERNAL void test_bob(void);
52 M0_INTERNAL void m0_ut_lib_buf_test(void);
53 M0_INTERNAL void m0_test_lib_uuid(void);
54 M0_INTERNAL void test_hashtable(void);
55 M0_INTERNAL void test_fold(void);
56 
58  .ts_name = "klibm0-ut",
59  .ts_init = NULL,
60  .ts_fini = NULL,
61  .ts_tests = {
62  { "bitmap", test_bitmap },
63  { "bitmap-onwire", test_bitmap_onwire },
64  { "memory", test_memory },
65  { "bob", test_bob },
66  { "buf", m0_ut_lib_buf_test },
67  { "chan", test_chan },
68  { "cookie", test_cookie },
69 #ifdef ENABLE_FAULT_INJECTION
70  { "finject", test_finject },
71 #endif
72  { "hash", test_hashtable },
73  { "list", test_list },
74  { "locality", test_locality, "Nikita" },
75  { "loc-chores", test_locality_chore, "Nikita" },
76  { "lockers", test_lockers },
77  { "tlist", test_tlist },
78  { "mutex", test_mutex },
79  { "queue", test_queue },
80  { "refs", test_refs },
81  { "rwlock", test_rw },
82  { "thread", test_thread },
83  { "time", m0_ut_time_test },
84  { "trace", test_trace },
85  { "uuid", m0_test_lib_uuid },
86  { "varr", test_varr },
87  { "vec", test_vec },
88  { "zerovec", test_zerovec },
89  { "fold", test_fold, "Nikita" },
90  { NULL, NULL }
91  }
92 };
93 M0_EXPORTED(m0_klibm0_ut);
94 
95 /*
96  * Local variables:
97  * c-indentation-style: "K&R"
98  * c-basic-offset: 8
99  * tab-width: 8
100  * fill-column: 80
101  * scroll-step: 1
102  * End:
103  */
#define NULL
Definition: misc.h:38
M0_INTERNAL void test_locality(void)
Definition: locality.c:204
M0_INTERNAL void test_queue(void)
Definition: queue.c:36
M0_INTERNAL void test_bitmap(void)
Definition: bitmap.c:63
M0_INTERNAL void test_bob(void)
Definition: bob.c:131
M0_INTERNAL void test_lockers(void)
Definition: lockers.c:44
M0_INTERNAL void test_bitmap_onwire(void)
Definition: bitmap.c:120
Definition: ut.h:77
M0_INTERNAL void test_finject(void)
Definition: finject.c:282
M0_INTERNAL void test_varr(void)
Definition: varr.c:146
M0_INTERNAL void test_chan(void)
Definition: chan.c:89
M0_INTERNAL void test_rw(void)
Definition: rwlock.c:263
M0_INTERNAL void test_thread(void)
Definition: thread.c:101
M0_INTERNAL void m0_ut_lib_buf_test(void)
Definition: buf.c:39
M0_INTERNAL void m0_test_lib_uuid(void)
Definition: uuid.c:74
M0_INTERNAL void m0_ut_time_test(void)
Definition: time.c:228
M0_INTERNAL void test_fold(void)
Definition: fold.c:36
M0_INTERNAL void test_tlist(void)
Definition: tlist.c:84
M0_INTERNAL void test_locality_chore(void)
Definition: locality.c:342
M0_INTERNAL void test_mutex(void)
Definition: mutex.c:68
M0_INTERNAL void test_zerovec(void)
Definition: zerovec.c:215
M0_INTERNAL void test_refs(void)
Definition: refs.c:43
M0_INTERNAL void test_vec(void)
Definition: vec.c:52
M0_INTERNAL void test_list(void)
Definition: list.c:32
M0_INTERNAL void test_cookie(void)
Definition: cookie.c:141
const char * ts_name
Definition: ut.h:99
M0_INTERNAL void test_trace(void)
Definition: trace.c:46
struct m0_ut_suite m0_klibm0_ut
Definition: main.c:57
M0_INTERNAL void test_hashtable(void)
Definition: hash.c:80
M0_INTERNAL void test_memory(void)
Definition: memory.c:33