Lines Matching refs:role
33 * - role in appropriate symtab (global and decl)
38 * - role in base, no modules
39 * - role in base optional, no modules
40 * - role a in base, b in module
41 * - role a in base and module (additive)
42 * - role a in base and 2 module
43 * - role a in base optional, b in module
44 * - role a in base, b in module optional
45 * - role a in base optional, b in module optional
46 * - role a in base optional and module
47 * - role a in base and module optional
48 * - role a in base optional and module optional
49 * - role a in base optional and 2 modules
50 * - role a and b in base, b dom a, are types correct (TODO)
53 /* this simply tests whether the passed in role only has its own
55 static void only_dominates_self(policydb_t * p, role_datum_t * role)
61 ebitmap_for_each_bit(&role->dominates, tnode, i) {
64 CU_ASSERT(i == role->s.value - 1);
73 role_datum_t *role;
85 role = test_role_type_set(base, "g_b_role_1", NULL, types, 1, 0);
86 /* This role should only dominate itself */
87 only_dominates_self(base, role);
95 role = test_role_type_set(base, "o1_b_role_1", decl, types, 1, 0);
97 only_dominates_self(base, role);
102 role_datum_t *role;
111 /**** test for role in module 1 (global) ****/
116 role = test_role_type_set(base, "g_m1_role_1", NULL, types, 1, 0);
118 only_dominates_self(base, role);
120 /**** test for role in module 1 (optional) ****/
126 role = test_role_type_set(base, "o1_m1_role_1", decl, types, 1, 0);
128 only_dominates_self(base, role);
133 /**** test for type added to base role in module 1 (global) ****/
140 role = test_role_type_set(base, "g_b_role_2", NULL, types, 2, 0);
142 only_dominates_self(base, role);
144 /**** test for type added to base role in module 1 & 2 (global) ****/
153 role = test_role_type_set(base, "g_b_role_3", NULL, types, 3, 0);
155 only_dominates_self(base, role);
157 /**** test for role in base optional and module 1 (additive) ****/
163 role = test_role_type_set(base, "o1_b_role_2", NULL, types, 1, 0);
165 role = test_role_type_set(base, "o1_b_role_2", test_find_decl_by_sym(base, SYM_TYPES, "tag_o1_b"), types, 1, 0);
167 only_dominates_self(base, role);
169 /**** test for role in base and module 1 optional (additive) ****/
175 role = test_role_type_set(base, "g_b_role_4", NULL, types, 1, 0);
177 role = test_role_type_set(base, "g_b_role_4", test_find_decl_by_sym(base, SYM_TYPES, "tag_o2_m1"), types, 1, 0);
179 only_dominates_self(base, role);
181 /**** test for role in base and module 1 optional (additive) ****/
187 role = test_role_type_set(base, "o3_b_role_1", test_find_decl_by_sym(base, SYM_TYPES, "tag_o3_b"), types, 1, 0);
189 role = test_role_type_set(base, "o3_b_role_1", test_find_decl_by_sym(base, SYM_TYPES, "tag_o3_m1"), types, 1, 0);
191 only_dominates_self(base, role);
193 /**** test for role in base and module 1 optional (additive) ****/
200 role = test_role_type_set(base, "o4_b_role_1", test_find_decl_by_sym(base, SYM_TYPES, "tag_o4_b"), types, 1, 0);
203 role = test_role_type_set(base, "o4_b_role_1", NULL, types, 2, 0);
205 only_dominates_self(base, role);