diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-01-26 00:24:42 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-01-28 06:37:45 +0100 |
commit | 2dfb40121ee83139909e4e17d414eee87897bb8e (patch) | |
tree | 15f8621dd465b576f8527ae75caf80e574815ae7 /tools/testing/selftests/bpf/test_verifier.c | |
parent | Merge branch 'jmp32-insns' (diff) | |
download | linux-2dfb40121ee83139909e4e17d414eee87897bb8e.tar.xz linux-2dfb40121ee83139909e4e17d414eee87897bb8e.zip |
selftests: bpf: prepare for break up of verifier tests
test_verifier.c has grown to be very long (almost 16 kLoC),
and it is very conflict prone since we always add tests at
the end.
Try to break it apart a little bit. Allow test snippets
to be defined in separate files and include them automatically
into the huge test array.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_verifier.c')
-rw-r--r-- | tools/testing/selftests/bpf/test_verifier.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index 1df757645a9a..0a1847c3d1a3 100644 --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c @@ -248,6 +248,9 @@ static void bpf_fill_rand_ld_dw(struct bpf_test *self) BPF_ALU64_IMM(BPF_ARSH, BPF_REG_7, 32) static struct bpf_test tests[] = { +#define FILL_ARRAY +#include <verifier/tests.h> +#undef FILL_ARRAY { "add+sub+mul", .insns = { |