aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2018-05-14 09:42:32 -0400
committerAlexei Starovoitov <ast@kernel.org>2018-05-15 02:02:58 -0400
commitb7a27c3aafa252d1e416c223cb97c123de4ed28a (patch)
tree74a4e7001207d4d670159073d7438986466216a2
parent542228384888f5ad11fa6ffd59947a29a1f4452e (diff)
bpf, doc: howto use/run the BPF selftests
I always forget howto run the BPF selftests. Thus, lets add that info to the QA document. Documentation was based on Cilium's documentation: http://cilium.readthedocs.io/en/latest/bpf/#verifying-the-setup Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r--Documentation/bpf/bpf_devel_QA.rst29
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/bpf/bpf_devel_QA.rst b/Documentation/bpf/bpf_devel_QA.rst
index 2254bdeae990..0e7c1d946e83 100644
--- a/Documentation/bpf/bpf_devel_QA.rst
+++ b/Documentation/bpf/bpf_devel_QA.rst
@@ -417,6 +417,33 @@ submitted by the BPF maintainers to the stable maintainers.
417Testing patches 417Testing patches
418=============== 418===============
419 419
420Q: How to run BPF selftests
421---------------------------
422A: After you have booted into the newly compiled kernel, navigate to
423the BPF selftests_ suite in order to test BPF functionality (current
424working directory points to the root of the cloned git tree)::
425
426 $ cd tools/testing/selftests/bpf/
427 $ make
428
429To run the verifier tests::
430
431 $ sudo ./test_verifier
432
433The verifier tests print out all the current checks being
434performed. The summary at the end of running all tests will dump
435information of test successes and failures::
436
437 Summary: 418 PASSED, 0 FAILED
438
439In order to run through all BPF selftests, the following command is
440needed::
441
442 $ sudo make run_tests
443
444See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
445document for further documentation.
446
420Q: Which BPF kernel selftests version should I run my kernel against? 447Q: Which BPF kernel selftests version should I run my kernel against?
421--------------------------------------------------------------------- 448---------------------------------------------------------------------
422A: If you run a kernel ``xyz``, then always run the BPF kernel selftests 449A: If you run a kernel ``xyz``, then always run the BPF kernel selftests
@@ -607,5 +634,7 @@ when:
607.. _netdev FAQ: ../networking/netdev-FAQ.txt 634.. _netdev FAQ: ../networking/netdev-FAQ.txt
608.. _samples/bpf/: ../../samples/bpf/ 635.. _samples/bpf/: ../../samples/bpf/
609.. _selftests: ../../tools/testing/selftests/bpf/ 636.. _selftests: ../../tools/testing/selftests/bpf/
637.. _Documentation/dev-tools/kselftest.rst:
638 https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
610 639
611Happy BPF hacking! 640Happy BPF hacking!