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 #include <stdlib.h> 31 #include <stdio.h> 32 #include <string.h> 33 #include <sys/stat.h> 34 #include <sepol/policydb/symtab.h> 35 #include <sepol/policydb/policydb.h> 36 37 #include "CuTest.h" 38 #include "CilTest.h" 39 40 #include "../../src/cil_internal.h" 41 42 #include "test_cil.h" 43 #include "test_cil_tree.h" 44 #include "test_cil_list.h" 45 #include "test_cil_symtab.h" 46 #include "test_cil_parser.h" 47 #include "test_cil_lexer.h" 48 #include "test_cil_build_ast.h" 49 #include "test_cil_resolve_ast.h" 50 #include "test_cil_fqn.h" 51 #include "test_cil_copy_ast.h" 52 #include "test_cil_post.h" 53 #include "test_integration.h" 54 55 void set_cil_file_data(struct cil_file_data **data) { 56 struct cil_file_data *new_data = malloc(sizeof(*new_data)); 57 FILE *file; 58 struct stat filedata; 59 uint32_t file_size; 60 char *buffer; 61 62 file = fopen("test/policy.cil", "r"); 63 if (!file) { 64 fprintf(stderr, "Could not open file\n"); 65 exit(1); 66 } 67 if (stat("test/policy.cil", &filedata) == -1) { 68 printf("Could not stat file\n"); 69 exit(1); 70 } 71 file_size = filedata.st_size; 72 73 buffer = malloc(file_size + 2); 74 if(fread(buffer, file_size, 1, file) < 1) { 75 exit(1); 76 } 77 memset(buffer+file_size, 0, 2); 78 fclose(file); 79 80 81 new_data->buffer = buffer; 82 new_data->file_size = file_size; 83 84 *data = new_data; 85 86 } 87 88 void gen_test_tree(struct cil_tree **test_root, char *line[]) { 89 struct cil_tree *new_tree = malloc(sizeof(*new_tree)); 90 struct cil_tree_node *node, *item, *current; 91 92 cil_tree_init(&new_tree); 93 new_tree->root->flavor = CIL_ROOT; 94 current = new_tree->root; 95 96 char **i = line; 97 do { 98 if (*i[0] == '(') { 99 cil_tree_node_init(&node); 100 node->parent = current; 101 node->flavor = CIL_PARSE_NODE; 102 node->line = 0; 103 if (current->cl_head == NULL) 104 current->cl_head = node; 105 else 106 current->cl_tail->next = node; 107 current->cl_tail = node; 108 current = node; 109 } 110 else if (*i[0] == ')') 111 current = current->parent; 112 else { 113 cil_tree_node_init(&item); 114 item->parent = current; 115 item->data = cil_strdup(*i); 116 item->flavor = CIL_PARSE_NODE; 117 item->line = 0; 118 if (current->cl_head == NULL) { 119 current->cl_head = item; 120 } 121 else { 122 current->cl_tail->next = item; 123 } 124 current->cl_tail = item; 125 } 126 i++; 127 } while(*i != NULL); 128 129 *test_root = new_tree; 130 } 131 132 void test_symtab_init(CuTest *tc) { 133 struct cil_db *test_new_db; 134 test_new_db = malloc(sizeof(*test_new_db)); 135 136 uint32_t rc = 0, i =0; 137 138 for (i = 0; i < CIL_SYM_NUM; i++) { 139 rc = symtab_init(&test_new_db->symtab[i], cil_sym_sizes[CIL_SYM_ARRAY_ROOT][i]); 140 CuAssertIntEquals(tc, 0, rc); 141 // TODO CDS add checks to make sure the symtab looks correct 142 } 143 144 free(test_new_db); 145 } 146 147 void test_symtab_init_no_table_neg(CuTest *tc) { 148 struct cil_db *test_new_db; 149 test_new_db = malloc(sizeof(*test_new_db)); 150 151 int rc = symtab_init(&test_new_db->symtab[0], (uint32_t)SIZE_MAX); 152 CuAssertIntEquals(tc, -1, rc); 153 154 free(test_new_db); 155 } 156 157 CuSuite* CilTreeGetResolveSuite(void) { 158 CuSuite* suite = CuSuiteNew(); 159 160 /* test_cil_resolve_ast.c */ 161 SUITE_ADD_TEST(suite, test_cil_resolve_ast_curr_null_neg); 162 SUITE_ADD_TEST(suite, test_cil_gen_perm_nodes_inval_perm_neg); 163 164 SUITE_ADD_TEST(suite, test_cil_resolve_name); 165 SUITE_ADD_TEST(suite, test_cil_resolve_name_invalid_type_neg); 166 167 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_type_in_multiple_attrs); 168 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_multiple_excludes_with_not); 169 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_multiple_types_with_and); 170 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_using_attr); 171 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_name_neg); 172 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_undef_type_neg); 173 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_not); 174 SUITE_ADD_TEST(suite, test_cil_resolve_typeattributeset_undef_type_not_neg); 175 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typeattributeset); 176 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typeattributeset_undef_type_neg); 177 178 SUITE_ADD_TEST(suite, test_cil_resolve_typealias); 179 SUITE_ADD_TEST(suite, test_cil_resolve_typealias_neg); 180 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typealias); 181 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typealias_notype_neg); 182 183 SUITE_ADD_TEST(suite, test_cil_resolve_typebounds); 184 SUITE_ADD_TEST(suite, test_cil_resolve_typebounds_repeatbind_neg); 185 SUITE_ADD_TEST(suite, test_cil_resolve_typebounds_type1_neg); 186 SUITE_ADD_TEST(suite, test_cil_resolve_typebounds_type2_neg); 187 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typebounds); 188 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typebounds_neg); 189 190 SUITE_ADD_TEST(suite, test_cil_resolve_typepermissive); 191 SUITE_ADD_TEST(suite, test_cil_resolve_typepermissive_neg); 192 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typepermissive); 193 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_typepermissive_neg); 194 195 SUITE_ADD_TEST(suite, test_cil_resolve_nametypetransition); 196 SUITE_ADD_TEST(suite, test_cil_resolve_nametypetransition_src_neg); 197 SUITE_ADD_TEST(suite, test_cil_resolve_nametypetransition_tgt_neg); 198 SUITE_ADD_TEST(suite, test_cil_resolve_nametypetransition_class_neg); 199 SUITE_ADD_TEST(suite, test_cil_resolve_nametypetransition_dest_neg); 200 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_nametypetransition); 201 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_nametypetransition_neg); 202 203 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition); 204 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_namedrange); 205 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_namedrange_anon); 206 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_namedrange_anon_neg); 207 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_namedrange_neg); 208 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_type1_neg); 209 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_type2_neg); 210 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_class_neg); 211 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_call_level_l_anon); 212 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_call_level_l_anon_neg); 213 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_call_level_h_anon); 214 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_call_level_h_anon_neg); 215 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_level_l_neg); 216 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_level_h_neg); 217 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_anon_level_l); 218 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_anon_level_l_neg); 219 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_anon_level_h); 220 SUITE_ADD_TEST(suite, test_cil_resolve_rangetransition_anon_level_h_neg); 221 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_rangetransition); 222 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_rangetransition_neg); 223 224 SUITE_ADD_TEST(suite, test_cil_resolve_classcommon); 225 SUITE_ADD_TEST(suite, test_cil_resolve_classcommon_no_class_neg); 226 SUITE_ADD_TEST(suite, test_cil_resolve_classcommon_no_common_neg); 227 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_classcommon); 228 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_classcommon_neg); 229 230 SUITE_ADD_TEST(suite, test_cil_resolve_classmapping_named); 231 SUITE_ADD_TEST(suite, test_cil_resolve_classmapping_anon); 232 SUITE_ADD_TEST(suite, test_cil_resolve_classmapping_anon_inmacro); 233 SUITE_ADD_TEST(suite, test_cil_resolve_classmapping_anon_inmacro_neg); 234 SUITE_ADD_TEST(suite, test_cil_resolve_classmapping_named_classmapname_neg); 235 SUITE_ADD_TEST(suite, test_cil_resolve_classmapping_anon_classmapname_neg); 236 SUITE_ADD_TEST(suite, test_cil_resolve_classmapping_anon_permset_neg); 237 238 SUITE_ADD_TEST(suite, test_cil_resolve_rolebounds); 239 SUITE_ADD_TEST(suite, test_cil_resolve_rolebounds_exists_neg); 240 SUITE_ADD_TEST(suite, test_cil_resolve_rolebounds_role1_neg); 241 SUITE_ADD_TEST(suite, test_cil_resolve_rolebounds_role2_neg); 242 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_rolebounds); 243 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_rolebounds_neg); 244 245 SUITE_ADD_TEST(suite, test_cil_resolve_sensalias); 246 SUITE_ADD_TEST(suite, test_cil_resolve_sensalias_sensdecl_neg); 247 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_sensalias); 248 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_sensalias_neg); 249 250 SUITE_ADD_TEST(suite, test_cil_resolve_catalias); 251 SUITE_ADD_TEST(suite, test_cil_resolve_catalias_catdecl_neg); 252 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catalias); 253 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catalias_neg); 254 255 SUITE_ADD_TEST(suite, test_cil_resolve_catorder); 256 SUITE_ADD_TEST(suite, test_cil_resolve_catorder_neg); 257 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catorder); 258 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catorder_neg); 259 260 SUITE_ADD_TEST(suite, test_cil_resolve_dominance); 261 SUITE_ADD_TEST(suite, test_cil_resolve_dominance_neg); 262 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_dominance); 263 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_dominance_neg); 264 //TODO: test for __cil_set_order 265 266 SUITE_ADD_TEST(suite, test_cil_resolve_catset); 267 SUITE_ADD_TEST(suite, test_cil_resolve_catset_catlist_neg); 268 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catset); 269 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catset_catlist_neg); 270 271 SUITE_ADD_TEST(suite, test_cil_resolve_catrange); 272 SUITE_ADD_TEST(suite, test_cil_resolve_catrange_catloworder_neg); 273 SUITE_ADD_TEST(suite, test_cil_resolve_catrange_cathighorder_neg); 274 SUITE_ADD_TEST(suite, test_cil_resolve_catrange_cat1_neg); 275 SUITE_ADD_TEST(suite, test_cil_resolve_catrange_cat2_neg); 276 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catrange); 277 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_catrange_neg); 278 279 SUITE_ADD_TEST(suite, test_cil_resolve_senscat); 280 SUITE_ADD_TEST(suite, test_cil_resolve_senscat_catrange_neg); 281 SUITE_ADD_TEST(suite, test_cil_resolve_senscat_catsetname); 282 SUITE_ADD_TEST(suite, test_cil_resolve_senscat_catsetname_neg); 283 SUITE_ADD_TEST(suite, test_cil_resolve_senscat_sublist); 284 SUITE_ADD_TEST(suite, test_cil_resolve_senscat_missingsens_neg); 285 SUITE_ADD_TEST(suite, test_cil_resolve_senscat_category_neg); 286 SUITE_ADD_TEST(suite, test_cil_resolve_senscat_currrangecat); 287 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_senscat); 288 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_senscat_neg); 289 290 SUITE_ADD_TEST(suite, test_cil_resolve_level); 291 SUITE_ADD_TEST(suite, test_cil_resolve_level_catlist); 292 SUITE_ADD_TEST(suite, test_cil_resolve_level_catset); 293 SUITE_ADD_TEST(suite, test_cil_resolve_level_catset_name_neg); 294 SUITE_ADD_TEST(suite, test_cil_resolve_level_sens_neg); 295 SUITE_ADD_TEST(suite, test_cil_resolve_level_cat_neg); 296 SUITE_ADD_TEST(suite, test_cil_resolve_level_senscat_neg); 297 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_level); 298 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_level_neg); 299 300 SUITE_ADD_TEST(suite, test_cil_resolve_levelrange_namedlvl); 301 SUITE_ADD_TEST(suite, test_cil_resolve_levelrange_namedlvl_low_neg); 302 SUITE_ADD_TEST(suite, test_cil_resolve_levelrange_namedlvl_high_neg); 303 SUITE_ADD_TEST(suite, test_cil_resolve_levelrange_anonlvl); 304 SUITE_ADD_TEST(suite, test_cil_resolve_levelrange_anonlvl_low_neg); 305 SUITE_ADD_TEST(suite, test_cil_resolve_levelrange_anonlvl_high_neg); 306 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_levelrange); 307 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_levelrange_neg); 308 309 SUITE_ADD_TEST(suite, test_cil_resolve_constrain); 310 SUITE_ADD_TEST(suite, test_cil_resolve_constrain_class_neg); 311 SUITE_ADD_TEST(suite, test_cil_resolve_constrain_perm_neg); 312 SUITE_ADD_TEST(suite, test_cil_resolve_constrain_perm_resolve_neg); 313 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_constrain); 314 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_constrain_neg); 315 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_mlsconstrain); 316 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_mlsconstrain_neg); 317 318 SUITE_ADD_TEST(suite, test_cil_resolve_context); 319 SUITE_ADD_TEST(suite, test_cil_resolve_context_macro); 320 SUITE_ADD_TEST(suite, test_cil_resolve_context_macro_neg); 321 SUITE_ADD_TEST(suite, test_cil_resolve_context_namedrange); 322 SUITE_ADD_TEST(suite, test_cil_resolve_context_namedrange_neg); 323 SUITE_ADD_TEST(suite, test_cil_resolve_context_user_neg); 324 SUITE_ADD_TEST(suite, test_cil_resolve_context_role_neg); 325 SUITE_ADD_TEST(suite, test_cil_resolve_context_type_neg); 326 SUITE_ADD_TEST(suite, test_cil_resolve_context_anon_level_neg); 327 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_context); 328 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_context_neg); 329 330 SUITE_ADD_TEST(suite, test_cil_resolve_roletransition); 331 SUITE_ADD_TEST(suite, test_cil_resolve_roletransition_srcdecl_neg); 332 SUITE_ADD_TEST(suite, test_cil_resolve_roletransition_tgtdecl_neg); 333 SUITE_ADD_TEST(suite, test_cil_resolve_roletransition_resultdecl_neg); 334 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roletransition); 335 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roletransition_srcdecl_neg); 336 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roletransition_tgtdecl_neg); 337 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roletransition_resultdecl_neg); 338 339 SUITE_ADD_TEST(suite, test_cil_resolve_roleallow); 340 SUITE_ADD_TEST(suite, test_cil_resolve_roleallow_srcdecl_neg); 341 SUITE_ADD_TEST(suite, test_cil_resolve_roleallow_tgtdecl_neg); 342 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roleallow); 343 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roleallow_neg); 344 345 SUITE_ADD_TEST(suite, test_cil_resolve_classpermset_named); 346 SUITE_ADD_TEST(suite, test_cil_resolve_classpermset_named_namedpermlist); 347 SUITE_ADD_TEST(suite, test_cil_resolve_classpermset_named_permlist_neg); 348 SUITE_ADD_TEST(suite, test_cil_resolve_classpermset_named_unnamedcps_neg); 349 SUITE_ADD_TEST(suite, test_cil_resolve_classpermset_anon); 350 SUITE_ADD_TEST(suite, test_cil_resolve_classpermset_anon_namedpermlist); 351 SUITE_ADD_TEST(suite, test_cil_resolve_classpermset_anon_permlist_neg); 352 353 SUITE_ADD_TEST(suite, test_cil_resolve_avrule); 354 SUITE_ADD_TEST(suite, test_cil_resolve_avrule_permset); 355 SUITE_ADD_TEST(suite, test_cil_resolve_avrule_permset_neg); 356 SUITE_ADD_TEST(suite, test_cil_resolve_avrule_permset_permdne_neg); 357 SUITE_ADD_TEST(suite, test_cil_resolve_avrule_firsttype_neg); 358 SUITE_ADD_TEST(suite, test_cil_resolve_avrule_secondtype_neg); 359 SUITE_ADD_TEST(suite, test_cil_resolve_avrule_class_neg); 360 SUITE_ADD_TEST(suite, test_cil_resolve_avrule_perm_neg); 361 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_avrule); 362 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_avrule_src_nores_neg); 363 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_avrule_tgt_nores_neg); 364 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_avrule_class_nores_neg); 365 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_avrule_datum_null_neg); 366 367 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_transition); 368 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_transition_srcdecl_neg); 369 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_transition_tgtdecl_neg); 370 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_transition_objdecl_neg); 371 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_transition_resultdecl_neg); 372 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_type_rule_transition); 373 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_type_rule_transition_neg); 374 375 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_change); 376 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_change_srcdecl_neg); 377 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_change_tgtdecl_neg); 378 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_change_objdecl_neg); 379 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_change_resultdecl_neg); 380 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_type_rule_change); 381 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_type_rule_change_neg); 382 383 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_member); 384 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_member_srcdecl_neg); 385 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_member_tgtdecl_neg); 386 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_member_objdecl_neg); 387 SUITE_ADD_TEST(suite, test_cil_resolve_type_rule_member_resultdecl_neg); 388 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_type_rule_member); 389 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_type_rule_member_neg); 390 391 SUITE_ADD_TEST(suite, test_cil_resolve_filecon); 392 SUITE_ADD_TEST(suite, test_cil_resolve_filecon_neg); 393 SUITE_ADD_TEST(suite, test_cil_resolve_filecon_anon_context); 394 SUITE_ADD_TEST(suite, test_cil_resolve_filecon_anon_context_neg); 395 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_filecon); 396 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_filecon_neg); 397 398 SUITE_ADD_TEST(suite, test_cil_resolve_portcon); 399 SUITE_ADD_TEST(suite, test_cil_resolve_portcon_neg); 400 SUITE_ADD_TEST(suite, test_cil_resolve_portcon_anon_context); 401 SUITE_ADD_TEST(suite, test_cil_resolve_portcon_anon_context_neg); 402 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_portcon); 403 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_portcon_neg); 404 405 SUITE_ADD_TEST(suite, test_cil_resolve_genfscon); 406 SUITE_ADD_TEST(suite, test_cil_resolve_genfscon_neg); 407 SUITE_ADD_TEST(suite, test_cil_resolve_genfscon_anon_context); 408 SUITE_ADD_TEST(suite, test_cil_resolve_genfscon_anon_context_neg); 409 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_genfscon); 410 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_genfscon_neg); 411 412 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_ipv4); 413 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_ipv6); 414 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_anonipaddr_ipv4); 415 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_anonnetmask_ipv4); 416 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_anonipaddr_ipv6); 417 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_anonnetmask_ipv6); 418 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_diffipfam_neg); 419 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_context_neg); 420 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_ipaddr_neg); 421 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_netmask_neg); 422 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_anon_context); 423 SUITE_ADD_TEST(suite, test_cil_resolve_nodecon_anon_context_neg); 424 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_nodecon); 425 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_nodecon_ipaddr_neg); 426 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_nodecon_netmask_neg); 427 428 SUITE_ADD_TEST(suite, test_cil_resolve_netifcon); 429 SUITE_ADD_TEST(suite, test_cil_resolve_netifcon_otf_neg); 430 SUITE_ADD_TEST(suite, test_cil_resolve_netifcon_interface_neg); 431 SUITE_ADD_TEST(suite, test_cil_resolve_netifcon_unnamed); 432 SUITE_ADD_TEST(suite, test_cil_resolve_netifcon_unnamed_packet_neg); 433 SUITE_ADD_TEST(suite, test_cil_resolve_netifcon_unnamed_otf_neg); 434 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_netifcon); 435 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_netifcon_neg); 436 437 SUITE_ADD_TEST(suite, test_cil_resolve_pirqcon); 438 SUITE_ADD_TEST(suite, test_cil_resolve_pirqcon_context_neg); 439 SUITE_ADD_TEST(suite, test_cil_resolve_pirqcon_anon_context); 440 SUITE_ADD_TEST(suite, test_cil_resolve_pirqcon_anon_context_neg); 441 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_pirqcon); 442 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_pirqcon_neg); 443 444 SUITE_ADD_TEST(suite, test_cil_resolve_iomemcon); 445 SUITE_ADD_TEST(suite, test_cil_resolve_iomemcon_context_neg); 446 SUITE_ADD_TEST(suite, test_cil_resolve_iomemcon_anon_context); 447 SUITE_ADD_TEST(suite, test_cil_resolve_iomemcon_anon_context_neg); 448 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_iomemcon); 449 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_iomemcon_neg); 450 451 SUITE_ADD_TEST(suite, test_cil_resolve_ioportcon); 452 SUITE_ADD_TEST(suite, test_cil_resolve_ioportcon_context_neg); 453 SUITE_ADD_TEST(suite, test_cil_resolve_ioportcon_anon_context); 454 SUITE_ADD_TEST(suite, test_cil_resolve_ioportcon_anon_context_neg); 455 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_ioportcon); 456 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_ioportcon_neg); 457 458 SUITE_ADD_TEST(suite, test_cil_resolve_pcidevicecon); 459 SUITE_ADD_TEST(suite, test_cil_resolve_pcidevicecon_context_neg); 460 SUITE_ADD_TEST(suite, test_cil_resolve_pcidevicecon_anon_context); 461 SUITE_ADD_TEST(suite, test_cil_resolve_pcidevicecon_anon_context_neg); 462 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_pcidevicecon); 463 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_pcidevicecon_neg); 464 465 SUITE_ADD_TEST(suite, test_cil_resolve_fsuse); 466 SUITE_ADD_TEST(suite, test_cil_resolve_fsuse_neg); 467 SUITE_ADD_TEST(suite, test_cil_resolve_fsuse_anon); 468 SUITE_ADD_TEST(suite, test_cil_resolve_fsuse_anon_neg); 469 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_fsuse); 470 //SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_fsuse_neg); 471 472 SUITE_ADD_TEST(suite, test_cil_resolve_sidcontext); 473 SUITE_ADD_TEST(suite, test_cil_resolve_sidcontext_named_levels); 474 SUITE_ADD_TEST(suite, test_cil_resolve_sidcontext_named_context); 475 SUITE_ADD_TEST(suite, test_cil_resolve_sidcontext_named_context_wrongname_neg); 476 SUITE_ADD_TEST(suite, test_cil_resolve_sidcontext_named_context_invaliduser_neg); 477 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_sidcontext); 478 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_sidcontext_neg); 479 480 SUITE_ADD_TEST(suite, test_cil_resolve_blockinherit); 481 SUITE_ADD_TEST(suite, test_cil_resolve_blockinherit_blockstrdne_neg); 482 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_blockinherit); 483 484 SUITE_ADD_TEST(suite, test_cil_resolve_in_block); 485 SUITE_ADD_TEST(suite, test_cil_resolve_in_blockstrdne_neg); 486 SUITE_ADD_TEST(suite, test_cil_resolve_in_macro); 487 SUITE_ADD_TEST(suite, test_cil_resolve_in_optional); 488 489 //SUITE_ADD_TEST(suite, test_cil_resolve_call1_noparam); 490 SUITE_ADD_TEST(suite, test_cil_resolve_call1_type); 491 SUITE_ADD_TEST(suite, test_cil_resolve_call1_role); 492 SUITE_ADD_TEST(suite, test_cil_resolve_call1_user); 493 SUITE_ADD_TEST(suite, test_cil_resolve_call1_sens); 494 SUITE_ADD_TEST(suite, test_cil_resolve_call1_cat); 495 SUITE_ADD_TEST(suite, test_cil_resolve_call1_catset); 496 SUITE_ADD_TEST(suite, test_cil_resolve_call1_catset_anon); 497 SUITE_ADD_TEST(suite, test_cil_resolve_call1_catset_anon_neg); 498 SUITE_ADD_TEST(suite, test_cil_resolve_call1_class); 499 SUITE_ADD_TEST(suite, test_cil_resolve_call1_classmap); 500 SUITE_ADD_TEST(suite, test_cil_resolve_call1_permset); 501 SUITE_ADD_TEST(suite, test_cil_resolve_call1_permset_anon); 502 SUITE_ADD_TEST(suite, test_cil_resolve_call1_classpermset_named); 503 SUITE_ADD_TEST(suite, test_cil_resolve_call1_classpermset_anon); 504 SUITE_ADD_TEST(suite, test_cil_resolve_call1_classpermset_anon_neg); 505 SUITE_ADD_TEST(suite, test_cil_resolve_call1_level); 506 SUITE_ADD_TEST(suite, test_cil_resolve_call1_level_anon); 507 SUITE_ADD_TEST(suite, test_cil_resolve_call1_level_anon_neg); 508 SUITE_ADD_TEST(suite, test_cil_resolve_call1_ipaddr); 509 SUITE_ADD_TEST(suite, test_cil_resolve_call1_ipaddr_anon); 510 SUITE_ADD_TEST(suite, test_cil_resolve_call1_ipaddr_anon_neg); 511 SUITE_ADD_TEST(suite, test_cil_resolve_call1_unknown_neg); 512 SUITE_ADD_TEST(suite, test_cil_resolve_call1_unknowncall_neg); 513 SUITE_ADD_TEST(suite, test_cil_resolve_call1_extraargs_neg); 514 SUITE_ADD_TEST(suite, test_cil_resolve_call1_copy_dup); 515 SUITE_ADD_TEST(suite, test_cil_resolve_call1_missing_arg_neg); 516 SUITE_ADD_TEST(suite, test_cil_resolve_call1_paramsflavor_neg); 517 SUITE_ADD_TEST(suite, test_cil_resolve_call1_unknownflavor_neg); 518 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_call1); 519 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_call1_neg); 520 521 SUITE_ADD_TEST(suite, test_cil_resolve_call2_type); 522 SUITE_ADD_TEST(suite, test_cil_resolve_call2_role); 523 SUITE_ADD_TEST(suite, test_cil_resolve_call2_user); 524 SUITE_ADD_TEST(suite, test_cil_resolve_call2_sens); 525 SUITE_ADD_TEST(suite, test_cil_resolve_call2_cat); 526 SUITE_ADD_TEST(suite, test_cil_resolve_call2_catset); 527 SUITE_ADD_TEST(suite, test_cil_resolve_call2_catset_anon); 528 SUITE_ADD_TEST(suite, test_cil_resolve_call2_permset); 529 SUITE_ADD_TEST(suite, test_cil_resolve_call2_permset_anon); 530 SUITE_ADD_TEST(suite, test_cil_resolve_call2_classpermset_named); 531 SUITE_ADD_TEST(suite, test_cil_resolve_call2_classpermset_anon); 532 SUITE_ADD_TEST(suite, test_cil_resolve_call2_class); 533 SUITE_ADD_TEST(suite, test_cil_resolve_call2_classmap); 534 SUITE_ADD_TEST(suite, test_cil_resolve_call2_level); 535 SUITE_ADD_TEST(suite, test_cil_resolve_call2_level_anon); 536 SUITE_ADD_TEST(suite, test_cil_resolve_call2_ipaddr); 537 SUITE_ADD_TEST(suite, test_cil_resolve_call2_ipaddr_anon); 538 SUITE_ADD_TEST(suite, test_cil_resolve_call2_unknown_neg); 539 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_call2); 540 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_call2_neg); 541 542 SUITE_ADD_TEST(suite, test_cil_resolve_name_call_args); 543 SUITE_ADD_TEST(suite, test_cil_resolve_name_call_args_multipleparams); 544 SUITE_ADD_TEST(suite, test_cil_resolve_name_call_args_diffflavor); 545 SUITE_ADD_TEST(suite, test_cil_resolve_name_call_args_callnull_neg); 546 SUITE_ADD_TEST(suite, test_cil_resolve_name_call_args_namenull_neg); 547 //SUITE_ADD_TEST(suite, test_cil_resolve_name_call_args_callargsnull_neg); 548 SUITE_ADD_TEST(suite, test_cil_resolve_name_call_args_name_neg); 549 550 // SUITE_ADD_TEST(suite, test_cil_resolve_expr_stack_bools); 551 // SUITE_ADD_TEST(suite, test_cil_resolve_expr_stack_tunables); 552 // SUITE_ADD_TEST(suite, test_cil_resolve_expr_stack_type); 553 // SUITE_ADD_TEST(suite, test_cil_resolve_expr_stack_role); 554 // SUITE_ADD_TEST(suite, test_cil_resolve_expr_stack_user); 555 // SUITE_ADD_TEST(suite, test_cil_resolve_expr_stack_neg); 556 // SUITE_ADD_TEST(suite, test_cil_resolve_expr_stack_emptystr_neg); 557 558 SUITE_ADD_TEST(suite, test_cil_resolve_boolif); 559 SUITE_ADD_TEST(suite, test_cil_resolve_boolif_neg); 560 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_boolif); 561 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_boolif_neg); 562 563 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_and); 564 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_not); 565 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_or); 566 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_xor); 567 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_eq); 568 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_neq); 569 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_oper1); 570 SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_oper2); 571 //SUITE_ADD_TEST(suite, test_cil_evaluate_expr_stack_neg); 572 573 SUITE_ADD_TEST(suite, test_cil_resolve_tunif_false); 574 SUITE_ADD_TEST(suite, test_cil_resolve_tunif_true); 575 SUITE_ADD_TEST(suite, test_cil_resolve_tunif_resolveexpr_neg); 576 //SUITE_ADD_TEST(suite, test_cil_resolve_tunif_evaluateexpr_neg); 577 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_tunif); 578 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_tunif_neg); 579 580 SUITE_ADD_TEST(suite, test_cil_resolve_userbounds); 581 SUITE_ADD_TEST(suite, test_cil_resolve_userbounds_exists_neg); 582 SUITE_ADD_TEST(suite, test_cil_resolve_userbounds_user1_neg); 583 SUITE_ADD_TEST(suite, test_cil_resolve_userbounds_user2_neg); 584 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userbounds); 585 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userbounds_neg); 586 587 SUITE_ADD_TEST(suite, test_cil_resolve_roletype); 588 SUITE_ADD_TEST(suite, test_cil_resolve_roletype_type_neg); 589 SUITE_ADD_TEST(suite, test_cil_resolve_roletype_role_neg); 590 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roletype); 591 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roletype_role_neg); 592 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_roletype_type_neg); 593 594 SUITE_ADD_TEST(suite, test_cil_resolve_userrole); 595 SUITE_ADD_TEST(suite, test_cil_resolve_userrole_user_neg); 596 SUITE_ADD_TEST(suite, test_cil_resolve_userrole_role_neg); 597 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userrole); 598 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userrole_user_neg); 599 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userrole_role_neg); 600 601 SUITE_ADD_TEST(suite, test_cil_resolve_userlevel); 602 SUITE_ADD_TEST(suite, test_cil_resolve_userlevel_macro); 603 SUITE_ADD_TEST(suite, test_cil_resolve_userlevel_macro_neg); 604 SUITE_ADD_TEST(suite, test_cil_resolve_userlevel_level_anon); 605 SUITE_ADD_TEST(suite, test_cil_resolve_userlevel_level_anon_neg); 606 SUITE_ADD_TEST(suite, test_cil_resolve_userlevel_user_neg); 607 SUITE_ADD_TEST(suite, test_cil_resolve_userlevel_level_neg); 608 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userlevel); 609 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userlevel_neg); 610 611 SUITE_ADD_TEST(suite, test_cil_resolve_userrange); 612 SUITE_ADD_TEST(suite, test_cil_resolve_userrange_macro); 613 SUITE_ADD_TEST(suite, test_cil_resolve_userrange_macro_neg); 614 SUITE_ADD_TEST(suite, test_cil_resolve_userrange_range_anon); 615 SUITE_ADD_TEST(suite, test_cil_resolve_userrange_range_anon_neg); 616 SUITE_ADD_TEST(suite, test_cil_resolve_userrange_user_neg); 617 SUITE_ADD_TEST(suite, test_cil_resolve_userrange_range_neg); 618 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userrange); 619 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_userrange_neg); 620 621 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_optional_enabled); 622 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_optional_disabled); 623 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_block); 624 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_user); 625 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_role); 626 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_type); 627 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_typealias); 628 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_common); 629 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_class); 630 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_bool); 631 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_sens); 632 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_cat); 633 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_catset); 634 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_sid); 635 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_macro); 636 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_context); 637 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_level); 638 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_policycap); 639 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_perm); 640 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_catalias); 641 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_sensalias); 642 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_tunable); 643 SUITE_ADD_TEST(suite, test_cil_disable_children_helper_unknown); 644 645 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_callstack); 646 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_call); 647 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_optional); 648 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_macro); 649 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_optstack); 650 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_optstack_tunable_neg); 651 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_optstack_macro_neg); 652 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_nodenull_neg); 653 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_extraargsnull_neg); 654 SUITE_ADD_TEST(suite, test_cil_resolve_ast_node_helper_optfailedtoresolve); 655 656 return suite; 657 } 658 659 CuSuite* CilTreeGetBuildSuite(void) { 660 CuSuite* suite = CuSuiteNew(); 661 662 /* test_cil_build_ast.c */ 663 SUITE_ADD_TEST(suite, test_cil_build_ast); 664 SUITE_ADD_TEST(suite, test_cil_build_ast_dbnull_neg); 665 SUITE_ADD_TEST(suite, test_cil_build_ast_astnull_neg); 666 SUITE_ADD_TEST(suite, test_cil_build_ast_treenull_neg); 667 SUITE_ADD_TEST(suite, test_cil_build_ast_suberr_neg); 668 669 SUITE_ADD_TEST(suite, test_cil_parse_to_list); 670 SUITE_ADD_TEST(suite, test_cil_parse_to_list_currnull_neg); 671 SUITE_ADD_TEST(suite, test_cil_parse_to_list_listnull_neg); 672 673 SUITE_ADD_TEST(suite, test_cil_set_to_list); 674 SUITE_ADD_TEST(suite, test_cil_set_to_list_listnull_neg); 675 SUITE_ADD_TEST(suite, test_cil_set_to_list_tree_node_null_neg); 676 SUITE_ADD_TEST(suite, test_cil_set_to_list_cl_head_null_neg); 677 678 SUITE_ADD_TEST(suite, test_cil_gen_block); 679 SUITE_ADD_TEST(suite, test_cil_gen_block_justblock_neg); 680 SUITE_ADD_TEST(suite, test_cil_gen_block_noname_neg); 681 SUITE_ADD_TEST(suite, test_cil_gen_block_dbnull_neg); 682 SUITE_ADD_TEST(suite, test_cil_gen_block_treenull_neg); 683 SUITE_ADD_TEST(suite, test_cil_gen_block_nodenull_neg); 684 SUITE_ADD_TEST(suite, test_cil_gen_block_nodeparentnull_neg); 685 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_block); 686 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_block_neg); 687 688 SUITE_ADD_TEST(suite, test_cil_gen_blockinherit); 689 SUITE_ADD_TEST(suite, test_cil_gen_blockinherit_namelist_neg); 690 SUITE_ADD_TEST(suite, test_cil_gen_blockinherit_namenull_neg); 691 SUITE_ADD_TEST(suite, test_cil_gen_blockinherit_extra_neg); 692 SUITE_ADD_TEST(suite, test_cil_gen_blockinherit_dbnull_neg); 693 SUITE_ADD_TEST(suite, test_cil_gen_blockinherit_currnull_neg); 694 SUITE_ADD_TEST(suite, test_cil_gen_blockinherit_astnull_neg); 695 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_blockinherit); 696 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_blockinherit_neg); 697 698 SUITE_ADD_TEST(suite, test_cil_gen_perm); 699 SUITE_ADD_TEST(suite, test_cil_gen_perm_dbnull_neg); 700 SUITE_ADD_TEST(suite, test_cil_gen_perm_currnull_neg); 701 SUITE_ADD_TEST(suite, test_cil_gen_perm_astnull_neg); 702 SUITE_ADD_TEST(suite, test_cil_gen_perm_nodenull_neg); 703 704 SUITE_ADD_TEST(suite, test_cil_gen_permset); 705 SUITE_ADD_TEST(suite, test_cil_gen_permset_noname_neg); 706 SUITE_ADD_TEST(suite, test_cil_gen_permset_nameinparens_neg); 707 SUITE_ADD_TEST(suite, test_cil_gen_permset_noperms_neg); 708 SUITE_ADD_TEST(suite, test_cil_gen_permset_emptyperms_neg); 709 SUITE_ADD_TEST(suite, test_cil_gen_permset_extra_neg); 710 SUITE_ADD_TEST(suite, test_cil_gen_permset_dbnull_neg); 711 SUITE_ADD_TEST(suite, test_cil_gen_permset_currnull_neg); 712 SUITE_ADD_TEST(suite, test_cil_gen_permset_astnull_neg); 713 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_permset); 714 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_permset_neg); 715 716 SUITE_ADD_TEST(suite, test_cil_gen_perm_nodes); 717 SUITE_ADD_TEST(suite, test_cil_gen_perm_nodes_failgen_neg); 718 719 SUITE_ADD_TEST(suite, test_cil_fill_permset); 720 SUITE_ADD_TEST(suite, test_cil_fill_permset_sublist_neg); 721 SUITE_ADD_TEST(suite, test_cil_fill_permset_startpermnull_neg); 722 SUITE_ADD_TEST(suite, test_cil_fill_permset_permsetnull_neg); 723 724 SUITE_ADD_TEST(suite, test_cil_gen_in); 725 SUITE_ADD_TEST(suite, test_cil_gen_in_blockstrnull_neg); 726 SUITE_ADD_TEST(suite, test_cil_gen_in_extra_neg); 727 SUITE_ADD_TEST(suite, test_cil_gen_in_dbnull_neg); 728 SUITE_ADD_TEST(suite, test_cil_gen_in_currnull_neg); 729 SUITE_ADD_TEST(suite, test_cil_gen_in_astnull_neg); 730 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_in); 731 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_in_neg); 732 733 SUITE_ADD_TEST(suite, test_cil_gen_class); 734 SUITE_ADD_TEST(suite, test_cil_gen_class_noname_neg); 735 SUITE_ADD_TEST(suite, test_cil_gen_class_nodenull_neg); 736 SUITE_ADD_TEST(suite, test_cil_gen_class_dbnull_neg); 737 SUITE_ADD_TEST(suite, test_cil_gen_class_currnull_neg); 738 SUITE_ADD_TEST(suite, test_cil_gen_class_noclassname_neg); 739 SUITE_ADD_TEST(suite, test_cil_gen_class_namesublist_neg); 740 SUITE_ADD_TEST(suite, test_cil_gen_class_noperms); 741 SUITE_ADD_TEST(suite, test_cil_gen_class_permsnotinlist_neg); 742 SUITE_ADD_TEST(suite, test_cil_gen_class_extrapermlist_neg); 743 SUITE_ADD_TEST(suite, test_cil_gen_class_listinlist_neg); 744 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_class); 745 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_class_neg); 746 747 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_anonperms); 748 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_anonperms_neg); 749 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_namedperms); 750 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_extra_neg); 751 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_emptypermslist_neg); 752 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_noperms_neg); 753 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_noclass_neg); 754 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_classnodenull_neg); 755 SUITE_ADD_TEST(suite, test_cil_fill_classpermset_cpsnull_neg); 756 757 SUITE_ADD_TEST(suite, test_cil_gen_classpermset); 758 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_noname_neg); 759 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_nameinparens_neg); 760 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_noclass_neg); 761 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_noperms_neg); 762 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_emptyperms_neg); 763 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_extra_neg); 764 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_dbnull_neg); 765 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_currnull_neg); 766 SUITE_ADD_TEST(suite, test_cil_gen_classpermset_astnull_neg); 767 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_classpermset); 768 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_classpermset_neg); 769 770 SUITE_ADD_TEST(suite, test_cil_gen_classmap_perm); 771 SUITE_ADD_TEST(suite, test_cil_gen_classmap_perm_dupeperm_neg); 772 SUITE_ADD_TEST(suite, test_cil_gen_classmap_perm_dbnull_neg); 773 SUITE_ADD_TEST(suite, test_cil_gen_classmap_perm_currnull_neg); 774 SUITE_ADD_TEST(suite, test_cil_gen_classmap_perm_astnull_neg); 775 776 SUITE_ADD_TEST(suite, test_cil_gen_classmap); 777 SUITE_ADD_TEST(suite, test_cil_gen_classmap_extra_neg); 778 SUITE_ADD_TEST(suite, test_cil_gen_classmap_noname_neg); 779 SUITE_ADD_TEST(suite, test_cil_gen_classmap_emptyperms_neg); 780 SUITE_ADD_TEST(suite, test_cil_gen_classmap_dbnull_neg); 781 SUITE_ADD_TEST(suite, test_cil_gen_classmap_currnull_neg); 782 SUITE_ADD_TEST(suite, test_cil_gen_classmap_astnull_neg); 783 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_classmap); 784 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_classmap_neg); 785 786 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_anonpermset); 787 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_anonpermset_neg); 788 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_namedpermset); 789 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_noclassmapname_neg); 790 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_noclassmapperm_neg); 791 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_nopermissionsets_neg); 792 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_dbnull_neg); 793 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_currnull_neg); 794 SUITE_ADD_TEST(suite, test_cil_gen_classmapping_astnull_neg); 795 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_classmapping); 796 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_classmapping_neg); 797 798 SUITE_ADD_TEST(suite, test_cil_gen_common); 799 SUITE_ADD_TEST(suite, test_cil_gen_common_dbnull_neg); 800 SUITE_ADD_TEST(suite, test_cil_gen_common_currnull_neg); 801 SUITE_ADD_TEST(suite, test_cil_gen_common_astnull_neg); 802 SUITE_ADD_TEST(suite, test_cil_gen_common_noname_neg); 803 SUITE_ADD_TEST(suite, test_cil_gen_common_twoperms_neg); 804 SUITE_ADD_TEST(suite, test_cil_gen_common_permsublist_neg); 805 SUITE_ADD_TEST(suite, test_cil_gen_common_noperms_neg); 806 807 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_common); 808 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_common_neg); 809 810 SUITE_ADD_TEST(suite, test_cil_gen_sid); 811 SUITE_ADD_TEST(suite, test_cil_gen_sid_noname_neg); 812 SUITE_ADD_TEST(suite, test_cil_gen_sid_nameinparens_neg); 813 SUITE_ADD_TEST(suite, test_cil_gen_sid_extra_neg); 814 SUITE_ADD_TEST(suite, test_cil_gen_sid_dbnull_neg); 815 SUITE_ADD_TEST(suite, test_cil_gen_sid_currnull_neg); 816 SUITE_ADD_TEST(suite, test_cil_gen_sid_astnull_neg); 817 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sid); 818 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sid_neg); 819 820 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext); 821 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_namedcontext); 822 // SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_halfcontext_neg); 823 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_noname_neg); 824 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_empty_neg); 825 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_nocontext_neg); 826 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_dblname_neg); 827 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_dbnull_neg); 828 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_pcurrnull_neg); 829 SUITE_ADD_TEST(suite, test_cil_gen_sidcontext_astnodenull_neg); 830 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sidcontext); 831 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sidcontext_neg); 832 833 SUITE_ADD_TEST(suite, test_cil_gen_type); 834 SUITE_ADD_TEST(suite, test_cil_gen_type_dbnull_neg); 835 SUITE_ADD_TEST(suite, test_cil_gen_type_currnull_neg); 836 SUITE_ADD_TEST(suite, test_cil_gen_type_astnull_neg); 837 SUITE_ADD_TEST(suite, test_cil_gen_type_extra_neg); 838 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type); 839 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type_neg); 840 841 SUITE_ADD_TEST(suite, test_cil_gen_typeattribute); 842 SUITE_ADD_TEST(suite, test_cil_gen_typeattribute_dbnull_neg); 843 SUITE_ADD_TEST(suite, test_cil_gen_typeattribute_currnull_neg); 844 SUITE_ADD_TEST(suite, test_cil_gen_typeattribute_astnull_neg); 845 SUITE_ADD_TEST(suite, test_cil_gen_typeattribute_extra_neg); 846 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typeattribute); 847 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typeattribute_neg); 848 849 SUITE_ADD_TEST(suite, test_cil_gen_typebounds); 850 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_notype1_neg); 851 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_type1inparens_neg); 852 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_notype2_neg); 853 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_type2inparens_neg); 854 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_extra_neg); 855 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_dbnull_neg); 856 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_currnull_neg); 857 SUITE_ADD_TEST(suite, test_cil_gen_typebounds_astnull_neg); 858 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typebounds); 859 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typebounds_neg); 860 861 SUITE_ADD_TEST(suite, test_cil_gen_typepermissive); 862 SUITE_ADD_TEST(suite, test_cil_gen_typepermissive_noname_neg); 863 SUITE_ADD_TEST(suite, test_cil_gen_typepermissive_typeinparens_neg); 864 SUITE_ADD_TEST(suite, test_cil_gen_typepermissive_extra_neg); 865 SUITE_ADD_TEST(suite, test_cil_gen_typepermissive_dbnull_neg); 866 SUITE_ADD_TEST(suite, test_cil_gen_typepermissive_currnull_neg); 867 SUITE_ADD_TEST(suite, test_cil_gen_typepermissive_astnull_neg); 868 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typepermissive); 869 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typepermissive_neg); 870 871 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition); 872 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_nostr_neg); 873 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_strinparens_neg); 874 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_nosrc_neg); 875 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_srcinparens_neg); 876 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_notgt_neg); 877 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_tgtinparens_neg); 878 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_noclass_neg); 879 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_classinparens_neg); 880 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_nodest_neg); 881 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_destinparens_neg); 882 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_extra_neg); 883 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_dbnull_neg); 884 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_currnull_neg); 885 SUITE_ADD_TEST(suite, test_cil_gen_nametypetransition_astnull_neg); 886 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_nametypetransition); 887 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_nametypetransition_neg); 888 889 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition); 890 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_namedtransition); 891 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_anon_low_l); 892 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_anon_low_l_neg); 893 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_anon_high_l); 894 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_anon_high_l_neg); 895 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_dbnull_neg); 896 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_currnull_neg); 897 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_astnull_neg); 898 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_nofirsttype_neg); 899 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_firsttype_inparens_neg); 900 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_nosecondtype_neg); 901 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_secondtype_inparens_neg); 902 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_noclass_neg); 903 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_class_inparens_neg); 904 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_nolevel_l_neg); 905 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_nolevel_h_neg); 906 SUITE_ADD_TEST(suite, test_cil_gen_rangetransition_extra_neg); 907 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_rangetransition); 908 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_rangetransition_neg); 909 910 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_and); 911 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_or); 912 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_xor); 913 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_not); 914 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_not_noexpr_neg); 915 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_not_extraexpr_neg); 916 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_eq); 917 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_neq); 918 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_nested); 919 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_nested_neg); 920 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_nested_emptyargs_neg); 921 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_nested_missingoperator_neg); 922 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_arg1null_neg); 923 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_arg2null_neg); 924 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_extraarg_neg); 925 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_currnull_neg); 926 SUITE_ADD_TEST(suite, test_cil_gen_expr_stack_stacknull_neg); 927 928 SUITE_ADD_TEST(suite, test_cil_gen_boolif_multiplebools_true); 929 SUITE_ADD_TEST(suite, test_cil_gen_boolif_multiplebools_false); 930 SUITE_ADD_TEST(suite, test_cil_gen_boolif_multiplebools_unknowncond_neg); 931 SUITE_ADD_TEST(suite, test_cil_gen_boolif_true); 932 SUITE_ADD_TEST(suite, test_cil_gen_boolif_false); 933 SUITE_ADD_TEST(suite, test_cil_gen_boolif_unknowncond_neg); 934 SUITE_ADD_TEST(suite, test_cil_gen_boolif_nested); 935 SUITE_ADD_TEST(suite, test_cil_gen_boolif_nested_neg); 936 SUITE_ADD_TEST(suite, test_cil_gen_boolif_extra_neg); 937 SUITE_ADD_TEST(suite, test_cil_gen_boolif_extra_parens_neg); 938 SUITE_ADD_TEST(suite, test_cil_gen_boolif_nocond); 939 SUITE_ADD_TEST(suite, test_cil_gen_boolif_neg); 940 SUITE_ADD_TEST(suite, test_cil_gen_boolif_dbnull_neg); 941 SUITE_ADD_TEST(suite, test_cil_gen_boolif_currnull_neg); 942 SUITE_ADD_TEST(suite, test_cil_gen_boolif_astnull_neg); 943 SUITE_ADD_TEST(suite, test_cil_gen_boolif_nocond_neg); 944 SUITE_ADD_TEST(suite, test_cil_gen_boolif_notruelist_neg); 945 SUITE_ADD_TEST(suite, test_cil_gen_boolif_empty_cond_neg); 946 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_boolif); 947 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_boolif_neg); 948 949 SUITE_ADD_TEST(suite, test_cil_gen_tunif_multiplebools_true); 950 SUITE_ADD_TEST(suite, test_cil_gen_tunif_multiplebools_false); 951 SUITE_ADD_TEST(suite, test_cil_gen_tunif_multiplebools_unknowncond_neg); 952 SUITE_ADD_TEST(suite, test_cil_gen_tunif_true); 953 SUITE_ADD_TEST(suite, test_cil_gen_tunif_false); 954 SUITE_ADD_TEST(suite, test_cil_gen_tunif_unknowncond_neg); 955 SUITE_ADD_TEST(suite, test_cil_gen_tunif_nocond); 956 SUITE_ADD_TEST(suite, test_cil_gen_tunif_nested); 957 SUITE_ADD_TEST(suite, test_cil_gen_tunif_nested_neg); 958 SUITE_ADD_TEST(suite, test_cil_gen_tunif_extra_neg); 959 SUITE_ADD_TEST(suite, test_cil_gen_tunif_extra_parens_neg); 960 SUITE_ADD_TEST(suite, test_cil_gen_tunif_neg); 961 SUITE_ADD_TEST(suite, test_cil_gen_tunif_dbnull_neg); 962 SUITE_ADD_TEST(suite, test_cil_gen_tunif_currnull_neg); 963 SUITE_ADD_TEST(suite, test_cil_gen_tunif_astnull_neg); 964 SUITE_ADD_TEST(suite, test_cil_gen_tunif_nocond_neg); 965 SUITE_ADD_TEST(suite, test_cil_gen_tunif_notruelist_neg); 966 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_tunif); 967 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_tunif_neg); 968 969 SUITE_ADD_TEST(suite, test_cil_gen_condblock_true); 970 SUITE_ADD_TEST(suite, test_cil_gen_condblock_false); 971 SUITE_ADD_TEST(suite, test_cil_gen_condblock_dbnull_neg); 972 SUITE_ADD_TEST(suite, test_cil_gen_condblock_currnull_neg); 973 SUITE_ADD_TEST(suite, test_cil_gen_condblock_astnull_neg); 974 SUITE_ADD_TEST(suite, test_cil_gen_condblock_nocond_neg); 975 SUITE_ADD_TEST(suite, test_cil_gen_condblock_extra_neg); 976 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_condblock_true); 977 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_condblock_true_neg); 978 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_condblock_false); 979 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_condblock_false_neg); 980 981 SUITE_ADD_TEST(suite, test_cil_gen_typealias); 982 SUITE_ADD_TEST(suite, test_cil_gen_typealias_incomplete_neg); 983 SUITE_ADD_TEST(suite, test_cil_gen_typealias_incomplete_neg2); 984 SUITE_ADD_TEST(suite, test_cil_gen_typealias_extratype_neg); 985 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typealias); 986 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typealias_notype_neg); 987 SUITE_ADD_TEST(suite, test_cil_gen_typealias_dbnull_neg); 988 SUITE_ADD_TEST(suite, test_cil_gen_typealias_currnull_neg); 989 SUITE_ADD_TEST(suite, test_cil_gen_typealias_astnull_neg); 990 991 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset); 992 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_and_two_types); 993 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_not); 994 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_exclude_attr); 995 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_exclude_neg); 996 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_dbnull_neg); 997 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_currnull_neg); 998 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_astnull_neg); 999 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_noname_neg); 1000 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_nameinparens_neg); 1001 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_emptylists_neg); 1002 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_listinparens_neg); 1003 SUITE_ADD_TEST(suite, test_cil_gen_typeattributeset_extra_neg); 1004 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typeattributeset); 1005 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_typeattributeset_neg); 1006 1007 SUITE_ADD_TEST(suite, test_cil_gen_userbounds); 1008 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_notype1_neg); 1009 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_type1_inparens_neg); 1010 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_notype2_neg); 1011 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_type2_inparens_neg); 1012 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_extra_neg); 1013 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_dbnull_neg); 1014 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_currnull_neg); 1015 SUITE_ADD_TEST(suite, test_cil_gen_userbounds_astnull_neg); 1016 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userbounds); 1017 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userbounds_neg); 1018 1019 SUITE_ADD_TEST(suite, test_cil_gen_role); 1020 SUITE_ADD_TEST(suite, test_cil_gen_role_dbnull_neg); 1021 SUITE_ADD_TEST(suite, test_cil_gen_role_currnull_neg); 1022 SUITE_ADD_TEST(suite, test_cil_gen_role_astnull_neg); 1023 SUITE_ADD_TEST(suite, test_cil_gen_role_extrarole_neg); 1024 SUITE_ADD_TEST(suite, test_cil_gen_role_noname_neg); 1025 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_role); 1026 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_role_neg); 1027 1028 SUITE_ADD_TEST(suite, test_cil_gen_roletransition); 1029 SUITE_ADD_TEST(suite, test_cil_gen_roletransition_currnull_neg); 1030 SUITE_ADD_TEST(suite, test_cil_gen_roletransition_astnull_neg); 1031 SUITE_ADD_TEST(suite, test_cil_gen_roletransition_srcnull_neg); 1032 SUITE_ADD_TEST(suite, test_cil_gen_roletransition_tgtnull_neg); 1033 SUITE_ADD_TEST(suite, test_cil_gen_roletransition_resultnull_neg); 1034 SUITE_ADD_TEST(suite, test_cil_gen_roletransition_extra_neg); 1035 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_roletransition); 1036 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_roletransition_neg); 1037 1038 SUITE_ADD_TEST(suite, test_cil_gen_bool_true); 1039 SUITE_ADD_TEST(suite, test_cil_gen_bool_tunable_true); 1040 SUITE_ADD_TEST(suite, test_cil_gen_bool_false); 1041 SUITE_ADD_TEST(suite, test_cil_gen_bool_tunable_false); 1042 SUITE_ADD_TEST(suite, test_cil_gen_bool_none_neg); 1043 SUITE_ADD_TEST(suite, test_cil_gen_bool_dbnull_neg); 1044 SUITE_ADD_TEST(suite, test_cil_gen_bool_currnull_neg); 1045 SUITE_ADD_TEST(suite, test_cil_gen_bool_astnull_neg); 1046 SUITE_ADD_TEST(suite, test_cil_gen_bool_notbool_neg); 1047 SUITE_ADD_TEST(suite, test_cil_gen_bool_boolname_neg); 1048 SUITE_ADD_TEST(suite, test_cil_gen_bool_extraname_false_neg); 1049 SUITE_ADD_TEST(suite, test_cil_gen_bool_extraname_true_neg); 1050 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_bool); 1051 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_bool_neg); 1052 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_bool_tunable); 1053 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_bool_tunable_neg); 1054 1055 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_t1type); 1056 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_t1t1_neg); 1057 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_t2type); 1058 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_t2t2_neg); 1059 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_r1role); 1060 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_r1r1_neg); 1061 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_r2role); 1062 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_r2r2_neg); 1063 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_t1t2); 1064 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_r1r2); 1065 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_r1r2); 1066 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_u1u2); 1067 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_u1user); 1068 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_u1u1_neg); 1069 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_u2user); 1070 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_u2u2_neg); 1071 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_l2h2); 1072 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_l2_neg); 1073 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_l1l2); 1074 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_l1h1); 1075 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_l1h2); 1076 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_h1l2); 1077 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_h1h2); 1078 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_h1_neg); 1079 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_l1l1_neg); 1080 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_l1l2_constrain_neg); 1081 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_l1l2_constrain_neg); 1082 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_leftkeyword_neg); 1083 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_noexpr1_neg); 1084 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_expr1inparens_neg); 1085 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_noexpr2_neg); 1086 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_expr2inparens_neg); 1087 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq_extraexpr_neg); 1088 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2); 1089 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_noexpr1_neg); 1090 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_expr1inparens_neg); 1091 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_noexpr2_neg); 1092 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_expr2inparens_neg); 1093 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_eq2_extraexpr_neg); 1094 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_noteq); 1095 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_noteq_noexpr1_neg); 1096 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_noteq_expr1inparens_neg); 1097 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_noteq_noexpr2_neg); 1098 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_noteq_expr2inparens_neg); 1099 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_noteq_extraexpr_neg); 1100 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_not); 1101 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_not_noexpr_neg); 1102 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_not_emptyparens_neg); 1103 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_not_extraparens_neg); 1104 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_or); 1105 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_or_neg); 1106 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_or_noexpr_neg); 1107 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_or_emptyfirstparens_neg); 1108 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_or_missingsecondexpr_neg); 1109 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_or_emptysecondparens_neg); 1110 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_or_extraexpr_neg); 1111 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_and); 1112 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_and_neg); 1113 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_and_noexpr_neg); 1114 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_and_emptyfirstparens_neg); 1115 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_and_missingsecondexpr_neg); 1116 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_and_emptysecondparens_neg); 1117 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_and_extraexpr_neg); 1118 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_dom); 1119 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_dom_noexpr1_neg); 1120 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_dom_expr1inparens_neg); 1121 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_dom_noexpr2_neg); 1122 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_dom_expr2inparens_neg); 1123 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_dom_extraexpr_neg); 1124 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_domby); 1125 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_domby_noexpr1_neg); 1126 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_domby_expr1inparens_neg); 1127 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_domby_noexpr2_neg); 1128 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_domby_expr2inparens_neg); 1129 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_domby_extraexpr_neg); 1130 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_incomp); 1131 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_incomp_noexpr1_neg); 1132 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_incomp_expr1inparens_neg); 1133 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_incomp_noexpr2_neg); 1134 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_incomp_expr2inparens_neg); 1135 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_incomp_extraexpr_neg); 1136 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_currnull_neg); 1137 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_stacknull_neg); 1138 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_operatorinparens_neg); 1139 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expr_stack_incorrectcall_neg); 1140 1141 SUITE_ADD_TEST(suite, test_cil_gen_roleallow); 1142 SUITE_ADD_TEST(suite, test_cil_gen_roleallow_dbnull_neg); 1143 SUITE_ADD_TEST(suite, test_cil_gen_roleallow_currnull_neg); 1144 SUITE_ADD_TEST(suite, test_cil_gen_roleallow_astnull_neg); 1145 SUITE_ADD_TEST(suite, test_cil_gen_roleallow_srcnull_neg); 1146 SUITE_ADD_TEST(suite, test_cil_gen_roleallow_tgtnull_neg); 1147 SUITE_ADD_TEST(suite, test_cil_gen_roleallow_extra_neg); 1148 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_roleallow); 1149 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_roleallow_neg); 1150 1151 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds); 1152 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_norole1_neg); 1153 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_role1_inparens_neg); 1154 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_norole2_neg); 1155 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_role2_inparens_neg); 1156 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_extra_neg); 1157 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_dbnull_neg); 1158 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_currnull_neg); 1159 SUITE_ADD_TEST(suite, test_cil_gen_rolebounds_astnull_neg); 1160 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_rolebounds); 1161 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_rolebounds_neg); 1162 1163 SUITE_ADD_TEST(suite, test_cil_gen_avrule); 1164 SUITE_ADD_TEST(suite, test_cil_gen_avrule_permset); 1165 SUITE_ADD_TEST(suite, test_cil_gen_avrule_permset_anon); 1166 SUITE_ADD_TEST(suite, test_cil_gen_avrule_extra_neg); 1167 SUITE_ADD_TEST(suite, test_cil_gen_avrule_sourceparens); 1168 SUITE_ADD_TEST(suite, test_cil_gen_avrule_sourceemptyparen_neg); 1169 SUITE_ADD_TEST(suite, test_cil_gen_avrule_targetparens); 1170 SUITE_ADD_TEST(suite, test_cil_gen_avrule_targetemptyparen_neg); 1171 SUITE_ADD_TEST(suite, test_cil_gen_avrule_currnull_neg); 1172 SUITE_ADD_TEST(suite, test_cil_gen_avrule_astnull_neg); 1173 SUITE_ADD_TEST(suite, test_cil_gen_avrule_sourcedomainnull_neg); 1174 SUITE_ADD_TEST(suite, test_cil_gen_avrule_targetdomainnull_neg); 1175 SUITE_ADD_TEST(suite, test_cil_gen_avrule_objectclassnull_neg); 1176 SUITE_ADD_TEST(suite, test_cil_gen_avrule_permsnull_neg); 1177 SUITE_ADD_TEST(suite, test_cil_gen_avrule_twolists_neg); 1178 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_allow); 1179 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_allow_neg); 1180 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_auditallow); 1181 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_auditallow_neg); 1182 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_dontaudit); 1183 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_dontaudit_neg); 1184 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_neverallow); 1185 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_avrule_neverallow_neg); 1186 1187 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition); 1188 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition_currnull_neg); 1189 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition_astnull_neg); 1190 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition_srcnull_neg); 1191 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition_tgtnull_neg); 1192 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition_objnull_neg); 1193 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition_resultnull_neg); 1194 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_transition_extra_neg); 1195 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type_rule_transition); 1196 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type_rule_transition_neg); 1197 1198 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change); 1199 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change_currnull_neg); 1200 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change_astnull_neg); 1201 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change_srcnull_neg); 1202 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change_tgtnull_neg); 1203 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change_objnull_neg); 1204 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change_resultnull_neg); 1205 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_change_extra_neg); 1206 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type_rule_change); 1207 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type_rule_change_neg); 1208 1209 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member); 1210 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_extra_neg); 1211 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_currnull_neg); 1212 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_astnull_neg); 1213 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_srcnull_neg); 1214 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_tgtnull_neg); 1215 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_objnull_neg); 1216 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_resultnull_neg); 1217 SUITE_ADD_TEST(suite, test_cil_gen_type_rule_member_extra_neg); 1218 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type_rule_member); 1219 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_type_rule_member_neg); 1220 1221 SUITE_ADD_TEST(suite, test_cil_gen_user); 1222 SUITE_ADD_TEST(suite, test_cil_gen_user_dbnull_neg); 1223 SUITE_ADD_TEST(suite, test_cil_gen_user_currnull_neg); 1224 SUITE_ADD_TEST(suite, test_cil_gen_user_astnull_neg); 1225 SUITE_ADD_TEST(suite, test_cil_gen_user_nouser_neg); 1226 SUITE_ADD_TEST(suite, test_cil_gen_user_xsinfo_neg); 1227 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_user); 1228 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_user_neg); 1229 1230 SUITE_ADD_TEST(suite, test_cil_gen_userlevel); 1231 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_anon_level); 1232 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_anon_level_neg); 1233 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_usernull_neg); 1234 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_userrange_neg); 1235 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_levelnull_neg); 1236 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_levelrangeempty_neg); 1237 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_extra_neg); 1238 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_dbnull_neg); 1239 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_currnull_neg); 1240 SUITE_ADD_TEST(suite, test_cil_gen_userlevel_astnull_neg); 1241 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userlevel); 1242 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userlevel_neg); 1243 1244 SUITE_ADD_TEST(suite, test_cil_gen_userrange_named); 1245 SUITE_ADD_TEST(suite, test_cil_gen_userrange_anon); 1246 SUITE_ADD_TEST(suite, test_cil_gen_userrange_usernull_neg); 1247 SUITE_ADD_TEST(suite, test_cil_gen_userrange_anonuser_neg); 1248 SUITE_ADD_TEST(suite, test_cil_gen_userrange_rangenamenull_neg); 1249 SUITE_ADD_TEST(suite, test_cil_gen_userrange_anonrangeinvalid_neg); 1250 SUITE_ADD_TEST(suite, test_cil_gen_userrange_anonrangeempty_neg); 1251 SUITE_ADD_TEST(suite, test_cil_gen_userrange_extra_neg); 1252 SUITE_ADD_TEST(suite, test_cil_gen_userrange_dbnull_neg); 1253 SUITE_ADD_TEST(suite, test_cil_gen_userrange_currnull_neg); 1254 SUITE_ADD_TEST(suite, test_cil_gen_userrange_astnull_neg); 1255 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userrange); 1256 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userrange_neg); 1257 1258 SUITE_ADD_TEST(suite, test_cil_gen_sensitivity); 1259 SUITE_ADD_TEST(suite, test_cil_gen_sensitivity_dbnull_neg); 1260 SUITE_ADD_TEST(suite, test_cil_gen_sensitivity_currnull_neg); 1261 SUITE_ADD_TEST(suite, test_cil_gen_sensitivity_astnull_neg); 1262 SUITE_ADD_TEST(suite, test_cil_gen_sensitivity_sensnull_neg); 1263 SUITE_ADD_TEST(suite, test_cil_gen_sensitivity_senslist_neg); 1264 SUITE_ADD_TEST(suite, test_cil_gen_sensitivity_extra_neg); 1265 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sensitivity); 1266 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sensitivity_neg); 1267 1268 SUITE_ADD_TEST(suite, test_cil_gen_sensalias); 1269 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_dbnull_neg); 1270 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_currnull_neg); 1271 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_astnull_neg); 1272 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_sensnull_neg); 1273 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_senslist_neg); 1274 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_aliasnull_neg); 1275 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_aliaslist_neg); 1276 SUITE_ADD_TEST(suite, test_cil_gen_sensalias_extra_neg); 1277 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sensalias); 1278 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_sensalias_neg); 1279 1280 SUITE_ADD_TEST(suite, test_cil_gen_category); 1281 SUITE_ADD_TEST(suite, test_cil_gen_category_dbnull_neg); 1282 SUITE_ADD_TEST(suite, test_cil_gen_category_currnull_neg); 1283 SUITE_ADD_TEST(suite, test_cil_gen_category_astnull_neg); 1284 SUITE_ADD_TEST(suite, test_cil_gen_category_catnull_neg); 1285 SUITE_ADD_TEST(suite, test_cil_gen_category_catlist_neg); 1286 SUITE_ADD_TEST(suite, test_cil_gen_category_extra_neg); 1287 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_category); 1288 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_category_neg); 1289 1290 SUITE_ADD_TEST(suite, test_cil_gen_catset); 1291 SUITE_ADD_TEST(suite, test_cil_gen_catset_dbnull_neg); 1292 SUITE_ADD_TEST(suite, test_cil_gen_catset_currnull_neg); 1293 SUITE_ADD_TEST(suite, test_cil_gen_catset_astnull_neg); 1294 SUITE_ADD_TEST(suite, test_cil_gen_catset_namenull_neg); 1295 SUITE_ADD_TEST(suite, test_cil_gen_catset_setnull_neg); 1296 SUITE_ADD_TEST(suite, test_cil_gen_catset_namelist_neg); 1297 SUITE_ADD_TEST(suite, test_cil_gen_catset_extra_neg); 1298 SUITE_ADD_TEST(suite, test_cil_gen_catset_nodefail_neg); 1299 SUITE_ADD_TEST(suite, test_cil_gen_catset_notset_neg); 1300 SUITE_ADD_TEST(suite, test_cil_gen_catset_settolistfail_neg); 1301 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catset); 1302 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catset_neg); 1303 1304 SUITE_ADD_TEST(suite, test_cil_gen_catalias); 1305 SUITE_ADD_TEST(suite, test_cil_gen_catalias_dbnull_neg); 1306 SUITE_ADD_TEST(suite, test_cil_gen_catalias_currnull_neg); 1307 SUITE_ADD_TEST(suite, test_cil_gen_catalias_astnull_neg); 1308 SUITE_ADD_TEST(suite, test_cil_gen_catalias_catnull_neg); 1309 SUITE_ADD_TEST(suite, test_cil_gen_catalias_aliasnull_neg); 1310 SUITE_ADD_TEST(suite, test_cil_gen_catalias_extra_neg); 1311 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catalias); 1312 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catalias_neg); 1313 1314 SUITE_ADD_TEST(suite, test_cil_gen_catrange); 1315 SUITE_ADD_TEST(suite, test_cil_gen_catrange_noname_neg); 1316 SUITE_ADD_TEST(suite, test_cil_gen_catrange_norange_neg); 1317 SUITE_ADD_TEST(suite, test_cil_gen_catrange_emptyrange_neg); 1318 SUITE_ADD_TEST(suite, test_cil_gen_catrange_extrarange_neg); 1319 SUITE_ADD_TEST(suite, test_cil_gen_catrange_extra_neg); 1320 SUITE_ADD_TEST(suite, test_cil_gen_catrange_dbnull_neg); 1321 SUITE_ADD_TEST(suite, test_cil_gen_catrange_currnull_neg); 1322 SUITE_ADD_TEST(suite, test_cil_gen_catrange_astnull_neg); 1323 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catrange); 1324 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catrange_neg); 1325 1326 SUITE_ADD_TEST(suite, test_cil_gen_roletype); 1327 SUITE_ADD_TEST(suite, test_cil_gen_roletype_currnull_neg); 1328 SUITE_ADD_TEST(suite, test_cil_gen_roletype_dbnull_neg); 1329 SUITE_ADD_TEST(suite, test_cil_gen_roletype_astnull_neg); 1330 SUITE_ADD_TEST(suite, test_cil_gen_roletype_empty_neg); 1331 SUITE_ADD_TEST(suite, test_cil_gen_roletype_rolelist_neg); 1332 SUITE_ADD_TEST(suite, test_cil_gen_roletype_roletype_sublist_neg); 1333 SUITE_ADD_TEST(suite, test_cil_gen_roletype_typelist_neg); 1334 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_roletype); 1335 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_roletype_neg); 1336 1337 SUITE_ADD_TEST(suite, test_cil_gen_userrole); 1338 SUITE_ADD_TEST(suite, test_cil_gen_userrole_currnull_neg); 1339 SUITE_ADD_TEST(suite, test_cil_gen_userrole_dbnull_neg); 1340 SUITE_ADD_TEST(suite, test_cil_gen_userrole_astnull_neg); 1341 SUITE_ADD_TEST(suite, test_cil_gen_userrole_empty_neg); 1342 SUITE_ADD_TEST(suite, test_cil_gen_userrole_userlist_neg); 1343 SUITE_ADD_TEST(suite, test_cil_gen_userrole_userrole_sublist_neg); 1344 SUITE_ADD_TEST(suite, test_cil_gen_userrole_rolelist_neg); 1345 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userrole); 1346 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_userrole_neg); 1347 1348 SUITE_ADD_TEST(suite, test_cil_gen_classcommon); 1349 SUITE_ADD_TEST(suite, test_cil_gen_classcommon_dbnull_neg); 1350 SUITE_ADD_TEST(suite, test_cil_gen_classcommon_currnull_neg); 1351 SUITE_ADD_TEST(suite, test_cil_gen_classcommon_astnull_neg); 1352 SUITE_ADD_TEST(suite, test_cil_gen_classcommon_missingclassname_neg); 1353 SUITE_ADD_TEST(suite, test_cil_gen_classcommon_noperms_neg); 1354 SUITE_ADD_TEST(suite, test_cil_gen_classcommon_extraperms_neg); 1355 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_classcommon); 1356 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_classcommon_neg); 1357 1358 SUITE_ADD_TEST(suite, test_cil_gen_catorder); 1359 SUITE_ADD_TEST(suite, test_cil_gen_catorder_dbnull_neg); 1360 SUITE_ADD_TEST(suite, test_cil_gen_catorder_currnull_neg); 1361 SUITE_ADD_TEST(suite, test_cil_gen_catorder_astnull_neg); 1362 SUITE_ADD_TEST(suite, test_cil_gen_catorder_missingcats_neg); 1363 SUITE_ADD_TEST(suite, test_cil_gen_catorder_nosublist_neg); 1364 SUITE_ADD_TEST(suite, test_cil_gen_catorder_nestedcat_neg); 1365 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catorder); 1366 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_catorder_neg); 1367 1368 SUITE_ADD_TEST(suite, test_cil_gen_dominance); 1369 SUITE_ADD_TEST(suite, test_cil_gen_dominance_dbnull_neg); 1370 SUITE_ADD_TEST(suite, test_cil_gen_dominance_currnull_neg); 1371 SUITE_ADD_TEST(suite, test_cil_gen_dominance_astnull_neg); 1372 SUITE_ADD_TEST(suite, test_cil_gen_dominance_nosensitivities_neg); 1373 SUITE_ADD_TEST(suite, test_cil_gen_dominance_nosublist_neg); 1374 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_dominance); 1375 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_dominance_neg); 1376 1377 SUITE_ADD_TEST(suite, test_cil_gen_senscat); 1378 SUITE_ADD_TEST(suite, test_cil_gen_senscat_nosublist); 1379 SUITE_ADD_TEST(suite, test_cil_gen_senscat_dbnull_neg); 1380 SUITE_ADD_TEST(suite, test_cil_gen_senscat_currnull_neg); 1381 SUITE_ADD_TEST(suite, test_cil_gen_senscat_astnull_neg); 1382 SUITE_ADD_TEST(suite, test_cil_gen_senscat_nosensitivities_neg); 1383 SUITE_ADD_TEST(suite, test_cil_gen_senscat_sublist_neg); 1384 SUITE_ADD_TEST(suite, test_cil_gen_senscat_nocat_neg); 1385 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_senscat); 1386 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_senscat_neg); 1387 1388 SUITE_ADD_TEST(suite, test_cil_fill_level); 1389 SUITE_ADD_TEST(suite, test_cil_fill_level_sensnull_neg); 1390 SUITE_ADD_TEST(suite, test_cil_fill_level_levelnull_neg); 1391 SUITE_ADD_TEST(suite, test_cil_fill_level_nocat); 1392 SUITE_ADD_TEST(suite, test_cil_fill_level_emptycat_neg); 1393 1394 SUITE_ADD_TEST(suite, test_cil_gen_level); 1395 SUITE_ADD_TEST(suite, test_cil_gen_level_nameinparens_neg); 1396 SUITE_ADD_TEST(suite, test_cil_gen_level_emptysensparens_neg); 1397 SUITE_ADD_TEST(suite, test_cil_gen_level_extra_neg); 1398 SUITE_ADD_TEST(suite, test_cil_gen_level_emptycat_neg); 1399 SUITE_ADD_TEST(suite, test_cil_gen_level_noname_neg); 1400 SUITE_ADD_TEST(suite, test_cil_gen_level_nosens_neg); 1401 SUITE_ADD_TEST(suite, test_cil_gen_level_dbnull_neg); 1402 SUITE_ADD_TEST(suite, test_cil_gen_level_currnull_neg); 1403 SUITE_ADD_TEST(suite, test_cil_gen_level_astnull_neg); 1404 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_level); 1405 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_level_neg); 1406 1407 SUITE_ADD_TEST(suite, test_cil_gen_levelrange); 1408 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_rangeinvalid_neg); 1409 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_namenull_neg); 1410 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_rangenull_neg); 1411 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_rangeempty_neg); 1412 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_extra_neg); 1413 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_dbnull_neg); 1414 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_currnull_neg); 1415 SUITE_ADD_TEST(suite, test_cil_gen_levelrange_astnull_neg); 1416 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_levelrange); 1417 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_levelrange_neg); 1418 1419 SUITE_ADD_TEST(suite, test_cil_gen_constrain); 1420 SUITE_ADD_TEST(suite, test_cil_gen_constrain_neg); 1421 SUITE_ADD_TEST(suite, test_cil_gen_constrain_classset_neg); 1422 SUITE_ADD_TEST(suite, test_cil_gen_constrain_classset_noperm_neg); 1423 SUITE_ADD_TEST(suite, test_cil_gen_constrain_classset_noclass_neg); 1424 SUITE_ADD_TEST(suite, test_cil_gen_constrain_permset_neg); 1425 SUITE_ADD_TEST(suite, test_cil_gen_constrain_permset_noclass_neg); 1426 SUITE_ADD_TEST(suite, test_cil_gen_constrain_permset_noperm_neg); 1427 SUITE_ADD_TEST(suite, test_cil_gen_constrain_expression_neg); 1428 SUITE_ADD_TEST(suite, test_cil_gen_constrain_dbnull_neg); 1429 SUITE_ADD_TEST(suite, test_cil_gen_constrain_currnull_neg); 1430 SUITE_ADD_TEST(suite, test_cil_gen_constrain_astnull_neg); 1431 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_constrain); 1432 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_constrain_neg); 1433 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_mlsconstrain); 1434 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_mlsconstrain_neg); 1435 1436 SUITE_ADD_TEST(suite, test_cil_fill_context); 1437 SUITE_ADD_TEST(suite, test_cil_fill_context_unnamedlvl); 1438 SUITE_ADD_TEST(suite, test_cil_fill_context_nocontext_neg); 1439 SUITE_ADD_TEST(suite, test_cil_fill_context_nouser_neg); 1440 SUITE_ADD_TEST(suite, test_cil_fill_context_norole_neg); 1441 SUITE_ADD_TEST(suite, test_cil_fill_context_notype_neg); 1442 SUITE_ADD_TEST(suite, test_cil_fill_context_nolowlvl_neg); 1443 SUITE_ADD_TEST(suite, test_cil_fill_context_nohighlvl_neg); 1444 SUITE_ADD_TEST(suite, test_cil_fill_context_unnamedlvl_nocontextlow_neg); 1445 SUITE_ADD_TEST(suite, test_cil_fill_context_unnamedlvl_nocontexthigh_neg); 1446 1447 SUITE_ADD_TEST(suite, test_cil_gen_context); 1448 SUITE_ADD_TEST(suite, test_cil_gen_context_notinparens_neg); 1449 SUITE_ADD_TEST(suite, test_cil_gen_context_extralevel_neg); 1450 SUITE_ADD_TEST(suite, test_cil_gen_context_emptycontext_neg); 1451 SUITE_ADD_TEST(suite, test_cil_gen_context_extra_neg); 1452 SUITE_ADD_TEST(suite, test_cil_gen_context_doubleparen_neg); 1453 SUITE_ADD_TEST(suite, test_cil_gen_context_norole_neg); 1454 SUITE_ADD_TEST(suite, test_cil_gen_context_roleinparens_neg); 1455 SUITE_ADD_TEST(suite, test_cil_gen_context_notype_neg); 1456 SUITE_ADD_TEST(suite, test_cil_gen_context_typeinparens_neg); 1457 SUITE_ADD_TEST(suite, test_cil_gen_context_nolevels_neg); 1458 // SUITE_ADD_TEST(suite, test_cil_gen_context_nosecondlevel_neg); 1459 SUITE_ADD_TEST(suite, test_cil_gen_context_noname_neg); 1460 SUITE_ADD_TEST(suite, test_cil_gen_context_nouser_neg); 1461 SUITE_ADD_TEST(suite, test_cil_gen_context_dbnull_neg); 1462 SUITE_ADD_TEST(suite, test_cil_gen_context_currnull_neg); 1463 SUITE_ADD_TEST(suite, test_cil_gen_context_astnull_neg); 1464 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_context); 1465 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_context_neg); 1466 1467 SUITE_ADD_TEST(suite, test_cil_gen_filecon_file); 1468 SUITE_ADD_TEST(suite, test_cil_gen_filecon_dir); 1469 SUITE_ADD_TEST(suite, test_cil_gen_filecon_char); 1470 SUITE_ADD_TEST(suite, test_cil_gen_filecon_block); 1471 SUITE_ADD_TEST(suite, test_cil_gen_filecon_socket); 1472 SUITE_ADD_TEST(suite, test_cil_gen_filecon_pipe); 1473 SUITE_ADD_TEST(suite, test_cil_gen_filecon_symlink); 1474 SUITE_ADD_TEST(suite, test_cil_gen_filecon_any); 1475 SUITE_ADD_TEST(suite, test_cil_gen_filecon_neg); 1476 SUITE_ADD_TEST(suite, test_cil_gen_filecon_anon_context); 1477 SUITE_ADD_TEST(suite, test_cil_gen_filecon_dbnull_neg); 1478 SUITE_ADD_TEST(suite, test_cil_gen_filecon_currnull_neg); 1479 SUITE_ADD_TEST(suite, test_cil_gen_filecon_astnull_neg); 1480 SUITE_ADD_TEST(suite, test_cil_gen_filecon_str1null_neg); 1481 SUITE_ADD_TEST(suite, test_cil_gen_filecon_str1_inparens_neg); 1482 SUITE_ADD_TEST(suite, test_cil_gen_filecon_str2null_neg); 1483 SUITE_ADD_TEST(suite, test_cil_gen_filecon_str2_inparens_neg); 1484 SUITE_ADD_TEST(suite, test_cil_gen_filecon_classnull_neg); 1485 SUITE_ADD_TEST(suite, test_cil_gen_filecon_class_inparens_neg); 1486 SUITE_ADD_TEST(suite, test_cil_gen_filecon_contextnull_neg); 1487 SUITE_ADD_TEST(suite, test_cil_gen_filecon_context_neg); 1488 SUITE_ADD_TEST(suite, test_cil_gen_filecon_extra_neg); 1489 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_filecon); 1490 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_filecon_neg); 1491 1492 SUITE_ADD_TEST(suite, test_cil_gen_portcon_udp); 1493 SUITE_ADD_TEST(suite, test_cil_gen_portcon_tcp); 1494 SUITE_ADD_TEST(suite, test_cil_gen_portcon_unknownprotocol_neg); 1495 SUITE_ADD_TEST(suite, test_cil_gen_portcon_anon_context); 1496 SUITE_ADD_TEST(suite, test_cil_gen_portcon_portrange); 1497 SUITE_ADD_TEST(suite, test_cil_gen_portcon_portrange_one_neg); 1498 SUITE_ADD_TEST(suite, test_cil_gen_portcon_portrange_morethanone_neg); 1499 SUITE_ADD_TEST(suite, test_cil_gen_portcon_singleport_neg); 1500 SUITE_ADD_TEST(suite, test_cil_gen_portcon_lowport_neg); 1501 SUITE_ADD_TEST(suite, test_cil_gen_portcon_highport_neg); 1502 SUITE_ADD_TEST(suite, test_cil_gen_portcon_dbnull_neg); 1503 SUITE_ADD_TEST(suite, test_cil_gen_portcon_currnull_neg); 1504 SUITE_ADD_TEST(suite, test_cil_gen_portcon_astnull_neg); 1505 SUITE_ADD_TEST(suite, test_cil_gen_portcon_str1null_neg); 1506 SUITE_ADD_TEST(suite, test_cil_gen_portcon_str1parens_neg); 1507 SUITE_ADD_TEST(suite, test_cil_gen_portcon_portnull_neg); 1508 SUITE_ADD_TEST(suite, test_cil_gen_portcon_contextnull_neg); 1509 SUITE_ADD_TEST(suite, test_cil_gen_portcon_context_neg); 1510 SUITE_ADD_TEST(suite, test_cil_gen_portcon_extra_neg); 1511 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_portcon); 1512 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_portcon_neg); 1513 1514 SUITE_ADD_TEST(suite, test_cil_fill_ipaddr); 1515 SUITE_ADD_TEST(suite, test_cil_fill_ipaddr_addrnodenull_neg); 1516 SUITE_ADD_TEST(suite, test_cil_fill_ipaddr_addrnull_neg); 1517 SUITE_ADD_TEST(suite, test_cil_fill_ipaddr_addrinparens_neg); 1518 SUITE_ADD_TEST(suite, test_cil_fill_ipaddr_extra_neg); 1519 1520 SUITE_ADD_TEST(suite, test_cil_gen_nodecon); 1521 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_anon_context); 1522 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_dbnull_neg); 1523 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_currnull_neg); 1524 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_astnull_neg); 1525 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_ipnull_neg); 1526 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_ipanon); 1527 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_ipanon_neg); 1528 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_netmasknull_neg); 1529 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_netmaskanon); 1530 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_netmaskanon_neg); 1531 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_contextnull_neg); 1532 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_context_neg); 1533 SUITE_ADD_TEST(suite, test_cil_gen_nodecon_extra_neg); 1534 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_nodecon); 1535 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_nodecon_neg); 1536 1537 SUITE_ADD_TEST(suite, test_cil_gen_genfscon); 1538 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_anon_context); 1539 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_dbnull_neg); 1540 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_currnull_neg); 1541 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_astnull_neg); 1542 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_typenull_neg); 1543 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_typeparens_neg); 1544 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_pathnull_neg); 1545 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_pathparens_neg); 1546 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_contextnull_neg); 1547 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_context_neg); 1548 SUITE_ADD_TEST(suite, test_cil_gen_genfscon_extra_neg); 1549 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_genfscon); 1550 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_genfscon_neg); 1551 1552 SUITE_ADD_TEST(suite, test_cil_gen_netifcon); 1553 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_nested); 1554 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_nested_neg); 1555 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_nested_emptysecondlist_neg); 1556 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_extra_nested_secondlist_neg); 1557 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_nested_missingobjects_neg); 1558 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_nested_secondnested_missingobjects_neg); 1559 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_dbnull_neg); 1560 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_currnull_neg); 1561 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_astnull_neg); 1562 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_ethmissing_neg); 1563 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_interfacemissing_neg); 1564 SUITE_ADD_TEST(suite, test_cil_gen_netifcon_packetmissing_neg); 1565 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_netifcon); 1566 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_netifcon_neg); 1567 1568 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon); 1569 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_pirqnotint_neg); 1570 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_nopirq_neg); 1571 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_pirqrange_neg); 1572 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_nocontext_neg); 1573 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_anoncontext_neg); 1574 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_extra_neg); 1575 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_dbnull_neg); 1576 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_currnull_neg); 1577 SUITE_ADD_TEST(suite, test_cil_gen_pirqcon_astnull_neg); 1578 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_pirqcon); 1579 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_pirqcon_neg); 1580 1581 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon); 1582 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_iomemrange); 1583 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_iomemrange_firstnotint_neg); 1584 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_iomemrange_secondnotint_neg); 1585 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_iomemrange_empty_neg); 1586 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_iomemrange_singleiomem_neg); 1587 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_iomemrange_morethantwoiomem_neg); 1588 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_iomemnotint_neg); 1589 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_noiomem_neg); 1590 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_nocontext_neg); 1591 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_anoncontext_neg); 1592 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_extra_neg); 1593 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_dbnull_neg); 1594 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_currnull_neg); 1595 SUITE_ADD_TEST(suite, test_cil_gen_iomemcon_astnull_neg); 1596 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_iomemcon); 1597 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_iomemcon_neg); 1598 1599 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon); 1600 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_ioportrange); 1601 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_ioportrange_firstnotint_neg); 1602 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_ioportrange_secondnotint_neg); 1603 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_ioportrange_empty_neg); 1604 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_ioportrange_singleioport_neg); 1605 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_ioportrange_morethantwoioport_neg); 1606 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_ioportnotint_neg); 1607 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_noioport_neg); 1608 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_nocontext_neg); 1609 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_anoncontext_neg); 1610 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_extra_neg); 1611 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_dbnull_neg); 1612 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_currnull_neg); 1613 SUITE_ADD_TEST(suite, test_cil_gen_ioportcon_astnull_neg); 1614 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_ioportcon); 1615 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_ioportcon_neg); 1616 1617 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon); 1618 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_pcidevicenotint_neg); 1619 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_nopcidevice_neg); 1620 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_pcidevicerange_neg); 1621 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_nocontext_neg); 1622 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_anoncontext_neg); 1623 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_extra_neg); 1624 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_dbnull_neg); 1625 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_currnull_neg); 1626 SUITE_ADD_TEST(suite, test_cil_gen_pcidevicecon_astnull_neg); 1627 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_pcidevicecon); 1628 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_pcidevicecon_neg); 1629 1630 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_anoncontext); 1631 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_anoncontext_neg); 1632 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_xattr); 1633 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_task); 1634 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_transition); 1635 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_invalidtype_neg); 1636 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_notype_neg); 1637 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_typeinparens_neg); 1638 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_nofilesystem_neg); 1639 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_filesysteminparens_neg); 1640 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_nocontext_neg); 1641 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_emptyconparens_neg); 1642 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_extra_neg); 1643 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_dbnull_neg); 1644 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_currnull_neg); 1645 SUITE_ADD_TEST(suite, test_cil_gen_fsuse_astnull_neg); 1646 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_fsuse); 1647 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_fsuse_neg); 1648 1649 SUITE_ADD_TEST(suite, test_cil_gen_macro_noparams); 1650 SUITE_ADD_TEST(suite, test_cil_gen_macro_type); 1651 SUITE_ADD_TEST(suite, test_cil_gen_macro_role); 1652 SUITE_ADD_TEST(suite, test_cil_gen_macro_user); 1653 SUITE_ADD_TEST(suite, test_cil_gen_macro_sensitivity); 1654 SUITE_ADD_TEST(suite, test_cil_gen_macro_category); 1655 SUITE_ADD_TEST(suite, test_cil_gen_macro_catset); 1656 SUITE_ADD_TEST(suite, test_cil_gen_macro_level); 1657 SUITE_ADD_TEST(suite, test_cil_gen_macro_class); 1658 SUITE_ADD_TEST(suite, test_cil_gen_macro_classmap); 1659 SUITE_ADD_TEST(suite, test_cil_gen_macro_permset); 1660 SUITE_ADD_TEST(suite, test_cil_gen_macro_duplicate); 1661 SUITE_ADD_TEST(suite, test_cil_gen_macro_duplicate_neg); 1662 SUITE_ADD_TEST(suite, test_cil_gen_macro_unknown_neg); 1663 SUITE_ADD_TEST(suite, test_cil_gen_macro_dbnull_neg); 1664 SUITE_ADD_TEST(suite, test_cil_gen_macro_currnull_neg); 1665 SUITE_ADD_TEST(suite, test_cil_gen_macro_astnull_neg); 1666 SUITE_ADD_TEST(suite, test_cil_gen_macro_unnamed_neg); 1667 SUITE_ADD_TEST(suite, test_cil_gen_macro_noparam_neg); 1668 SUITE_ADD_TEST(suite, test_cil_gen_macro_nosecondparam_neg); 1669 SUITE_ADD_TEST(suite, test_cil_gen_macro_noparam_name_neg); 1670 SUITE_ADD_TEST(suite, test_cil_gen_macro_emptyparam_neg); 1671 SUITE_ADD_TEST(suite, test_cil_gen_macro_paramcontainsperiod_neg); 1672 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_macro); 1673 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_macro_neg); 1674 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_macro_nested_macro_neg); 1675 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_macro_nested_tunif_neg); 1676 1677 SUITE_ADD_TEST(suite, test_cil_gen_call); 1678 SUITE_ADD_TEST(suite, test_cil_gen_call_noargs); 1679 SUITE_ADD_TEST(suite, test_cil_gen_call_anon); 1680 SUITE_ADD_TEST(suite, test_cil_gen_call_empty_call_neg); 1681 SUITE_ADD_TEST(suite, test_cil_gen_call_dbnull_neg); 1682 SUITE_ADD_TEST(suite, test_cil_gen_call_currnull_neg); 1683 SUITE_ADD_TEST(suite, test_cil_gen_call_astnull_neg); 1684 SUITE_ADD_TEST(suite, test_cil_gen_call_name_inparens_neg); 1685 SUITE_ADD_TEST(suite, test_cil_gen_call_noname_neg); 1686 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_call); 1687 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_call_neg); 1688 1689 SUITE_ADD_TEST(suite, test_cil_gen_optional); 1690 SUITE_ADD_TEST(suite, test_cil_gen_optional_emptyoptional); 1691 SUITE_ADD_TEST(suite, test_cil_gen_optional_dbnull_neg); 1692 SUITE_ADD_TEST(suite, test_cil_gen_optional_currnull_neg); 1693 SUITE_ADD_TEST(suite, test_cil_gen_optional_astnull_neg); 1694 SUITE_ADD_TEST(suite, test_cil_gen_optional_unnamed_neg); 1695 SUITE_ADD_TEST(suite, test_cil_gen_optional_extra_neg); 1696 SUITE_ADD_TEST(suite, test_cil_gen_optional_nameinparens_neg); 1697 SUITE_ADD_TEST(suite, test_cil_gen_optional_norule_neg); 1698 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_optional); 1699 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_optional_neg); 1700 1701 SUITE_ADD_TEST(suite, test_cil_gen_policycap); 1702 SUITE_ADD_TEST(suite, test_cil_gen_policycap_noname_neg); 1703 SUITE_ADD_TEST(suite, test_cil_gen_policycap_nameinparens_neg); 1704 SUITE_ADD_TEST(suite, test_cil_gen_policycap_extra_neg); 1705 SUITE_ADD_TEST(suite, test_cil_gen_policycap_dbnull_neg); 1706 SUITE_ADD_TEST(suite, test_cil_gen_policycap_currnull_neg); 1707 SUITE_ADD_TEST(suite, test_cil_gen_policycap_astnull_neg); 1708 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_policycap); 1709 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_policycap_neg); 1710 1711 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_ipv4); 1712 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_ipv4_neg); 1713 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_ipv6); 1714 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_ipv6_neg); 1715 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_noname_neg); 1716 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_nameinparens_neg); 1717 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_noip_neg); 1718 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_ipinparens_neg); 1719 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_extra_neg); 1720 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_dbnull_neg); 1721 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_currnull_neg); 1722 SUITE_ADD_TEST(suite, test_cil_gen_ipaddr_astnull_neg); 1723 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_ipaddr); 1724 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_gen_ipaddr_neg); 1725 1726 SUITE_ADD_TEST(suite, test_cil_build_ast_node_helper_extraargsnull_neg); 1727 1728 SUITE_ADD_TEST(suite, test_cil_build_ast_last_child_helper); 1729 SUITE_ADD_TEST(suite, test_cil_build_ast_last_child_helper_extraargsnull_neg); 1730 1731 return suite; 1732 } 1733 1734 CuSuite* CilTreeGetSuite(void) { 1735 CuSuite* suite = CuSuiteNew(); 1736 1737 /* CilTest.c */ 1738 SUITE_ADD_TEST(suite, test_symtab_init); 1739 SUITE_ADD_TEST(suite, test_symtab_init_no_table_neg); 1740 1741 1742 /* test_cil.c */ 1743 SUITE_ADD_TEST(suite, test_cil_symtab_array_init); 1744 1745 SUITE_ADD_TEST(suite, test_cil_db_init); 1746 1747 SUITE_ADD_TEST(suite, test_cil_get_symtab_block); 1748 SUITE_ADD_TEST(suite, test_cil_get_symtab_class); 1749 SUITE_ADD_TEST(suite, test_cil_get_symtab_root); 1750 SUITE_ADD_TEST(suite, test_cil_get_symtab_flavor_neg); 1751 SUITE_ADD_TEST(suite, test_cil_get_symtab_null_neg); 1752 SUITE_ADD_TEST(suite, test_cil_get_symtab_node_null_neg); 1753 SUITE_ADD_TEST(suite, test_cil_get_symtab_parent_null_neg); 1754 1755 1756 /* test_cil_list.c */ 1757 SUITE_ADD_TEST(suite, test_cil_list_append_item); 1758 SUITE_ADD_TEST(suite, test_cil_list_append_item_append); 1759 SUITE_ADD_TEST(suite, test_cil_list_append_item_append_extra); 1760 SUITE_ADD_TEST(suite, test_cil_list_append_item_listnull_neg); 1761 SUITE_ADD_TEST(suite, test_cil_list_append_item_itemnull_neg); 1762 SUITE_ADD_TEST(suite, test_cil_list_prepend_item_prepend); 1763 SUITE_ADD_TEST(suite, test_cil_list_prepend_item_prepend_neg); 1764 SUITE_ADD_TEST(suite, test_cil_list_prepend_item_listnull_neg); 1765 SUITE_ADD_TEST(suite, test_cil_list_prepend_item_itemnull_neg); 1766 1767 1768 /* test_cil_symtab.c */ 1769 SUITE_ADD_TEST(suite, test_cil_symtab_insert); 1770 1771 1772 /* test_cil_tree.c */ 1773 SUITE_ADD_TEST(suite, test_cil_tree_init); 1774 SUITE_ADD_TEST(suite, test_cil_tree_node_init); 1775 1776 1777 /* test_cil_lexer.c */ 1778 SUITE_ADD_TEST(suite, test_cil_lexer_setup); 1779 SUITE_ADD_TEST(suite, test_cil_lexer_next); 1780 1781 1782 /* test_cil_parser.c */ 1783 SUITE_ADD_TEST(suite, test_cil_parser); 1784 1785 1786 /* test_cil_fqn.c */ 1787 SUITE_ADD_TEST(suite, test_cil_qualify_name); 1788 SUITE_ADD_TEST(suite, test_cil_qualify_name_cil_flavor); 1789 1790 /* test cil_copy_ast.c */ 1791 SUITE_ADD_TEST(suite, test_cil_copy_list); 1792 SUITE_ADD_TEST(suite, test_cil_copy_list_sublist); 1793 SUITE_ADD_TEST(suite, test_cil_copy_list_sublist_extra); 1794 SUITE_ADD_TEST(suite, test_cil_copy_list_orignull_neg); 1795 1796 SUITE_ADD_TEST(suite, test_cil_copy_block); 1797 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_block); 1798 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_block_merge); 1799 1800 SUITE_ADD_TEST(suite, test_cil_copy_perm); 1801 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_perm); 1802 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_perm_neg); 1803 1804 SUITE_ADD_TEST(suite, test_cil_copy_class); 1805 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_class); 1806 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_class_dup_neg); 1807 1808 SUITE_ADD_TEST(suite, test_cil_copy_common); 1809 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_common); 1810 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_common_dup_neg); 1811 1812 SUITE_ADD_TEST(suite, test_cil_copy_classcommon); 1813 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_classcommon); 1814 1815 SUITE_ADD_TEST(suite, test_cil_copy_sid); 1816 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_sid); 1817 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_sid_merge); 1818 1819 SUITE_ADD_TEST(suite, test_cil_copy_sidcontext); 1820 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_sidcontext); 1821 1822 SUITE_ADD_TEST(suite, test_cil_copy_user); 1823 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_user); 1824 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_user_merge); 1825 1826 SUITE_ADD_TEST(suite, test_cil_copy_role); 1827 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_role); 1828 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_role_merge); 1829 1830 SUITE_ADD_TEST(suite, test_cil_copy_userrole); 1831 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_userrole); 1832 1833 SUITE_ADD_TEST(suite, test_cil_copy_type); 1834 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_type); 1835 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_type_merge); 1836 1837 SUITE_ADD_TEST(suite, test_cil_copy_typeattribute); 1838 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_typeattribute); 1839 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_typeattribute_merge); 1840 1841 SUITE_ADD_TEST(suite, test_cil_copy_typealias); 1842 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_typealias); 1843 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_typealias_dup_neg); 1844 1845 SUITE_ADD_TEST(suite, test_cil_copy_bool); 1846 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_bool); 1847 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_bool_dup_neg); 1848 1849 SUITE_ADD_TEST(suite, test_cil_copy_avrule); 1850 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_avrule); 1851 1852 SUITE_ADD_TEST(suite, test_cil_copy_type_rule); 1853 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_type_rule); 1854 1855 SUITE_ADD_TEST(suite, test_cil_copy_sens); 1856 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_sens); 1857 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_sens_merge); 1858 1859 SUITE_ADD_TEST(suite, test_cil_copy_sensalias); 1860 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_sensalias); 1861 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_sensalias_dup_neg); 1862 1863 SUITE_ADD_TEST(suite, test_cil_copy_cat); 1864 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_cat); 1865 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_cat_merge); 1866 1867 SUITE_ADD_TEST(suite, test_cil_copy_catalias); 1868 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_catalias); 1869 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_catalias_dup_neg); 1870 1871 SUITE_ADD_TEST(suite, test_cil_copy_senscat); 1872 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_senscat); 1873 1874 SUITE_ADD_TEST(suite, test_cil_copy_catorder); 1875 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_catorder); 1876 1877 SUITE_ADD_TEST(suite, test_cil_copy_dominance); 1878 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_dominance); 1879 1880 SUITE_ADD_TEST(suite, test_cil_copy_level); 1881 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_level); 1882 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_level_dup_neg); 1883 1884 SUITE_ADD_TEST(suite, test_cil_copy_fill_level); 1885 1886 SUITE_ADD_TEST(suite, test_cil_copy_context); 1887 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_context); 1888 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_context_dup_neg); 1889 1890 SUITE_ADD_TEST(suite, test_cil_copy_netifcon); 1891 SUITE_ADD_TEST(suite, test_cil_copy_netifcon_nested); 1892 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_netifcon); 1893 1894 SUITE_ADD_TEST(suite, test_cil_copy_fill_context); 1895 SUITE_ADD_TEST(suite, test_cil_copy_fill_context_anonrange); 1896 1897 SUITE_ADD_TEST(suite, test_cil_copy_call); 1898 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_call); 1899 1900 SUITE_ADD_TEST(suite, test_cil_copy_optional); 1901 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_optional); 1902 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_optional_merge); 1903 1904 SUITE_ADD_TEST(suite, test_cil_copy_nodecon); 1905 SUITE_ADD_TEST(suite, test_cil_copy_nodecon_anon); 1906 1907 SUITE_ADD_TEST(suite, test_cil_copy_fill_ipaddr); 1908 1909 SUITE_ADD_TEST(suite, test_cil_copy_ipaddr); 1910 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_ipaddr); 1911 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_ipaddr_dup_neg); 1912 1913 SUITE_ADD_TEST(suite, test_cil_copy_conditional); 1914 1915 SUITE_ADD_TEST(suite, test_cil_copy_boolif); 1916 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_boolif); 1917 1918 SUITE_ADD_TEST(suite, test_cil_copy_constrain); 1919 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_mlsconstrain); 1920 1921 //SUITE_ADD_TEST(suite, test_cil_copy_ast); 1922 //SUITE_ADD_TEST(suite, test_cil_copy_ast_neg); 1923 1924 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_orignull_neg); 1925 SUITE_ADD_TEST(suite, test_cil_copy_node_helper_extraargsnull_neg); 1926 1927 /* test_post.c */ 1928 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_meta_a_not_b); 1929 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_meta_b_not_a); 1930 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_meta_a_and_b_strlen_a_greater_b); 1931 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_meta_a_and_b_strlen_b_greater_a); 1932 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_type_atype_greater_btype); 1933 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_type_btype_greater_atype); 1934 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_stemlen_a_greater_b); 1935 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_stemlen_b_greater_a); 1936 SUITE_ADD_TEST(suite, test_cil_post_filecon_compare_equal); 1937 1938 SUITE_ADD_TEST(suite, test_cil_post_genfscon_compare_atypestr_greater_btypestr); 1939 SUITE_ADD_TEST(suite, test_cil_post_genfscon_compare_btypestr_greater_atypestr); 1940 SUITE_ADD_TEST(suite, test_cil_post_genfscon_compare_apathstr_greater_bpathstr); 1941 SUITE_ADD_TEST(suite, test_cil_post_genfscon_compare_bpathstr_greater_apathstr); 1942 SUITE_ADD_TEST(suite, test_cil_post_genfscon_compare_equal); 1943 1944 SUITE_ADD_TEST(suite, test_cil_post_netifcon_compare_a_greater_b); 1945 SUITE_ADD_TEST(suite, test_cil_post_netifcon_compare_b_greater_a); 1946 SUITE_ADD_TEST(suite, test_cil_post_netifcon_compare_equal); 1947 1948 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_aipv4_bipv6); 1949 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_aipv6_bipv4); 1950 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_aipv4_greaterthan_bipv4); 1951 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_aipv4_lessthan_bipv4); 1952 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_amaskipv4_greaterthan_bmaskipv4); 1953 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_amaskipv4_lessthan_bmaskipv4); 1954 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_aipv6_greaterthan_bipv6); 1955 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_aipv6_lessthan_bipv6); 1956 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_amaskipv6_greaterthan_bmaskipv6); 1957 SUITE_ADD_TEST(suite, test_cil_post_nodecon_compare_amaskipv6_lessthan_bmaskipv6); 1958 1959 SUITE_ADD_TEST(suite, test_cil_post_fsuse_compare_type_a_greater_b); 1960 SUITE_ADD_TEST(suite, test_cil_post_fsuse_compare_type_b_greater_a); 1961 SUITE_ADD_TEST(suite, test_cil_post_fsuse_compare_fsstr_a_greater_b); 1962 SUITE_ADD_TEST(suite, test_cil_post_fsuse_compare_fsstr_b_greater_a); 1963 SUITE_ADD_TEST(suite, test_cil_post_fsuse_compare_equal); 1964 1965 return suite; 1966 } 1967 1968 CuSuite* CilTestFullCil(void) { 1969 CuSuite* suite = CuSuiteNew(); 1970 SUITE_ADD_TEST(suite, test_min_policy); 1971 SUITE_ADD_TEST(suite, test_integration); 1972 1973 return suite; 1974 } 1975