samples/bpf: add a test for bpf_override_return
This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Acked-by: NAlexei Starovoitov <ast@kernel.org> Signed-off-by: NJosef Bacik <jbacik@fb.com> Acked-by: NDaniel Borkmann <daniel@iogearbox.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
samples/bpf/tracex7_kern.c
0 → 100644
samples/bpf/tracex7_user.c
0 → 100644
想要评论请 注册 或 登录