diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-04-12 14:41:32 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-04-16 10:18:15 +0200 |
commit | 08de198c95438fcbfad7bc06121176794ec92c6e (patch) | |
tree | b45d78fdab0f19b90a9a95dc6b1519d61e1dbc62 /tools/testing/selftests/bpf/verifier/scale.c | |
parent | bpftool: Improve handling of ENOSPC on reuseport_array map dumps (diff) | |
download | linux-dev-08de198c95438fcbfad7bc06121176794ec92c6e.tar.xz linux-dev-08de198c95438fcbfad7bc06121176794ec92c6e.zip |
selftests/bpf: two scale tests
Add two tests to check that sequence of 1024 jumps is verifiable.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to '')
-rw-r--r-- | tools/testing/selftests/bpf/verifier/scale.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/verifier/scale.c b/tools/testing/selftests/bpf/verifier/scale.c new file mode 100644 index 000000000000..7f868d4802e0 --- /dev/null +++ b/tools/testing/selftests/bpf/verifier/scale.c @@ -0,0 +1,18 @@ +{ + "scale: scale test 1", + .insns = { }, + .data = { }, + .fill_helper = bpf_fill_scale, + .prog_type = BPF_PROG_TYPE_SCHED_CLS, + .result = ACCEPT, + .retval = 1, +}, +{ + "scale: scale test 2", + .insns = { }, + .data = { }, + .fill_helper = bpf_fill_scale, + .prog_type = BPF_PROG_TYPE_SCHED_CLS, + .result = ACCEPT, + .retval = 2, +}, |