]> 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)
commit33484808606728de5f7855864d202c64d8ef4f87
tree5becefbbc55a9fdf4d430224f063c63eab8a2cec
parentbf379367a6f9fbb7a17a7200669d9669b7562a37
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