selftests/bpf: Test narrow loads with off > 0 for bpf_sock_addr
authorAndrey Ignatov <rdna@fb.com>
Sun, 11 Nov 2018 06:15:15 +0000 (22:15 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 11 Nov 2018 06:29:59 +0000 (22:29 -0800)
commite7605475f5f1af58668701b5ffe7763bdeb28527
tree909ae9f0eb94d01c31e640c7a4a95f7ff400d959
parent6c2afb674dbda9b736b8f09c976516e1e788860a
selftests/bpf: Test narrow loads with off > 0 for bpf_sock_addr

Add more test cases for context bpf_sock_addr to test narrow loads with
offset > 0 for ctx->user_ip4 field (__u32):
* off=1, size=1;
* off=2, size=1;
* off=3, size=1;
* off=2, size=2.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_sock_addr.c