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  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
15  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16  *
17  * The views and conclusions contained in the software and documentation are those
18  * of the authors and should not be interpreted as representing official policies,
19  * either expressed or implied, of Tresys Technology, LLC.
20  */
21 
22 #ifndef TEST_CIL_RESOLVE_AST_H_
23 #define TEST_CIL_RESOLVE_AST_H_
24 
25 #include "CuTest.h"
26 
27 void test_cil_resolve_name(CuTest *);
28 void test_cil_resolve_name_invalid_type_neg(CuTest *);
29 
30 void test_cil_resolve_ast_curr_null_neg(CuTest *);
31 
32 
33 /*
34 	cil_resolve test cases
35 */
36 
37 void test_cil_resolve_roleallow(CuTest *);
38 void test_cil_resolve_roleallow_srcdecl_neg(CuTest *);
39 void test_cil_resolve_roleallow_tgtdecl_neg(CuTest *);
40 
41 void test_cil_resolve_rolebounds(CuTest *tc);
42 void test_cil_resolve_rolebounds_exists_neg(CuTest *tc);
43 void test_cil_resolve_rolebounds_role1_neg(CuTest *tc);
44 void test_cil_resolve_rolebounds_role2_neg(CuTest *tc);
45 
46 void test_cil_resolve_sensalias(CuTest *);
47 void test_cil_resolve_sensalias_sensdecl_neg(CuTest *);
48 
49 void test_cil_resolve_catalias(CuTest *);
50 void test_cil_resolve_catalias_catdecl_neg(CuTest *);
51 
52 void test_cil_resolve_catorder(CuTest *);
53 void test_cil_resolve_catorder_neg(CuTest *);
54 
55 void test_cil_resolve_dominance(CuTest *);
56 void test_cil_resolve_dominance_neg(CuTest *);
57 
58 void test_cil_resolve_cat_list(CuTest *);
59 void test_cil_resolve_cat_list_catlistnull_neg(CuTest *);
60 void test_cil_resolve_cat_list_rescatlistnull_neg(CuTest *);
61 void test_cil_resolve_cat_list_catrange(CuTest *);
62 void test_cil_resolve_cat_list_catrange_neg(CuTest *);
63 void test_cil_resolve_cat_list_catname_neg(CuTest *);
64 
65 void test_cil_resolve_catset(CuTest *);
66 void test_cil_resolve_catset_catlist_neg(CuTest *);
67 
68 void test_cil_resolve_catrange(CuTest *);
69 void test_cil_resolve_catrange_catloworder_neg(CuTest *);
70 void test_cil_resolve_catrange_cathighorder_neg(CuTest *);
71 void test_cil_resolve_catrange_cat1_neg(CuTest *);
72 void test_cil_resolve_catrange_cat2_neg(CuTest *);
73 
74 void test_cil_resolve_senscat(CuTest *);
75 void test_cil_resolve_senscat_catrange_neg(CuTest *);
76 void test_cil_resolve_senscat_catsetname(CuTest *);
77 void test_cil_resolve_senscat_catsetname_neg(CuTest *);
78 void test_cil_resolve_senscat_sublist(CuTest *);
79 void test_cil_resolve_senscat_missingsens_neg(CuTest *);
80 void test_cil_resolve_senscat_sublist_neg(CuTest *);
81 void test_cil_resolve_senscat_category_neg(CuTest *);
82 void test_cil_resolve_senscat_currrangecat(CuTest *);
83 void test_cil_resolve_senscat_currrangecat_neg(CuTest *);
84 
85 void test_cil_resolve_level(CuTest *);
86 void test_cil_resolve_level_catlist(CuTest *);
87 void test_cil_resolve_level_catset(CuTest *);
88 void test_cil_resolve_level_catset_name_neg(CuTest *);
89 void test_cil_resolve_level_sens_neg(CuTest *);
90 void test_cil_resolve_level_cat_neg(CuTest *);
91 void test_cil_resolve_level_senscat_neg(CuTest *);
92 
93 void test_cil_resolve_levelrange_namedlvl(CuTest *);
94 void test_cil_resolve_levelrange_namedlvl_low_neg(CuTest *);
95 void test_cil_resolve_levelrange_namedlvl_high_neg(CuTest *);
96 void test_cil_resolve_levelrange_anonlvl(CuTest *);
97 void test_cil_resolve_levelrange_anonlvl_low_neg(CuTest *);
98 void test_cil_resolve_levelrange_anonlvl_high_neg(CuTest *);
99 
100 void test_cil_resolve_constrain(CuTest *);
101 void test_cil_resolve_constrain_class_neg(CuTest *);
102 void test_cil_resolve_constrain_perm_neg(CuTest *);
103 void test_cil_resolve_constrain_perm_resolve_neg(CuTest *);
104 
105 void test_cil_resolve_context(CuTest *);
106 void test_cil_resolve_context_macro(CuTest *);
107 void test_cil_resolve_context_macro_neg(CuTest *);
108 void test_cil_resolve_context_namedrange(CuTest *);
109 void test_cil_resolve_context_namedrange_neg(CuTest *);
110 void test_cil_resolve_context_macro_namedrange_anon(CuTest *);
111 void test_cil_resolve_context_user_neg(CuTest *);
112 void test_cil_resolve_context_role_neg(CuTest *);
113 void test_cil_resolve_context_type_neg(CuTest *);
114 void test_cil_resolve_context_anon_level_neg(CuTest *);
115 
116 void test_cil_resolve_roletransition(CuTest *);
117 void test_cil_resolve_roletransition_srcdecl_neg(CuTest *);
118 void test_cil_resolve_roletransition_tgtdecl_neg(CuTest *);
119 void test_cil_resolve_roletransition_resultdecl_neg(CuTest *);
120 
121 void test_cil_resolve_typeattributeset_type_in_multiple_attrs(CuTest *);
122 void test_cil_resolve_typeattributeset_multiple_excludes_with_not(CuTest *);
123 void test_cil_resolve_typeattributeset_multiple_types_with_and(CuTest *);
124 void test_cil_resolve_typeattributeset_using_attr(CuTest *);
125 void test_cil_resolve_typeattributeset_name_neg(CuTest *);
126 void test_cil_resolve_typeattributeset_undef_type_neg(CuTest *);
127 void test_cil_resolve_typeattributeset_not(CuTest *);
128 void test_cil_resolve_typeattributeset_undef_type_not_neg(CuTest *);
129 
130 void test_cil_resolve_typealias(CuTest *);
131 void test_cil_resolve_typealias_neg(CuTest *);
132 
133 void test_cil_resolve_typebounds(CuTest *);
134 void test_cil_resolve_typebounds_repeatbind_neg(CuTest *);
135 void test_cil_resolve_typebounds_type1_neg(CuTest *);
136 void test_cil_resolve_typebounds_type2_neg(CuTest *);
137 
138 void test_cil_resolve_typepermissive(CuTest *);
139 void test_cil_resolve_typepermissive_neg(CuTest *);
140 
141 void test_cil_resolve_nametypetransition(CuTest *);
142 void test_cil_resolve_nametypetransition_src_neg(CuTest *);
143 void test_cil_resolve_nametypetransition_tgt_neg(CuTest *);
144 void test_cil_resolve_nametypetransition_class_neg(CuTest *);
145 void test_cil_resolve_nametypetransition_dest_neg(CuTest *);
146 
147 void test_cil_resolve_rangetransition(CuTest *);
148 void test_cil_resolve_rangetransition_namedrange(CuTest *);
149 void test_cil_resolve_rangetransition_namedrange_anon(CuTest *);
150 void test_cil_resolve_rangetransition_namedrange_anon_neg(CuTest *);
151 void test_cil_resolve_rangetransition_namedrange_neg(CuTest *);
152 void test_cil_resolve_rangetransition_type1_neg(CuTest *);
153 void test_cil_resolve_rangetransition_type2_neg(CuTest *);
154 void test_cil_resolve_rangetransition_class_neg(CuTest *);
155 void test_cil_resolve_rangetransition_call_level_l_anon(CuTest *);
156 void test_cil_resolve_rangetransition_call_level_l_anon_neg(CuTest *);
157 void test_cil_resolve_rangetransition_call_level_h_anon(CuTest *);
158 void test_cil_resolve_rangetransition_call_level_h_anon_neg(CuTest *);
159 void test_cil_resolve_rangetransition_level_l_neg(CuTest *);
160 void test_cil_resolve_rangetransition_level_h_neg(CuTest *);
161 void test_cil_resolve_rangetransition_anon_level_l(CuTest *);
162 void test_cil_resolve_rangetransition_anon_level_l_neg(CuTest *);
163 void test_cil_resolve_rangetransition_anon_level_h(CuTest *);
164 void test_cil_resolve_rangetransition_anon_level_h_neg(CuTest *);
165 
166 void test_cil_resolve_classcommon(CuTest *);
167 void test_cil_resolve_classcommon_no_class_neg(CuTest *);
168 void test_cil_resolve_classcommon_neg(CuTest *);
169 void test_cil_resolve_classcommon_no_common_neg(CuTest *);
170 
171 void test_cil_resolve_classmapping_named(CuTest *);
172 void test_cil_resolve_classmapping_anon(CuTest *);
173 void test_cil_resolve_classmapping_anon_inmacro(CuTest *);
174 void test_cil_resolve_classmapping_anon_inmacro_neg(CuTest *);
175 void test_cil_resolve_classmapping_named_classmapname_neg(CuTest *);
176 void test_cil_resolve_classmapping_anon_classmapname_neg(CuTest *);
177 void test_cil_resolve_classmapping_anon_permset_neg(CuTest *);
178 
179 void test_cil_resolve_classpermset_named(CuTest *);
180 void test_cil_resolve_classpermset_named_namedpermlist(CuTest *);
181 void test_cil_resolve_classpermset_named_permlist_neg(CuTest *);
182 void test_cil_resolve_classpermset_named_unnamedcps_neg(CuTest *);
183 void test_cil_resolve_classpermset_anon(CuTest *);
184 void test_cil_resolve_classpermset_anon_namedpermlist(CuTest *);
185 void test_cil_resolve_classpermset_anon_permlist_neg(CuTest *);
186 
187 void test_cil_resolve_avrule(CuTest *);
188 void test_cil_resolve_avrule_permset(CuTest *);
189 void test_cil_resolve_avrule_permset_neg(CuTest *);
190 void test_cil_resolve_avrule_permset_permdne_neg(CuTest *);
191 void test_cil_resolve_avrule_firsttype_neg(CuTest *);
192 void test_cil_resolve_avrule_secondtype_neg(CuTest *);
193 void test_cil_resolve_avrule_class_neg(CuTest *);
194 void test_cil_resolve_avrule_perm_neg(CuTest *);
195 
196 void test_cil_resolve_type_rule_transition(CuTest *);
197 void test_cil_resolve_type_rule_transition_srcdecl_neg(CuTest *);
198 void test_cil_resolve_type_rule_transition_tgtdecl_neg(CuTest *);
199 void test_cil_resolve_type_rule_transition_objdecl_neg(CuTest *);
200 void test_cil_resolve_type_rule_transition_resultdecl_neg(CuTest *);
201 
202 void test_cil_resolve_type_rule_change(CuTest *);
203 void test_cil_resolve_type_rule_change_srcdecl_neg(CuTest *);
204 void test_cil_resolve_type_rule_change_tgtdecl_neg(CuTest *);
205 void test_cil_resolve_type_rule_change_objdecl_neg(CuTest *);
206 void test_cil_resolve_type_rule_change_resultdecl_neg(CuTest *);
207 
208 void test_cil_resolve_type_rule_member(CuTest *);
209 void test_cil_resolve_type_rule_member_srcdecl_neg(CuTest *);
210 void test_cil_resolve_type_rule_member_tgtdecl_neg(CuTest *);
211 void test_cil_resolve_type_rule_member_objdecl_neg(CuTest *);
212 void test_cil_resolve_type_rule_member_resultdecl_neg(CuTest *);
213 
214 void test_cil_resolve_filecon(CuTest *);
215 void test_cil_resolve_filecon_neg(CuTest *);
216 void test_cil_resolve_filecon_anon_context(CuTest *);
217 void test_cil_resolve_filecon_anon_context_neg(CuTest *);
218 void test_cil_resolve_ast_node_helper_filecon(CuTest *tc);
219 void test_cil_resolve_ast_node_helper_filecon_neg(CuTest *tc);
220 
221 void test_cil_resolve_portcon(CuTest *);
222 void test_cil_resolve_portcon_neg(CuTest *);
223 void test_cil_resolve_portcon_anon_context(CuTest *);
224 void test_cil_resolve_portcon_anon_context_neg(CuTest *);
225 void test_cil_resolve_ast_node_helper_portcon(CuTest *tc);
226 void test_cil_resolve_ast_node_helper_portcon_neg(CuTest *tc);
227 
228 void test_cil_resolve_genfscon(CuTest *);
229 void test_cil_resolve_genfscon_neg(CuTest *);
230 void test_cil_resolve_genfscon_anon_context(CuTest *);
231 void test_cil_resolve_genfscon_anon_context_neg(CuTest *);
232 void test_cil_resolve_ast_node_helper_genfscon(CuTest *tc);
233 void test_cil_resolve_ast_node_helper_genfscon_neg(CuTest *tc);
234 
235 void test_cil_resolve_nodecon_ipv4(CuTest *);
236 void test_cil_resolve_nodecon_ipv6(CuTest *);
237 void test_cil_resolve_nodecon_anonipaddr_ipv4(CuTest *);
238 void test_cil_resolve_nodecon_anonnetmask_ipv4(CuTest *);
239 void test_cil_resolve_nodecon_anonipaddr_ipv6(CuTest *);
240 void test_cil_resolve_nodecon_anonnetmask_ipv6(CuTest *);
241 void test_cil_resolve_nodecon_diffipfam_neg(CuTest *);
242 void test_cil_resolve_nodecon_context_neg(CuTest *);
243 void test_cil_resolve_nodecon_ipaddr_neg(CuTest *);
244 void test_cil_resolve_nodecon_netmask_neg(CuTest *);
245 void test_cil_resolve_nodecon_anon_context(CuTest *);
246 void test_cil_resolve_nodecon_anon_context_neg(CuTest *);
247 void test_cil_resolve_ast_node_helper_nodecon(CuTest *tc);
248 void test_cil_resolve_ast_node_helper_nodecon_ipaddr_neg(CuTest *tc);
249 void test_cil_resolve_ast_node_helper_nodecon_netmask_neg(CuTest *tc);
250 
251 void test_cil_resolve_netifcon(CuTest *);
252 void test_cil_resolve_netifcon_otf_neg(CuTest *);
253 void test_cil_resolve_netifcon_interface_neg(CuTest *);
254 void test_cil_resolve_netifcon_unnamed(CuTest *);
255 void test_cil_resolve_netifcon_unnamed_packet_neg(CuTest *);
256 void test_cil_resolve_netifcon_unnamed_otf_neg(CuTest *);
257 void test_cil_resolve_ast_node_helper_netifcon(CuTest *tc);
258 void test_cil_resolve_ast_node_helper_netifcon_neg(CuTest *tc);
259 
260 void test_cil_resolve_pirqcon(CuTest *);
261 void test_cil_resolve_pirqcon_context_neg(CuTest *);
262 void test_cil_resolve_pirqcon_anon_context(CuTest *);
263 void test_cil_resolve_pirqcon_anon_context_neg(CuTest *);
264 void test_cil_resolve_ast_node_helper_pirqcon(CuTest *tc);
265 void test_cil_resolve_ast_node_helper_pirqcon_neg(CuTest *tc);
266 
267 void test_cil_resolve_iomemcon(CuTest *);
268 void test_cil_resolve_iomemcon_context_neg(CuTest *);
269 void test_cil_resolve_iomemcon_anon_context(CuTest *);
270 void test_cil_resolve_iomemcon_anon_context_neg(CuTest *);
271 void test_cil_resolve_ast_node_helper_iomemcon(CuTest *tc);
272 void test_cil_resolve_ast_node_helper_iomemcon_neg(CuTest *tc);
273 
274 void test_cil_resolve_ioportcon(CuTest *);
275 void test_cil_resolve_ioportcon_context_neg(CuTest *);
276 void test_cil_resolve_ioportcon_anon_context(CuTest *);
277 void test_cil_resolve_ioportcon_anon_context_neg(CuTest *);
278 void test_cil_resolve_ast_node_helper_ioportcon(CuTest *tc);
279 void test_cil_resolve_ast_node_helper_ioportcon_neg(CuTest *tc);
280 
281 void test_cil_resolve_pcidevicecon(CuTest *);
282 void test_cil_resolve_pcidevicecon_context_neg(CuTest *);
283 void test_cil_resolve_pcidevicecon_anon_context(CuTest *);
284 void test_cil_resolve_pcidevicecon_anon_context_neg(CuTest *);
285 void test_cil_resolve_ast_node_helper_pcidevicecon(CuTest *tc);
286 void test_cil_resolve_ast_node_helper_pcidevicecon_neg(CuTest *tc);
287 
288 void test_cil_resolve_fsuse(CuTest *);
289 void test_cil_resolve_fsuse_neg(CuTest *);
290 void test_cil_resolve_fsuse_anon(CuTest *);
291 void test_cil_resolve_fsuse_anon_neg(CuTest *);
292 void test_cil_resolve_ast_node_helper_fsuse(CuTest *tc);
293 void test_cil_resolve_ast_node_helper_fsuse_neg(CuTest *tc);
294 
295 void test_cil_resolve_sidcontext(CuTest *);
296 void test_cil_resolve_sidcontext_named_levels(CuTest *);
297 void test_cil_resolve_sidcontext_named_context(CuTest *);
298 void test_cil_resolve_sidcontext_named_context_wrongname_neg(CuTest *tc);
299 void test_cil_resolve_sidcontext_named_context_invaliduser_neg(CuTest *tc);
300 void test_cil_resolve_sidcontext_named_context_sidcontextnull_neg(CuTest *tc);
301 void test_cil_resolve_ast_node_helper_sidcontext(CuTest *tc);
302 void test_cil_resolve_ast_node_helper_sidcontext_neg(CuTest *tc);
303 
304 void test_cil_resolve_blockinherit(CuTest *);
305 void test_cil_resolve_blockinherit_blockstrdne_neg(CuTest *);
306 void test_cil_resolve_ast_node_helper_blockinherit(CuTest *tc);
307 
308 void test_cil_resolve_in_block(CuTest *);
309 void test_cil_resolve_in_blockstrdne_neg(CuTest *);
310 void test_cil_resolve_in_macro(CuTest *);
311 void test_cil_resolve_in_optional(CuTest *);
312 
313 void test_cil_resolve_call1_noparam(CuTest *);
314 void test_cil_resolve_call1_type(CuTest *);
315 void test_cil_resolve_call1_role(CuTest *);
316 void test_cil_resolve_call1_user(CuTest *);
317 void test_cil_resolve_call1_sens(CuTest *);
318 void test_cil_resolve_call1_cat(CuTest *);
319 void test_cil_resolve_call1_catset(CuTest *);
320 void test_cil_resolve_call1_catset_anon(CuTest *);
321 void test_cil_resolve_call1_catset_anon_neg(CuTest *);
322 void test_cil_resolve_call1_level(CuTest *);
323 void test_cil_resolve_call1_class(CuTest *);
324 void test_cil_resolve_call1_classmap(CuTest *);
325 void test_cil_resolve_call1_permset(CuTest *);
326 void test_cil_resolve_call1_permset_anon(CuTest *);
327 void test_cil_resolve_call1_classpermset_named(CuTest *);
328 void test_cil_resolve_call1_classpermset_anon(CuTest *);
329 void test_cil_resolve_call1_classpermset_anon_neg(CuTest *);
330 void test_cil_resolve_call1_level(CuTest *);
331 void test_cil_resolve_call1_level_anon(CuTest *);
332 void test_cil_resolve_call1_level_anon_neg(CuTest *);
333 void test_cil_resolve_call1_ipaddr(CuTest *);
334 void test_cil_resolve_call1_ipaddr_anon(CuTest *);
335 void test_cil_resolve_call1_ipaddr_anon_neg(CuTest *);
336 void test_cil_resolve_call1_unknown_neg(CuTest *);
337 void test_cil_resolve_call1_unknowncall_neg(CuTest *);
338 void test_cil_resolve_call1_extraargs_neg(CuTest *);
339 void test_cil_resolve_call1_copy_dup(CuTest *);
340 void test_cil_resolve_call1_missing_arg_neg(CuTest *);
341 void test_cil_resolve_call1_paramsflavor_neg(CuTest *);
342 void test_cil_resolve_call1_unknownflavor_neg(CuTest *);
343 
344 void test_cil_resolve_call2_type(CuTest *);
345 void test_cil_resolve_call2_role(CuTest *);
346 void test_cil_resolve_call2_user(CuTest *);
347 void test_cil_resolve_call2_sens(CuTest *);
348 void test_cil_resolve_call2_cat(CuTest *);
349 void test_cil_resolve_call2_catset(CuTest *);
350 void test_cil_resolve_call2_catset_anon(CuTest *);
351 void test_cil_resolve_call2_permset(CuTest *);
352 void test_cil_resolve_call2_permset_anon(CuTest *);
353 void test_cil_resolve_call2_classpermset_named(CuTest *);
354 void test_cil_resolve_call2_classpermset_anon(CuTest *);
355 void test_cil_resolve_call2_class(CuTest *);
356 void test_cil_resolve_call2_classmap(CuTest *);
357 void test_cil_resolve_call2_level(CuTest *);
358 void test_cil_resolve_call2_level_anon(CuTest *);
359 void test_cil_resolve_call2_ipaddr(CuTest *);
360 void test_cil_resolve_call2_ipaddr_anon(CuTest *);
361 void test_cil_resolve_call2_unknown_neg(CuTest *);
362 
363 void test_cil_resolve_name_call_args(CuTest *);
364 void test_cil_resolve_name_call_args_multipleparams(CuTest *);
365 void test_cil_resolve_name_call_args_diffflavor(CuTest *);
366 void test_cil_resolve_name_call_args_callnull_neg(CuTest *);
367 void test_cil_resolve_name_call_args_namenull_neg(CuTest *);
368 void test_cil_resolve_name_call_args_callargsnull_neg(CuTest *);
369 void test_cil_resolve_name_call_args_name_neg(CuTest *);
370 
371 void test_cil_resolve_expr_stack_bools(CuTest *);
372 void test_cil_resolve_expr_stack_tunables(CuTest *);
373 void test_cil_resolve_expr_stack_type(CuTest *);
374 void test_cil_resolve_expr_stack_role(CuTest *);
375 void test_cil_resolve_expr_stack_user(CuTest *);
376 void test_cil_resolve_expr_stack_neg(CuTest *);
377 void test_cil_resolve_expr_stack_emptystr_neg(CuTest *);
378 
379 void test_cil_resolve_boolif(CuTest *);
380 void test_cil_resolve_boolif_neg(CuTest *);
381 
382 void test_cil_evaluate_expr_stack_and(CuTest *);
383 void test_cil_evaluate_expr_stack_not(CuTest *);
384 void test_cil_evaluate_expr_stack_or(CuTest *);
385 void test_cil_evaluate_expr_stack_xor(CuTest *);
386 void test_cil_evaluate_expr_stack_eq(CuTest *);
387 void test_cil_evaluate_expr_stack_neq(CuTest *);
388 void test_cil_evaluate_expr_stack_oper1(CuTest *);
389 void test_cil_evaluate_expr_stack_oper2(CuTest *);
390 void test_cil_evaluate_expr_stack_neg(CuTest *);
391 
392 void test_cil_resolve_tunif_false(CuTest *);
393 void test_cil_resolve_tunif_true(CuTest *);
394 void test_cil_resolve_tunif_resolveexpr_neg(CuTest *);
395 void test_cil_resolve_tunif_evaluateexpr_neg(CuTest *);
396 
397 void test_cil_resolve_userbounds(CuTest *tc);
398 void test_cil_resolve_userbounds_exists_neg(CuTest *tc);
399 void test_cil_resolve_userbounds_user1_neg(CuTest *tc);
400 void test_cil_resolve_userbounds_user2_neg(CuTest *tc);
401 
402 void test_cil_resolve_roletype(CuTest *tc);
403 void test_cil_resolve_roletype_type_neg(CuTest *tc);
404 void test_cil_resolve_roletype_role_neg(CuTest *tc);
405 
406 void test_cil_resolve_userrole(CuTest *tc);
407 void test_cil_resolve_userrole_user_neg(CuTest *tc);
408 void test_cil_resolve_userrole_role_neg(CuTest *tc);
409 
410 void test_cil_resolve_userlevel(CuTest *tc);
411 void test_cil_resolve_userlevel_macro(CuTest *tc);
412 void test_cil_resolve_userlevel_macro_neg(CuTest *tc);
413 void test_cil_resolve_userlevel_level_anon(CuTest *tc);
414 void test_cil_resolve_userlevel_level_anon_neg(CuTest *tc);
415 void test_cil_resolve_userlevel_user_neg(CuTest *tc);
416 void test_cil_resolve_userlevel_level_neg(CuTest *tc);
417 
418 void test_cil_resolve_userrange(CuTest *tc);
419 void test_cil_resolve_userrange_macro(CuTest *tc);
420 void test_cil_resolve_userrange_macro_neg(CuTest *tc);
421 void test_cil_resolve_userrange_range_anon(CuTest *tc);
422 void test_cil_resolve_userrange_range_anon_neg(CuTest *tc);
423 void test_cil_resolve_userrange_user_neg(CuTest *tc);
424 void test_cil_resolve_userrange_range_neg(CuTest *tc);
425 
426 void test_cil_disable_children_helper_optional_enabled(CuTest *tc);
427 void test_cil_disable_children_helper_optional_disabled(CuTest *tc);
428 void test_cil_disable_children_helper_block(CuTest *tc);
429 void test_cil_disable_children_helper_user(CuTest *tc);
430 void test_cil_disable_children_helper_role(CuTest *tc);
431 void test_cil_disable_children_helper_type(CuTest *tc);
432 void test_cil_disable_children_helper_typealias(CuTest *tc);
433 void test_cil_disable_children_helper_common(CuTest *tc);
434 void test_cil_disable_children_helper_class(CuTest *tc);
435 void test_cil_disable_children_helper_bool(CuTest *tc);
436 void test_cil_disable_children_helper_sens(CuTest *tc);
437 void test_cil_disable_children_helper_cat(CuTest *tc);
438 void test_cil_disable_children_helper_catset(CuTest *tc);
439 void test_cil_disable_children_helper_sid(CuTest *tc);
440 void test_cil_disable_children_helper_macro(CuTest *tc);
441 void test_cil_disable_children_helper_context(CuTest *tc);
442 void test_cil_disable_children_helper_level(CuTest *tc);
443 void test_cil_disable_children_helper_policycap(CuTest *tc);
444 void test_cil_disable_children_helper_perm(CuTest *tc);
445 void test_cil_disable_children_helper_catalias(CuTest *tc);
446 void test_cil_disable_children_helper_sensalias(CuTest *tc);
447 void test_cil_disable_children_helper_tunable(CuTest *tc);
448 void test_cil_disable_children_helper_unknown(CuTest *tc);
449 
450 /*
451 	__cil_resolve_ast_node_helper test cases
452 */
453 
454 void test_cil_resolve_ast_node_helper_call1(CuTest *);
455 void test_cil_resolve_ast_node_helper_call1_neg(CuTest *);
456 
457 void test_cil_resolve_ast_node_helper_call2(CuTest *);
458 void test_cil_resolve_ast_node_helper_call2_neg(CuTest *);
459 
460 void test_cil_resolve_ast_node_helper_boolif(CuTest *);
461 void test_cil_resolve_ast_node_helper_boolif_neg(CuTest *);
462 
463 void test_cil_resolve_ast_node_helper_tunif(CuTest *);
464 void test_cil_resolve_ast_node_helper_tunif_neg(CuTest *);
465 
466 void test_cil_resolve_ast_node_helper_catorder(CuTest *);
467 void test_cil_resolve_ast_node_helper_catorder_neg(CuTest *);
468 
469 void test_cil_resolve_ast_node_helper_dominance(CuTest *);
470 void test_cil_resolve_ast_node_helper_dominance_neg(CuTest *);
471 
472 void test_cil_resolve_ast_node_helper_roleallow(CuTest *);
473 void test_cil_resolve_ast_node_helper_roleallow_neg(CuTest *);
474 
475 void test_cil_resolve_ast_node_helper_rolebounds(CuTest *tc);
476 void test_cil_resolve_ast_node_helper_rolebounds_neg(CuTest *tc);
477 
478 void test_cil_resolve_ast_node_helper_sensalias(CuTest *);
479 void test_cil_resolve_ast_node_helper_sensalias_neg(CuTest *);
480 
481 void test_cil_resolve_ast_node_helper_catalias(CuTest *);
482 void test_cil_resolve_ast_node_helper_catalias_neg(CuTest *);
483 
484 void test_cil_resolve_ast_node_helper_catset(CuTest *);
485 void test_cil_resolve_ast_node_helper_catset_catlist_neg(CuTest *);
486 
487 void test_cil_resolve_ast_node_helper_level(CuTest *);
488 void test_cil_resolve_ast_node_helper_level_neg(CuTest *);
489 
490 void test_cil_resolve_ast_node_helper_levelrange(CuTest *);
491 void test_cil_resolve_ast_node_helper_levelrange_neg(CuTest *);
492 
493 void test_cil_resolve_ast_node_helper_constrain(CuTest *);
494 void test_cil_resolve_ast_node_helper_constrain_neg(CuTest *);
495 void test_cil_resolve_ast_node_helper_mlsconstrain(CuTest *);
496 void test_cil_resolve_ast_node_helper_mlsconstrain_neg(CuTest *);
497 
498 void test_cil_resolve_ast_node_helper_context(CuTest *);
499 void test_cil_resolve_ast_node_helper_context_neg(CuTest *);
500 
501 void test_cil_resolve_ast_node_helper_catrange(CuTest *tc);
502 void test_cil_resolve_ast_node_helper_catrange_neg(CuTest *tc);
503 
504 void test_cil_resolve_ast_node_helper_senscat(CuTest *tc);
505 void test_cil_resolve_ast_node_helper_senscat_neg(CuTest *tc);
506 
507 void test_cil_resolve_ast_node_helper_roletransition(CuTest *);
508 void test_cil_resolve_ast_node_helper_roletransition_srcdecl_neg(CuTest *);
509 void test_cil_resolve_ast_node_helper_roletransition_tgtdecl_neg(CuTest *);
510 void test_cil_resolve_ast_node_helper_roletransition_resultdecl_neg(CuTest *);
511 
512 void test_cil_resolve_ast_node_helper_typeattributeset(CuTest *);
513 void test_cil_resolve_ast_node_helper_typeattributeset_undef_type_neg(CuTest *);
514 
515 void test_cil_resolve_ast_node_helper_typealias(CuTest *);
516 void test_cil_resolve_ast_node_helper_typealias_notype_neg(CuTest *);
517 
518 void test_cil_resolve_ast_node_helper_typebounds(CuTest *);
519 void test_cil_resolve_ast_node_helper_typebounds_neg(CuTest *);
520 
521 void test_cil_resolve_ast_node_helper_typepermissive(CuTest *);
522 void test_cil_resolve_ast_node_helper_typepermissive_neg(CuTest *);
523 
524 void test_cil_resolve_ast_node_helper_nametypetransition(CuTest *);
525 void test_cil_resolve_ast_node_helper_nametypetransition_neg(CuTest *);
526 
527 void test_cil_resolve_ast_node_helper_rangetransition(CuTest *);
528 void test_cil_resolve_ast_node_helper_rangetransition_neg(CuTest *);
529 
530 void test_cil_resolve_ast_node_helper_avrule(CuTest *);
531 void test_cil_resolve_ast_node_helper_avrule_src_nores_neg(CuTest *);
532 void test_cil_resolve_ast_node_helper_avrule_tgt_nores_neg(CuTest *);
533 void test_cil_resolve_ast_node_helper_avrule_class_nores_neg(CuTest *);
534 void test_cil_resolve_ast_node_helper_avrule_datum_null_neg(CuTest *);
535 
536 void test_cil_resolve_ast_node_helper_type_rule_transition(CuTest *);
537 void test_cil_resolve_ast_node_helper_type_rule_transition_neg(CuTest *);
538 
539 void test_cil_resolve_ast_node_helper_type_rule_change(CuTest *);
540 void test_cil_resolve_ast_node_helper_type_rule_change_neg(CuTest *);
541 
542 void test_cil_resolve_ast_node_helper_type_rule_member(CuTest *);
543 void test_cil_resolve_ast_node_helper_type_rule_member_neg(CuTest *);
544 
545 void test_cil_resolve_ast_node_helper_userbounds(CuTest *tc);
546 void test_cil_resolve_ast_node_helper_userbounds_neg(CuTest *tc);
547 
548 void test_cil_resolve_ast_node_helper_roletype(CuTest *tc);
549 void test_cil_resolve_ast_node_helper_roletype_role_neg(CuTest *tc);
550 void test_cil_resolve_ast_node_helper_roletype_type_neg(CuTest *tc);
551 
552 void test_cil_resolve_ast_node_helper_userrole(CuTest *tc);
553 void test_cil_resolve_ast_node_helper_userrole_user_neg(CuTest *tc);
554 void test_cil_resolve_ast_node_helper_userrole_role_neg(CuTest *tc);
555 
556 void test_cil_resolve_ast_node_helper_userlevel(CuTest *tc);
557 void test_cil_resolve_ast_node_helper_userlevel_neg(CuTest *tc);
558 
559 void test_cil_resolve_ast_node_helper_userlevel(CuTest *tc);
560 void test_cil_resolve_ast_node_helper_userlevel_neg(CuTest *tc);
561 
562 void test_cil_resolve_ast_node_helper_userrange(CuTest *tc);
563 void test_cil_resolve_ast_node_helper_userrange_neg(CuTest *tc);
564 
565 void test_cil_resolve_ast_node_helper_classcommon(CuTest *tc);
566 void test_cil_resolve_ast_node_helper_classcommon_neg(CuTest *tc);
567 
568 void test_cil_resolve_ast_node_helper_callstack(CuTest *tc);
569 void test_cil_resolve_ast_node_helper_call(CuTest *tc);
570 void test_cil_resolve_ast_node_helper_optional(CuTest *tc);
571 void test_cil_resolve_ast_node_helper_macro(CuTest *tc);
572 void test_cil_resolve_ast_node_helper_optstack(CuTest *tc);
573 void test_cil_resolve_ast_node_helper_optstack_tunable_neg(CuTest *tc);
574 void test_cil_resolve_ast_node_helper_optstack_macro_neg(CuTest *tc);
575 void test_cil_resolve_ast_node_helper_nodenull_neg(CuTest *tc);
576 void test_cil_resolve_ast_node_helper_extraargsnull_neg(CuTest *tc);
577 void test_cil_resolve_ast_node_helper_optfailedtoresolve(CuTest *tc);
578 #endif
579