diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-08-02 16:23:40 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-08-06 08:20:31 -0700 |
commit | 8c30396074c131765b19eb3cb7ff764a4f2f2913 (patch) | |
tree | 46e44350fd17175e1ab9b8394c980c6e6fe89300 /tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c | |
parent | a78d0dbec712999ecd2f800eea0f62dc93867a78 (diff) |
selftests/bpf: add loop test 5
Add a test with multiple exit conditions.
It's not an infinite loop only when the verifier can properly track
all math on variable 'i' through all possible ways of executing this loop.
barrier()s are needed to disable llvm optimization that combines multiple
branches into fewer branches.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c b/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c index e9e72d8d7aae..0caf8eafa9eb 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c @@ -72,6 +72,7 @@ void test_bpf_verif_scale(void) { "loop1.o", BPF_PROG_TYPE_RAW_TRACEPOINT }, { "loop2.o", BPF_PROG_TYPE_RAW_TRACEPOINT }, { "loop4.o", BPF_PROG_TYPE_SCHED_CLS }, + { "loop5.o", BPF_PROG_TYPE_SCHED_CLS }, /* partial unroll. 19k insn in a loop. * Total program size 20.8k insn. |