Lines Matching refs:test
208 static void test_prog_type_by_name(const struct sec_name_test *test) in test_prog_type_by_name() argument
214 rc = libbpf_prog_type_by_name(test->sec_name, &prog_type, in test_prog_type_by_name()
217 CHECK(rc != test->expected_load.rc, "check_code", in test_prog_type_by_name()
218 "prog: unexpected rc=%d for %s\n", rc, test->sec_name); in test_prog_type_by_name()
223 CHECK(prog_type != test->expected_load.prog_type, "check_prog_type", in test_prog_type_by_name()
225 prog_type, test->sec_name); in test_prog_type_by_name()
227 CHECK(expected_attach_type != test->expected_load.expected_attach_type, in test_prog_type_by_name()
229 expected_attach_type, test->sec_name); in test_prog_type_by_name()
232 static void test_attach_type_by_name(const struct sec_name_test *test) in test_attach_type_by_name() argument
237 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name()
239 CHECK(rc != test->expected_attach.rc, "check_ret", in test_attach_type_by_name()
240 "attach: unexpected rc=%d for %s\n", rc, test->sec_name); in test_attach_type_by_name()
245 CHECK(attach_type != test->expected_attach.attach_type, in test_attach_type_by_name()
247 attach_type, test->sec_name); in test_attach_type_by_name()
255 struct sec_name_test *test = &tests[i]; in test_section_names() local
257 test_prog_type_by_name(test); in test_section_names()
258 test_attach_type_by_name(test); in test_section_names()