Home
last modified time | relevance | path

Searched refs:ASSERT_ERR (Results 1 – 25 of 49) sorted by relevance

12

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dsnprintf.c108 ASSERT_ERR(load_single_snprintf("0123456789"), "no terminating zero"); in test_snprintf_negative()
109 ASSERT_ERR(load_single_snprintf("%d %d"), "too many specifiers"); in test_snprintf_negative()
110 ASSERT_ERR(load_single_snprintf("%pi5"), "invalid specifier 1"); in test_snprintf_negative()
111 ASSERT_ERR(load_single_snprintf("%a"), "invalid specifier 2"); in test_snprintf_negative()
112 ASSERT_ERR(load_single_snprintf("%"), "invalid specifier 3"); in test_snprintf_negative()
113 ASSERT_ERR(load_single_snprintf("%12345678"), "invalid specifier 4"); in test_snprintf_negative()
114 ASSERT_ERR(load_single_snprintf("%--------"), "invalid specifier 5"); in test_snprintf_negative()
115 ASSERT_ERR(load_single_snprintf("%lc"), "invalid specifier 6"); in test_snprintf_negative()
116 ASSERT_ERR(load_single_snprintf("%llc"), "invalid specifier 7"); in test_snprintf_negative()
117 ASSERT_ERR(load_single_snprintf("\x80"), "non ascii character"); in test_snprintf_negative()
[all …]
H A Dlookup_and_delete.c127 if (!ASSERT_ERR(err, "bpf_map_lookup_elem")) in test_lookup_and_delete_hash()
167 if (!ASSERT_ERR(err, "bpf_map_lookup_elem")) in test_lookup_and_delete_percpu_hash()
208 if (!ASSERT_ERR(err, "bpf_map_lookup_elem")) in test_lookup_and_delete_lru_hash()
213 if (!ASSERT_ERR(err, "bpf_map_lookup_elem")) in test_lookup_and_delete_lru_hash()
267 if (!ASSERT_ERR(err, "bpf_map_lookup_elem")) in test_lookup_and_delete_lru_percpu_hash()
272 if (!ASSERT_ERR(err, "bpf_map_lookup_elem")) in test_lookup_and_delete_lru_percpu_hash()
H A Dlog_fixup.c30 if (!ASSERT_ERR(err, "load_fail")) in bad_core_relo()
86 if (!ASSERT_ERR(err, "load_fail")) in bad_core_relo_subprog()
120 if (!ASSERT_ERR(err, "load_fail")) in missing_map()
152 if (!ASSERT_ERR(err, "load_fail")) in missing_kfunc()
H A Dcgroup_getset_retval.c38 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_set()
78 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_set_and_get()
158 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_default_zero_and_set()
207 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_override()
253 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_legacy_eperm()
304 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_legacy_no_override()
346 if (!ASSERT_ERR(getsockopt(sock_fd, SOL_CUSTOM, 0, in test_getsockopt_get()
388 if (!ASSERT_ERR(getsockopt(sock_fd, SOL_CUSTOM, 0, in test_getsockopt_override()
H A Dbtf_tag.c130 ASSERT_ERR(err, "btf_type_tag_user"); in test_btf_type_tag_mod_user()
156 ASSERT_ERR(err, "btf_type_tag_user"); in test_btf_type_tag_vmlinux_user()
185 ASSERT_ERR(err, "btf_type_tag_percpu"); in test_btf_type_tag_mod_percpu()
213 ASSERT_ERR(err, "btf_type_tag_percpu_load"); in test_btf_type_tag_vmlinux_percpu()
H A Dxdp_link.c83 if (!ASSERT_ERR(err, "prog_attach_fail")) in serial_test_xdp_link()
88 if (!ASSERT_ERR(err, "prog_update_fail")) in serial_test_xdp_link()
93 if (!ASSERT_ERR(err, "prog_detach_fail")) in serial_test_xdp_link()
133 if (!ASSERT_ERR(err, "link_upd_invalid")) in serial_test_xdp_link()
H A Duprobe_multi_test.c380 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
392 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
404 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
416 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
429 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
442 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
455 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
468 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
482 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
497 if (!ASSERT_ERR(link_fd, "link_fd")) in test_attach_api_fails()
[all …]
H A Dmodule_attach.c98 ASSERT_ERR(unload_bpf_testmod(false), "unload_bpf_testmod"); in test_module_attach()
105 ASSERT_ERR(unload_bpf_testmod(false), "unload_bpf_testmod"); in test_module_attach()
112 ASSERT_ERR(unload_bpf_testmod(false), "unload_bpf_testmod"); in test_module_attach()
H A Dtest_strncmp.c99 ASSERT_ERR(err, "strncmp_test load bad_not_const_str_size"); in test_strncmp_bad_not_const_str_size()
116 ASSERT_ERR(err, "strncmp_test load bad_writable_target"); in test_strncmp_bad_writable_target()
133 ASSERT_ERR(err, "strncmp_test load bad_not_null_term_target"); in test_strncmp_bad_not_null_term_target()
H A Duser_ringbuf.c114 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_WRITE), "write_cons_pos_protect"); in test_user_ringbuf_mappings()
115 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_cons_pos_protect"); in test_user_ringbuf_mappings()
118 ASSERT_ERR(err, "wr_prod_pos_err"); in test_user_ringbuf_mappings()
125 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_prod_pos_protect"); in test_user_ringbuf_mappings()
127 ASSERT_ERR(err, "wr_prod_pos_err"); in test_user_ringbuf_mappings()
134 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_data_protect"); in test_user_ringbuf_mappings()
136 ASSERT_ERR(err, "exec_data_err"); in test_user_ringbuf_mappings()
367 ASSERT_ERR(err, "write_samples"); in test_user_ringbuf_overfill()
H A Dbad_struct_ops.c22 ASSERT_ERR(err, "bad_struct_ops__load should fail"); in invalid_prog_reuse()
51 ASSERT_ERR(err, "bad_struct_ops2__load should fail"); in unused_program()
H A Dbtf_write.c43 ASSERT_ERR(id, "int_bad_sz"); in gen_btf()
46 ASSERT_ERR(id, "int_bad_enc"); in gen_btf()
49 ASSERT_ERR(id, "int_bad_null_name"); in gen_btf()
52 ASSERT_ERR(id, "int_bad_empty_name"); in gen_btf()
100 ASSERT_ERR(err, "no_struct_field"); in gen_btf()
135 ASSERT_ERR(err, "no_struct_field"); in gen_btf()
H A Dringbuf.c170 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_cons_pos_protect"); in ringbuf_subtest()
194 ASSERT_ERR(mprotect(mmap_ptr, 4 * page_size, PROT_WRITE), "write_protect"); in ringbuf_subtest()
195 ASSERT_ERR(mprotect(mmap_ptr, 4 * page_size, PROT_EXEC), "exec_protect"); in ringbuf_subtest()
204 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_WRITE), "write_protect"); in ringbuf_subtest()
205 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_protect"); in ringbuf_subtest()
H A Draw_tp_test_run.c73 ASSERT_ERR(err, "test_run_opts_fail"); in test_raw_tp_test_run()
80 ASSERT_ERR(err, "test_run_opts_fail"); in test_raw_tp_test_run()
H A Drecursive_attach.c87 if (!ASSERT_ERR(err, "fentry_recursive__load")) in test_recursive_fentry_chain()
146 ASSERT_ERR(err, "fentry_recursive__attach"); in test_fentry_attach_btf_presence()
H A Dtest_struct_ops_module.c134 ASSERT_ERR(err, "struct_ops_module_load_not_zeroed"); in test_struct_ops_not_zeroed()
148 ASSERT_ERR(err, "struct_ops_module_load_not_zeroed_op"); in test_struct_ops_not_zeroed()
223 if (!ASSERT_ERR(err, "skel_load")) in test_struct_ops_forgotten_cb()
H A Dxdp_context_test_run.c25 ASSERT_ERR(err, "bpf_prog_test_run"); in test_xdp_context_error()
54 ASSERT_ERR(err, "bpf_prog_test_run(extradata)"); in test_xdp_context_test_run()
H A Drcu_read_lock.c102 ASSERT_ERR(err, "skel_load"); in test_inproper_region()
129 ASSERT_ERR(err, "skel_load"); in test_rcuptr_misuse()
H A Dbpf_tcp_ca.c172 if (!ASSERT_ERR(err, "bpf_map_lookup_elem(sk_stg_map)") || in test_dctcp()
460 ASSERT_ERR(err, "update_map"); in test_update_wrong()
498 ASSERT_ERR(err, "update_map"); in test_mixed_links()
558 ASSERT_ERR(err, "bpf_link_update_fail"); in test_link_replace()
H A Dsockmap_basic.c73 ASSERT_ERR(err, "map_lookup_elem(dst)"); in compare_cookies()
157 if (!ASSERT_ERR(err, "bpf_prog_attach")) in test_skmsg_helpers_with_link()
173 if (!ASSERT_ERR(err, "bpf_link__update_program")) in test_skmsg_helpers_with_link()
180 if (!ASSERT_ERR(err, "bpf_link_update")) in test_skmsg_helpers_with_link()
640 if (!ASSERT_ERR(err, "bpf_link__update_program")) in test_sockmap_skb_verdict_peek_with_link()
672 ASSERT_ERR(err, "bpf_map_update_elem(stream)"); in test_sockmap_unconnected_unix()
H A Dhelper_restricted.c27 ASSERT_ERR(err, "load_should_fail"); in test_helper_restricted()
H A Dtracing_failure.c25 ASSERT_ERR(err, "tracing_failure__attach"); in test_bpf_spin_lock()
H A Dlog_buf.c72 if (!ASSERT_ERR(err, "unexpected_load_success")) in obj_load_log_buf()
115 if (!ASSERT_ERR(err, "unexpected_load_success")) in obj_load_log_buf()
H A Dtoken.c774 if (!ASSERT_ERR(err, "obj_token_lsm_reject_cap_load")) in userns_obj_priv_prog()
785 if (!ASSERT_ERR(err, "obj_token_lsm_reject_cmd_load")) in userns_obj_priv_prog()
814 if (!ASSERT_ERR(err, "obj_token_path_load")) in validate_struct_ops_load()
887 if (!ASSERT_ERR(err, "obj_empty_token_path_load")) in userns_obj_priv_implicit_token()
951 if (!ASSERT_ERR(err, "obj_empty_token_path_load")) in userns_obj_priv_implicit_token_envvar()
H A Dcb_refs.c40 if (!ASSERT_ERR(cb_refs__load(skel), "cb_refs__load")) in test_cb_refs()

12