net: filter: BPF testsuite
The testsuite covers classic and internal BPF instructions. It is particularly useful for JIT compiler developers. Adds to "net" selftest target. The testsuite can be used as a set of micro-benchmarks. It measures execution time of each BPF program in nsec. This patch adds core framework. Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9739eef13c
commit
64a8946b44
@@ -14,6 +14,12 @@ all: $(NET_PROGS)
|
||||
run_tests: all
|
||||
@/bin/sh ./run_netsocktests || echo "sockettests: [FAIL]"
|
||||
@/bin/sh ./run_afpackettests || echo "afpackettests: [FAIL]"
|
||||
|
||||
@if /sbin/modprobe test_bpf ; then \
|
||||
/sbin/rmmod test_bpf; \
|
||||
echo "test_bpf: ok"; \
|
||||
else \
|
||||
echo "test_bpf: [FAIL]"; \
|
||||
exit 1; \
|
||||
fi
|
||||
clean:
|
||||
$(RM) $(NET_PROGS)
|
||||
|
Reference in New Issue
Block a user