Lines Matching refs:base

39  * - type in base, no modules
40 * - type in base optional, no modules
41 * - type a in base, b in module
42 * - type a in base optional, b in module
43 * - type a in base, b in module optional
44 * - type a in base optional, b in module optional
45 * - attr in base, no modules
46 * - attr in base optional, no modules
47 * - attr a in base, b in module
48 * - attr a in base optional, b in module
49 * - attr a in base, b in module optional
50 * - attr a in base optional, b in module optional
51 * - attr a declared in base, added to in module
52 * - attr a declared in base, added to in module optional
53 * - attr a declared in base, added to in 2 modules
54 * - attr a declared in base, added to in 2 modules (optional and global)
55 * - attr a declared in base optional, added to in module
56 * - attr a declared in base optional, added to in module optional
57 * - attr a added to in base optional, declared in module
58 * - attr a added to in base optional, declared in module optional
59 * - attr a added to in base optional, declared in module, added to in other module
60 * - attr a added to in base optional, declared in module optional, added to in other module
61 * - attr a added to in base optional, declared in module , added to in other module optional
62 * - attr a added to in base optional, declared in module optional, added to in other module optional
63 * - alias in base of primary type in base, no modules
64 * - alias in base optional of primary type in base, no modules
65 * - alias in base optional of primary type in base optional
66 * - alias in module of primary type in base
67 * - alias in module optional of primary type in base
68 * - alias in module optional of primary type in base optional
72 * - alias a in base, b in module, primary type in base
73 * - alias a in base, b in module, primary type in module
74 * - alias a in base optional, b in module, primary type in base
75 * - alias a in base optional, b in module, primary type in module
76 * - alias a in base, b in module optional, primary type in base
77 * - alias a in base, b in module optional, primary type in module
78 * - alias a in base optional, b in module optional, primary type in base
79 * - alias a in base optional, b in module optional, primary type in module
80 * - alias a in base, required in module, primary type in base
81 * - alias a in base, required in base optional, primary type in base
82 * - alias a in base, required in module optional, primary type in base
83 * - alias a in module, required in base optional, primary type in base
84 * - alias a in module, required in module optional, primary type in base
85 * - alias a in base optional, required in module, primary type in base
86 * - alias a in base optional, required in different base optional, primary type in base
87 * - alias a in base optional, required in module optional, primary type in base
88 * - alias a in module optional, required in base optional, primary type in base
89 * - alias a in module optional, required in module optional, primary type in base
90 * - alias a in module, required in base optional, primary type in module
92 * - alias a in base optional, required in module, primary type in module
93 * - alias a in base optional, required in different base optional, primary type in module
94 * - alias a in base optional, required in module optional, primary type in module
95 * - alias a in module optional, required in base optional, primary type in module
125 void base_type_tests(policydb_t * base)
130 /* These tests look at types in the base only, the desire is to ensure that
135 /**** test for g_b_type_1 in base and decl 1 (global) ****/
136 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_b"))->decl_id;
137 test_sym_presence(base, "g_b_type_1", SYM_TYPES, SCOPE_DECL, decls, 1);
138 test_type_datum(base, "g_b_type_1", NULL, 0, 1);
140 test_sym_presence(base, "g_b_attr_1", SYM_TYPES, SCOPE_DECL, decls, 1);
142 test_attr_types(base, "g_b_attr_1", NULL, types, 1);
145 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o1_b"))->decl_id;
146 test_sym_presence(base, "o1_b_type_1", SYM_TYPES, SCOPE_DECL, decls, 1);
147 test_type_datum(base, "o1_b_type_1", NULL, 0, 1);
149 test_sym_presence(base, "o1_b_attr_1", SYM_TYPES, SCOPE_DECL, decls, 1);
151 test_attr_types(base, "o1_b_attr_1", base->decl_val_to_struct[decls[0] - 1], types, 1);
154 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_b"))->decl_id;
155 test_sym_presence(base, "g_b_alias_1", SYM_TYPES, SCOPE_DECL, decls, 1);
156 test_alias_datum(base, "g_b_alias_1", "g_b_type_3", 1, 0);
157 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o6_b"))->decl_id;
158 test_sym_presence(base, "g_b_alias_2", SYM_TYPES, SCOPE_DECL, decls, 1);
159 test_alias_datum(base, "g_b_alias_2", "g_b_type_3", 1, 0);
163 void module_type_tests(policydb_t * base)
170 * that were modified and declared in modules and base. These apply to
180 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_m1"))->decl_id;
181 test_sym_presence(base, "g_m1_type_1", SYM_TYPES, SCOPE_DECL, decls, 1);
182 test_type_datum(base, "g_m1_type_1", NULL, 0, 1);
184 test_sym_presence(base, "g_m1_attr_1", SYM_TYPES, SCOPE_DECL, decls, 1);
187 test_attr_types(base, "g_m1_attr_1", NULL, types, 2);
190 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o1_m1"))->decl_id;
191 test_sym_presence(base, "o1_m1_type_1", SYM_TYPES, SCOPE_DECL, decls, 1);
192 test_type_datum(base, "o1_m1_type_1", NULL, 0, 1);
194 test_sym_presence(base, "o1_m1_attr_1", SYM_TYPES, SCOPE_DECL, decls, 1);
196 test_attr_types(base, "o1_m1_attr_1", base->decl_val_to_struct[decls[0] - 1], types, 1);
198 /* test for attr declared in base, added to in module (global).
200 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_b"))->decl_id;
201 test_sym_presence(base, "g_b_attr_3", SYM_TYPES, SCOPE_DECL, decls, 1);
203 test_attr_types(base, "g_b_attr_3", NULL, types, 1);
205 /* test for attr declared in base, added to in module (optional). */
206 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_b"))->decl_id;
207 test_sym_presence(base, "g_b_attr_4", SYM_TYPES, SCOPE_DECL, decls, 1);
209 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o1_m1"))->decl_id;
211 test_attr_types(base, "g_b_attr_4", base->decl_val_to_struct[decls[0] - 1], types, 1);
213 /* test for attr declared in base, added to in 2 modules (global). (merged in main symtab) */
214 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_b"))->decl_id;
215 test_sym_presence(base, "g_b_attr_5", SYM_TYPES, SCOPE_DECL, decls, 1);
218 test_attr_types(base, "g_b_attr_5", NULL, types, 2);
220 /* test for attr declared in base, added to in 2 modules (optional/global). */
221 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_b"))->decl_id;
222 test_sym_presence(base, "g_b_attr_6", SYM_TYPES, SCOPE_DECL, decls, 1);
225 test_attr_types(base, "g_b_attr_6", NULL, types, 1);
226 d = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o3_m1"));
228 test_attr_types(base, "g_b_attr_6", d, types, 1);
230 /* test for attr declared in base optional, added to in module (global). */
231 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o4_b"))->decl_id;
232 test_sym_presence(base, "o4_b_attr_1", SYM_TYPES, SCOPE_DECL, decls, 1);
234 test_attr_types(base, "o4_b_attr_1", NULL, types, 1);
236 /* test for attr declared in base optional, added to in module (optional). */
237 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o1_b"))->decl_id;
238 test_sym_presence(base, "o1_b_attr_2", SYM_TYPES, SCOPE_DECL, decls, 1);
239 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o1_m1");
241 test_attr_types(base, "o1_b_attr_2", d, types, 1);
243 /* test for attr declared in module, added to in base optional */
244 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_m1"))->decl_id;
245 test_sym_presence(base, "g_m1_attr_2", SYM_TYPES, SCOPE_DECL, decls, 1);
246 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o1_b");
248 test_attr_types(base, "g_m1_attr_2", d, types, 1);
250 /* test for attr declared in module optional, added to in base optional */
251 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_o3_m1"))->decl_id;
252 test_sym_presence(base, "o3_m1_attr_1", SYM_TYPES, SCOPE_DECL, decls, 1);
253 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o4_b");
255 test_attr_types(base, "o3_m1_attr_1", d, types, 1);
257 /* attr a added to in base optional, declared/added to in module, added to in other module */
259 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_m1"))->decl_id;
260 test_sym_presence(base, "g_m1_attr_3", SYM_TYPES, SCOPE_DECL, decls, 1);
263 test_attr_types(base, "g_m1_attr_3", NULL, types, 2);
264 /* base add */
265 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o4_b");
267 test_attr_types(base, "g_m1_attr_3", d, types, 1);
269 /* attr a added to in base optional, declared/added in module optional, added to in other module */
270 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o3_m1");
272 test_sym_presence(base, "o3_m1_attr_2", SYM_TYPES, SCOPE_DECL, decls, 1);
274 test_attr_types(base, "o3_m1_attr_2", d, types, 1);
277 test_attr_types(base, "o3_m1_attr_2", NULL, types, 1);
278 /* base add */
279 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o2_b");
281 test_attr_types(base, "o3_m1_attr_2", d, types, 1);
283 /* attr a added to in base optional, declared/added in module , added to in other module optional */
284 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_m1"))->decl_id;
285 test_sym_presence(base, "g_m1_attr_4", SYM_TYPES, SCOPE_DECL, decls, 1);
287 test_attr_types(base, "g_m1_attr_4", NULL, types, 1);
289 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o2_m2");
291 test_attr_types(base, "g_m1_attr_4", d, types, 1);
292 /* base add */
293 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o5_b");
295 test_attr_types(base, "g_m1_attr_4", d, types, 1);
297 /* attr a added to in base optional, declared/added in module optional, added to in other module optional */
298 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o4_m1");
300 test_sym_presence(base, "o4_m1_attr_1", SYM_TYPES, SCOPE_DECL, decls, 1);
302 test_attr_types(base, "o4_m1_attr_1", d, types, 1);
304 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o2_m2");
306 test_attr_types(base, "o4_m1_attr_1", d, types, 1);
307 /* base add */
308 d = test_find_decl_by_sym(base, SYM_TYPES, "tag_o5_b");
310 test_attr_types(base, "o4_m1_attr_1", d, types, 1);
313 decls[0] = (test_find_decl_by_sym(base, SYM_TYPES, "tag_g_m1"))->decl_id;
314 test_sym_presence(base, "g_m_alias_1", SYM_TYPES, SCOPE_DECL, decls, 1);
315 test_alias_datum(base, "g_m_alias_1", "g_b_type_3", 1, 0);