]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: make 'dubious pointer arithmetic' test useful
authorAlexei Starovoitov <ast@kernel.org>
Wed, 24 Jan 2018 04:05:51 +0000 (20:05 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 24 Jan 2018 09:39:58 +0000 (10:39 +0100)
commite66d5b568be5cdb805b3fed4db896cc91647d8a0
treef64c8ada251c8120e8c8e40daa5b90d77be43228
parentaa28f3efb2f51394de73530fac6207a4f13b226a
selftests/bpf: make 'dubious pointer arithmetic' test useful

mostly revert the previous workaround and make
'dubious pointer arithmetic' test useful again.
Use (ptr - ptr) << const instead of ptr << const to generate large scalar.
The rest stays as before commit 1f62a72875c5.

Fixes: 1f62a72875c5 ("selftests/bpf: fix test_align")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_align.c