mirror of
https://github.com/torvalds/linux.git
synced 2026-06-24 23:21:57 +02:00
The bpf selftests test_sock and test_sock_addr.sh failed
in my test machine. The failure looks like:
$ ./test_sock
Test case: bind4 load with invalid access: src_ip6 .. [PASS]
Test case: bind4 load with invalid access: mark .. [PASS]
Test case: bind6 load with invalid access: src_ip4 .. [PASS]
Test case: sock_create load with invalid access: src_port .. [PASS]
Test case: sock_create load w/o expected_attach_type (compat mode) .. [FAIL]
Test case: sock_create load w/ expected_attach_type .. [FAIL]
Test case: attach type mismatch bind4 vs bind6 .. [FAIL]
...
Summary: 4 PASSED, 12 FAILED
$ ./test_sock_addr.sh
Wait for testing IPv4/IPv6 to become available .....
ERROR: Timeout waiting for test IP to become available.
In test_sock, bpf program loads failed due to hitting memlock limits.
In test_sock_addr.sh, my test machine is a ipv6 only test box and using
"ping" without specifying address family for an ipv6 address does not work.
This patch fixed the issue by including header bpf_rlimit.h in test_sock.c
and test_sock_addr.c, and specifying address family for ping command.
Cc: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|
||
|---|---|---|
| .. | ||
| gnu | ||
| include/uapi/linux | ||
| .gitignore | ||
| bpf_endian.h | ||
| bpf_helpers.h | ||
| bpf_rlimit.h | ||
| bpf_util.h | ||
| cgroup_helpers.c | ||
| cgroup_helpers.h | ||
| config | ||
| connect4_prog.c | ||
| connect6_prog.c | ||
| dev_cgroup.c | ||
| Makefile | ||
| sample_map_ret0.c | ||
| sample_ret0.c | ||
| sockmap_parse_prog.c | ||
| sockmap_tcp_msg_prog.c | ||
| sockmap_verdict_prog.c | ||
| tcp_client.py | ||
| tcp_server.py | ||
| test_align.c | ||
| test_dev_cgroup.c | ||
| test_iptunnel_common.h | ||
| test_kmod.sh | ||
| test_l4lb_noinline.c | ||
| test_l4lb.c | ||
| test_libbpf_open.c | ||
| test_libbpf.sh | ||
| test_lpm_map.c | ||
| test_lru_map.c | ||
| test_maps.c | ||
| test_obj_id.c | ||
| test_offload.py | ||
| test_pkt_access.c | ||
| test_pkt_md_access.c | ||
| test_progs.c | ||
| test_sock_addr.c | ||
| test_sock_addr.sh | ||
| test_sock.c | ||
| test_stacktrace_build_id.c | ||
| test_stacktrace_map.c | ||
| test_tag.c | ||
| test_tcp_estats.c | ||
| test_tcpbpf_kern.c | ||
| test_tcpbpf_user.c | ||
| test_tcpbpf.h | ||
| test_tracepoint.c | ||
| test_verifier_log.c | ||
| test_verifier.c | ||
| test_xdp_meta.c | ||
| test_xdp_meta.sh | ||
| test_xdp_noinline.c | ||
| test_xdp_redirect.c | ||
| test_xdp_redirect.sh | ||
| test_xdp.c | ||
| urandom_read.c | ||