diff options
| author | Jakub Kicinski <[email protected]> | 2019-01-25 15:24:43 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2019-01-27 21:37:45 -0800 |
| commit | 40f2fbd5a5e9c6d0799632fcba174a7b45c471da (patch) | |
| tree | a2a70957c9a979dc1f6d82eada377f9402865f5f /tools/testing/selftests/bpf/verifier/basic.c | |
| parent | 2dfb40121ee83139909e4e17d414eee87897bb8e (diff) | |
selftests: bpf: break up test_verifier
Break up the first 10 kLoC of test verifier test cases
out into smaller files. Looks like git line counting
gets a little flismy above 16 bit integers, so we need
two commits to break up test_verifier.
Signed-off-by: Jakub Kicinski <[email protected]>
Acked-by: Jiong Wang <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/verifier/basic.c')
| -rw-r--r-- | tools/testing/selftests/bpf/verifier/basic.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/verifier/basic.c b/tools/testing/selftests/bpf/verifier/basic.c new file mode 100644 index 000000000000..b8d18642653a --- /dev/null +++ b/tools/testing/selftests/bpf/verifier/basic.c @@ -0,0 +1,23 @@ +{ + "empty prog", + .insns = { + }, + .errstr = "unknown opcode 00", + .result = REJECT, +}, +{ + "only exit insn", + .insns = { + BPF_EXIT_INSN(), + }, + .errstr = "R0 !read_ok", + .result = REJECT, +}, +{ + "no bpf_exit", + .insns = { + BPF_ALU64_REG(BPF_MOV, BPF_REG_0, BPF_REG_2), + }, + .errstr = "not an exit", + .result = REJECT, +}, |