selftests/bpf: Test narrow loads with off > 0 in test_verifier
authorAndrey Ignatov <rdna@fb.com>
Sun, 11 Nov 2018 06:15:14 +0000 (22:15 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 11 Nov 2018 06:29:59 +0000 (22:29 -0800)
commit6c2afb674dbda9b736b8f09c976516e1e788860a
tree2d03d5868d7f12e7317816e72da7bd4fbdc7370d
parent46f53a65d2de3e1591636c22b626b09d8684fd71
selftests/bpf: Test narrow loads with off > 0 in test_verifier

Test the following narrow loads in test_verifier for context __sk_buff:
* off=1, size=1 - ok;
* off=2, size=1 - ok;
* off=3, size=1 - ok;
* off=0, size=2 - ok;
* off=1, size=2 - fail;
* off=0, size=2 - ok;
* off=3, size=2 - fail.

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