]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add test for map_ptr arithmetic
authorYonghong Song <yhs@fb.com>
Tue, 8 Sep 2020 17:57:03 +0000 (10:57 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 9 Sep 2020 01:04:07 +0000 (18:04 -0700)
commitb548c395296b98fc98a63b2c33c46d4029fe79f8
tree5becefbbc55a9fdf4d430224f063c63eab8a2cec
parentcb21ec142735c4d85ba965f0e5d0fe76f7668876
selftests/bpf: Add test for map_ptr arithmetic

Change selftest map_ptr_kern.c with disabling inlining for
one of subtests, which will fail the test without previous
verifier change. Also added to verifier test for both
"map_ptr += scalar" and "scalar += map_ptr" arithmetic.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200908175703.2463721-1-yhs@fb.com
tools/testing/selftests/bpf/progs/map_ptr_kern.c
tools/testing/selftests/bpf/verifier/map_ptr.c