diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-03-01 12:31:41 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-01 14:05:18 -0500 |
commit | f91fe17e243d1f279d425071a35e3d41290758a0 (patch) | |
tree | be27553798f8f3490487814275e09644e446c88f /samples | |
parent | b656cc64cf815d8ff6e99883a531fafc48199bd0 (diff) | |
download | linux-stable-f91fe17e243d1f279d425071a35e3d41290758a0.tar.gz linux-stable-f91fe17e243d1f279d425071a35e3d41290758a0.tar.bz2 linux-stable-f91fe17e243d1f279d425071a35e3d41290758a0.zip |
ebpf: remove kernel test stubs
Now that we have BPF_PROG_TYPE_SOCKET_FILTER up and running, we can
remove the test stubs which were added to get the verifier suite up.
We can just let the test cases probe under socket filter type instead.
In the fill/spill test case, we cannot (yet) access fields from the
context (skb), but we may adapt that test case in future.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/bpf/test_verifier.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/bpf/test_verifier.c b/samples/bpf/test_verifier.c index b96175e90363..7b56b59fad8e 100644 --- a/samples/bpf/test_verifier.c +++ b/samples/bpf/test_verifier.c @@ -288,7 +288,8 @@ static struct bpf_test tests[] = { BPF_LDX_MEM(BPF_DW, BPF_REG_2, BPF_REG_10, -8), /* should be able to access R0 = *(R2 + 8) */ - BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_2, 8), + /* BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_2, 8), */ + BPF_MOV64_REG(BPF_REG_0, BPF_REG_2), BPF_EXIT_INSN(), }, .result = ACCEPT, @@ -687,7 +688,7 @@ static int test(void) } printf("#%d %s ", i, tests[i].descr); - prog_fd = bpf_prog_load(BPF_PROG_TYPE_UNSPEC, prog, + prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog, prog_len * sizeof(struct bpf_insn), "GPL"); |