Lines Matching refs:ASSERT_EQ

18 	ASSERT_EQ(str_off, -ENOENT, "int_str_missing_off");  in gen_btf()
21 ASSERT_EQ(str_off, 1, "int_str_off"); in gen_btf()
24 ASSERT_EQ(str_off, 1, "int_str_found_off"); in gen_btf()
28 ASSERT_EQ(id, 1, "int_id"); in gen_btf()
32 ASSERT_EQ(t->name_off, str_off, "int_name_off"); in gen_btf()
34 ASSERT_EQ(btf_kind(t), BTF_KIND_INT, "int_kind"); in gen_btf()
35 ASSERT_EQ(t->size, 4, "int_sz"); in gen_btf()
36 ASSERT_EQ(btf_int_encoding(t), BTF_INT_SIGNED, "int_enc"); in gen_btf()
37 ASSERT_EQ(btf_int_bits(t), 32, "int_bits"); in gen_btf()
56 ASSERT_EQ(id, 2, "ptr_id"); in gen_btf()
58 ASSERT_EQ(btf_kind(t), BTF_KIND_PTR, "ptr_kind"); in gen_btf()
59 ASSERT_EQ(t->type, 1, "ptr_type"); in gen_btf()
64 ASSERT_EQ(id, 3, "const_id"); in gen_btf()
66 ASSERT_EQ(btf_kind(t), BTF_KIND_CONST, "const_kind"); in gen_btf()
67 ASSERT_EQ(t->type, 5, "const_type"); in gen_btf()
72 ASSERT_EQ(id, 4, "volatile_id"); in gen_btf()
74 ASSERT_EQ(btf_kind(t), BTF_KIND_VOLATILE, "volatile_kind"); in gen_btf()
75 ASSERT_EQ(t->type, 3, "volatile_type"); in gen_btf()
80 ASSERT_EQ(id, 5, "restrict_id"); in gen_btf()
82 ASSERT_EQ(btf_kind(t), BTF_KIND_RESTRICT, "restrict_kind"); in gen_btf()
83 ASSERT_EQ(t->type, 4, "restrict_type"); in gen_btf()
89 ASSERT_EQ(id, 6, "array_id"); in gen_btf()
91 ASSERT_EQ(btf_kind(t), BTF_KIND_ARRAY, "array_kind"); in gen_btf()
92 ASSERT_EQ(btf_array(t)->index_type, 1, "array_index_type"); in gen_btf()
93 ASSERT_EQ(btf_array(t)->type, 2, "array_elem_type"); in gen_btf()
94 ASSERT_EQ(btf_array(t)->nelems, 10, "array_nelems"); in gen_btf()
102 ASSERT_EQ(id, 7, "struct_id"); in gen_btf()
110 ASSERT_EQ(btf_kind(t), BTF_KIND_STRUCT, "struct_kind"); in gen_btf()
111 ASSERT_EQ(btf_vlen(t), 2, "struct_vlen"); in gen_btf()
112 ASSERT_EQ(btf_kflag(t), true, "struct_kflag"); in gen_btf()
113 ASSERT_EQ(t->size, 8, "struct_sz"); in gen_btf()
116 ASSERT_EQ(m->type, 1, "f1_type"); in gen_btf()
117 ASSERT_EQ(btf_member_bit_offset(t, 0), 0, "f1_bit_off"); in gen_btf()
118 ASSERT_EQ(btf_member_bitfield_size(t, 0), 0, "f1_bit_sz"); in gen_btf()
121 ASSERT_EQ(m->type, 1, "f2_type"); in gen_btf()
122 ASSERT_EQ(btf_member_bit_offset(t, 1), 32, "f2_bit_off"); in gen_btf()
123 ASSERT_EQ(btf_member_bitfield_size(t, 1), 16, "f2_bit_sz"); in gen_btf()
131 ASSERT_EQ(id, 8, "union_id"); in gen_btf()
142 ASSERT_EQ(btf_kind(t), BTF_KIND_UNION, "union_kind"); in gen_btf()
143 ASSERT_EQ(btf_vlen(t), 1, "union_vlen"); in gen_btf()
144 ASSERT_EQ(btf_kflag(t), true, "union_kflag"); in gen_btf()
145 ASSERT_EQ(t->size, 8, "union_sz"); in gen_btf()
148 ASSERT_EQ(m->type, 1, "f1_type"); in gen_btf()
149 ASSERT_EQ(btf_member_bit_offset(t, 0), 0, "f1_bit_off"); in gen_btf()
150 ASSERT_EQ(btf_member_bitfield_size(t, 0), 16, "f1_bit_sz"); in gen_btf()
157 ASSERT_EQ(id, 9, "enum_id"); in gen_btf()
165 ASSERT_EQ(btf_kind(t), BTF_KIND_ENUM, "enum_kind"); in gen_btf()
166 ASSERT_EQ(btf_vlen(t), 2, "enum_vlen"); in gen_btf()
167 ASSERT_EQ(t->size, 4, "enum_sz"); in gen_btf()
170 ASSERT_EQ(v->val, 1, "v1_val"); in gen_btf()
173 ASSERT_EQ(v->val, 2, "v2_val"); in gen_btf()
181 ASSERT_EQ(id, 10, "struct_fwd_id"); in gen_btf()
184 ASSERT_EQ(btf_kind(t), BTF_KIND_FWD, "fwd_kind"); in gen_btf()
185 ASSERT_EQ(btf_kflag(t), 0, "fwd_kflag"); in gen_btf()
190 ASSERT_EQ(id, 11, "union_fwd_id"); in gen_btf()
193 ASSERT_EQ(btf_kind(t), BTF_KIND_FWD, "fwd_kind"); in gen_btf()
194 ASSERT_EQ(btf_kflag(t), 1, "fwd_kflag"); in gen_btf()
199 ASSERT_EQ(id, 12, "enum_fwd_id"); in gen_btf()
202 ASSERT_EQ(btf_kind(t), BTF_KIND_ENUM, "enum_fwd_kind"); in gen_btf()
203 ASSERT_EQ(btf_vlen(t), 0, "enum_fwd_kind"); in gen_btf()
204 ASSERT_EQ(t->size, 4, "enum_fwd_sz"); in gen_btf()
210 ASSERT_EQ(id, 13, "typedef_fwd_id"); in gen_btf()
213 ASSERT_EQ(btf_kind(t), BTF_KIND_TYPEDEF, "typedef_kind"); in gen_btf()
214 ASSERT_EQ(t->type, 1, "typedef_type"); in gen_btf()
220 ASSERT_EQ(id, 14, "func_id"); in gen_btf()
223 ASSERT_EQ(t->type, 15, "func_type"); in gen_btf()
224 ASSERT_EQ(btf_kind(t), BTF_KIND_FUNC, "func_kind"); in gen_btf()
225 ASSERT_EQ(btf_vlen(t), BTF_FUNC_GLOBAL, "func_vlen"); in gen_btf()
230 ASSERT_EQ(id, 15, "func_proto_id"); in gen_btf()
237 ASSERT_EQ(btf_kind(t), BTF_KIND_FUNC_PROTO, "func_proto_kind"); in gen_btf()
238 ASSERT_EQ(btf_vlen(t), 2, "func_proto_vlen"); in gen_btf()
239 ASSERT_EQ(t->type, 1, "func_proto_ret_type"); in gen_btf()
242 ASSERT_EQ(p->type, 1, "p1_type"); in gen_btf()
245 ASSERT_EQ(p->type, 2, "p2_type"); in gen_btf()
253 ASSERT_EQ(id, 16, "var_id"); in gen_btf()
256 ASSERT_EQ(btf_kind(t), BTF_KIND_VAR, "var_kind"); in gen_btf()
257 ASSERT_EQ(t->type, 1, "var_type"); in gen_btf()
258 ASSERT_EQ(btf_var(t)->linkage, BTF_VAR_GLOBAL_ALLOCATED, "var_type"); in gen_btf()
264 ASSERT_EQ(id, 17, "datasec_id"); in gen_btf()
270 ASSERT_EQ(t->size, 12, "datasec_sz"); in gen_btf()
271 ASSERT_EQ(btf_kind(t), BTF_KIND_DATASEC, "datasec_kind"); in gen_btf()
272 ASSERT_EQ(btf_vlen(t), 1, "datasec_vlen"); in gen_btf()
274 ASSERT_EQ(vi->type, 1, "v1_type"); in gen_btf()
275 ASSERT_EQ(vi->offset, 4, "v1_off"); in gen_btf()
276 ASSERT_EQ(vi->size, 8, "v1_sz"); in gen_btf()
283 ASSERT_EQ(id, 18, "tag_id"); in gen_btf()
286 ASSERT_EQ(btf_kind(t), BTF_KIND_DECL_TAG, "tag_kind"); in gen_btf()
287 ASSERT_EQ(t->type, 16, "tag_type"); in gen_btf()
288 ASSERT_EQ(btf_decl_tag(t)->component_idx, -1, "tag_component_idx"); in gen_btf()
293 ASSERT_EQ(id, 19, "tag_id"); in gen_btf()
296 ASSERT_EQ(btf_kind(t), BTF_KIND_DECL_TAG, "tag_kind"); in gen_btf()
297 ASSERT_EQ(t->type, 14, "tag_type"); in gen_btf()
298 ASSERT_EQ(btf_decl_tag(t)->component_idx, 1, "tag_component_idx"); in gen_btf()
304 ASSERT_EQ(id, 20, "tag_id"); in gen_btf()
307 ASSERT_EQ(btf_kind(t), BTF_KIND_TYPE_TAG, "tag_kind"); in gen_btf()
308 ASSERT_EQ(t->type, 1, "tag_type"); in gen_btf()
314 ASSERT_EQ(id, 21, "enum64_id"); in gen_btf()
321 ASSERT_EQ(btf_kind(t), BTF_KIND_ENUM64, "enum64_kind"); in gen_btf()
322 ASSERT_EQ(btf_vlen(t), 2, "enum64_vlen"); in gen_btf()
323 ASSERT_EQ(t->size, 8, "enum64_sz"); in gen_btf()
326 ASSERT_EQ(v64->val_hi32, 0xffffffff, "v1_val"); in gen_btf()
327 ASSERT_EQ(v64->val_lo32, 0xffffffff, "v1_val"); in gen_btf()
330 ASSERT_EQ(v64->val_hi32, 0x1, "v2_val"); in gen_btf()
331 ASSERT_EQ(v64->val_lo32, 0x23456789, "v2_val"); in gen_btf()
338 ASSERT_EQ(id, 22, "enum64_id"); in gen_btf()
343 ASSERT_EQ(btf_kind(t), BTF_KIND_ENUM64, "enum64_kind"); in gen_btf()
344 ASSERT_EQ(btf_vlen(t), 1, "enum64_vlen"); in gen_btf()
345 ASSERT_EQ(t->size, 8, "enum64_sz"); in gen_btf()
348 ASSERT_EQ(v64->val_hi32, 0xffffffff, "v1_val"); in gen_btf()
349 ASSERT_EQ(v64->val_lo32, 0xffffffff, "v1_val"); in gen_btf()
421 if (!ASSERT_EQ(id, 23, "id")) in test_btf_add_btf()