]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: selftest: Trigger a DCE on the whole subprog
authorMartin KaFai Lau <kafai@fb.com>
Sat, 6 Nov 2021 01:40:20 +0000 (18:40 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 6 Nov 2021 19:54:12 +0000 (12:54 -0700)
commitcb6d98ba8c3ba938125728bccb3d4c3f4437881d
tree54810b9f3412a1609a829507bf943ae58e88b243
parent723bf4e66009987590262872f87b656f40f4c57f
bpf: selftest: Trigger a DCE on the whole subprog

This patch adds a test to trigger the DCE to remove
the whole subprog to ensure the verifier  does not
depend on a stable subprog index.  The DCE is done
by testing a global const.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211106014020.651638-1-kafai@fb.com
tools/testing/selftests/bpf/progs/for_each_array_map_elem.c