selftests/bpf: convert socket_cookie test to sk storage
authorStanislav Fomichev <sdf@google.com>
Wed, 12 Jun 2019 17:30:40 +0000 (10:30 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 14 Jun 2019 23:21:59 +0000 (01:21 +0200)
commit69d96519dbf0bfa1868dc8597d4b9b2cdeb009d7
tree2c45644e96d72b3d239817d4cdac255a131e043c
parentcd17d77705780e2270937fb3cbd2b985adab3edc
selftests/bpf: convert socket_cookie test to sk storage

This lets us test that both BPF_PROG_TYPE_CGROUP_SOCK_ADDR and
BPF_PROG_TYPE_SOCK_OPS can access underlying bpf_sock.

Cc: Martin Lau <kafai@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/progs/socket_cookie_prog.c
tools/testing/selftests/bpf/test_socket_cookie.c