1 /*
2  * Copyright 2011 Tresys Technology, LLC. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  *    1. Redistributions of source code must retain the above copyright notice,
8  *       this list of conditions and the following disclaimer.
9  *
10  *    2. Redistributions in binary form must reproduce the above copyright notice,
11  *       this list of conditions and the following disclaimer in the documentation
12  *       and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY TRESYS TECHNOLOGY, LLC ``AS IS'' AND ANY EXPRESS
15  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17  * EVENT SHALL TRESYS TECHNOLOGY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  *
25  * The views and conclusions contained in the software and documentation are those
26  * of the authors and should not be interpreted as representing official policies,
27  * either expressed or implied, of Tresys Technology, LLC.
28  */
29 
30 #ifndef TEST_CIL_COPY_AST_H_
31 #define TEST_CIL_COPY_AST_H_
32 
33 #include "CuTest.h"
34 
35 void test_cil_copy_list(CuTest *);
36 void test_cil_copy_list_sublist(CuTest *);
37 void test_cil_copy_list_sublist_extra(CuTest *);
38 void test_cil_copy_list_orignull_neg(CuTest *);
39 
40 void test_cil_copy_block(CuTest *);
41 void test_cil_copy_node_helper_block(CuTest *tc);
42 void test_cil_copy_node_helper_block_merge(CuTest *tc);
43 
44 void test_cil_copy_perm(CuTest *);
45 void test_cil_copy_node_helper_perm(CuTest *tc);
46 void test_cil_copy_node_helper_perm_neg(CuTest *tc);
47 
48 void test_cil_copy_class(CuTest *);
49 void test_cil_copy_node_helper_class(CuTest *tc);
50 void test_cil_copy_node_helper_class_dup_neg(CuTest *tc);
51 
52 void test_cil_copy_common(CuTest *);
53 void test_cil_copy_node_helper_common(CuTest *tc);
54 void test_cil_copy_node_helper_common_dup_neg(CuTest *tc);
55 
56 void test_cil_copy_classcommon(CuTest *);
57 void test_cil_copy_node_helper_classcommon(CuTest *tc);
58 
59 void test_cil_copy_sid(CuTest *);
60 void test_cil_copy_node_helper_sid(CuTest *tc);
61 void test_cil_copy_node_helper_sid_merge(CuTest *tc);
62 
63 void test_cil_copy_sidcontext(CuTest *);
64 void test_cil_copy_node_helper_sidcontext(CuTest *tc);
65 
66 void test_cil_copy_user(CuTest *);
67 void test_cil_copy_node_helper_user(CuTest *tc);
68 void test_cil_copy_node_helper_user_merge(CuTest *tc);
69 
70 void test_cil_copy_role(CuTest *);
71 void test_cil_copy_node_helper_role(CuTest *tc);
72 void test_cil_copy_node_helper_role_merge(CuTest *tc);
73 
74 void test_cil_copy_userrole(CuTest *);
75 void test_cil_copy_node_helper_userrole(CuTest *tc);
76 
77 void test_cil_copy_type(CuTest *);
78 void test_cil_copy_node_helper_type(CuTest *tc);
79 void test_cil_copy_node_helper_type_merge(CuTest *tc);
80 
81 void test_cil_copy_typeattribute(CuTest *);
82 void test_cil_copy_node_helper_typeattribute(CuTest *tc);
83 void test_cil_copy_node_helper_typeattribute_merge(CuTest *tc);
84 
85 void test_cil_copy_typealias(CuTest *);
86 void test_cil_copy_node_helper_typealias(CuTest *tc);
87 void test_cil_copy_node_helper_typealias_dup_neg(CuTest *tc);
88 
89 void test_cil_copy_bool(CuTest *);
90 void test_cil_copy_node_helper_bool(CuTest *tc);
91 void test_cil_copy_node_helper_bool_dup_neg(CuTest *tc);
92 
93 void test_cil_copy_avrule(CuTest *);
94 void test_cil_copy_node_helper_avrule(CuTest *tc);
95 
96 void test_cil_copy_type_rule(CuTest *);
97 void test_cil_copy_node_helper_type_rule(CuTest *tc);
98 
99 void test_cil_copy_sens(CuTest *);
100 void test_cil_copy_node_helper_sens(CuTest *tc);
101 void test_cil_copy_node_helper_sens_merge(CuTest *tc);
102 
103 void test_cil_copy_sensalias(CuTest *);
104 void test_cil_copy_node_helper_sensalias(CuTest *tc);
105 void test_cil_copy_node_helper_sensalias_dup_neg(CuTest *tc);
106 
107 void test_cil_copy_cat(CuTest *);
108 void test_cil_copy_node_helper_cat(CuTest *tc);
109 void test_cil_copy_node_helper_cat_merge(CuTest *tc);
110 
111 void test_cil_copy_catalias(CuTest *);
112 void test_cil_copy_node_helper_catalias(CuTest *tc);
113 void test_cil_copy_node_helper_catalias_dup_neg(CuTest *tc);
114 
115 void test_cil_copy_senscat(CuTest *);
116 void test_cil_copy_node_helper_senscat(CuTest *tc);
117 
118 void test_cil_copy_catorder(CuTest *);
119 void test_cil_copy_node_helper_catorder(CuTest *tc);
120 
121 void test_cil_copy_dominance(CuTest *);
122 void test_cil_copy_node_helper_dominance(CuTest *tc);
123 
124 void test_cil_copy_level(CuTest *);
125 void test_cil_copy_node_helper_level(CuTest *tc);
126 void test_cil_copy_node_helper_level_dup_neg(CuTest *tc);
127 
128 void test_cil_copy_fill_level(CuTest *);
129 
130 void test_cil_copy_context(CuTest *);
131 void test_cil_copy_node_helper_context(CuTest *tc);
132 void test_cil_copy_node_helper_context_dup_neg(CuTest *tc);
133 
134 void test_cil_copy_netifcon(CuTest *);
135 void test_cil_copy_netifcon_nested(CuTest *);
136 void test_cil_copy_node_helper_netifcon(CuTest *tc);
137 void test_cil_copy_node_helper_netifcon_merge(CuTest *tc);
138 
139 void test_cil_copy_fill_context(CuTest *);
140 void test_cil_copy_fill_context_anonrange(CuTest *);
141 
142 void test_cil_copy_call(CuTest *);
143 void test_cil_copy_node_helper_call(CuTest *tc);
144 
145 void test_cil_copy_optional(CuTest *);
146 void test_cil_copy_node_helper_optional(CuTest *tc);
147 void test_cil_copy_node_helper_optional_merge(CuTest *tc);
148 
149 void test_cil_copy_nodecon(CuTest *);
150 void test_cil_copy_nodecon_anon(CuTest *);
151 
152 void test_cil_copy_fill_ipaddr(CuTest *);
153 
154 void test_cil_copy_ipaddr(CuTest *);
155 void test_cil_copy_node_helper_ipaddr(CuTest *tc);
156 void test_cil_copy_node_helper_ipaddr_dup_neg(CuTest *tc);
157 
158 void test_cil_copy_conditional(CuTest *);
159 
160 void test_cil_copy_boolif(CuTest *);
161 void test_cil_copy_node_helper_boolif(CuTest *tc);
162 
163 void test_cil_copy_constrain(CuTest *);
164 void test_cil_copy_node_helper_mlsconstrain(CuTest *tc);
165 
166 void test_cil_copy_ast(CuTest *);
167 void test_cil_copy_ast_neg(CuTest *);
168 
169 void test_cil_copy_node_helper_orignull_neg(CuTest *tc);
170 void test_cil_copy_node_helper_extraargsnull_neg(CuTest *tc);
171 
172 void test_cil_copy_data_helper(CuTest *tc);
173 void test_cil_copy_data_helper_getparentsymtab_neg(CuTest *tc);
174 void test_cil_copy_data_helper_duplicatedb_neg(CuTest *tc);
175 
176 #endif
177