mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-02 12:34:06 +00:00
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>
This commit is contained in:
parent
5422283848
commit
b7a27c3aaf
1 changed files with 29 additions and 0 deletions
|
@ -417,6 +417,33 @@ submitted by the BPF maintainers to the stable maintainers.
|
||||||
Testing patches
|
Testing patches
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
Q: How to run BPF selftests
|
||||||
|
---------------------------
|
||||||
|
A: After you have booted into the newly compiled kernel, navigate to
|
||||||
|
the BPF selftests_ suite in order to test BPF functionality (current
|
||||||
|
working directory points to the root of the cloned git tree)::
|
||||||
|
|
||||||
|
$ cd tools/testing/selftests/bpf/
|
||||||
|
$ make
|
||||||
|
|
||||||
|
To run the verifier tests::
|
||||||
|
|
||||||
|
$ sudo ./test_verifier
|
||||||
|
|
||||||
|
The verifier tests print out all the current checks being
|
||||||
|
performed. The summary at the end of running all tests will dump
|
||||||
|
information of test successes and failures::
|
||||||
|
|
||||||
|
Summary: 418 PASSED, 0 FAILED
|
||||||
|
|
||||||
|
In order to run through all BPF selftests, the following command is
|
||||||
|
needed::
|
||||||
|
|
||||||
|
$ sudo make run_tests
|
||||||
|
|
||||||
|
See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
|
||||||
|
document for further documentation.
|
||||||
|
|
||||||
Q: Which BPF kernel selftests version should I run my kernel against?
|
Q: Which BPF kernel selftests version should I run my kernel against?
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
A: If you run a kernel ``xyz``, then always run the BPF kernel selftests
|
A: If you run a kernel ``xyz``, then always run the BPF kernel selftests
|
||||||
|
@ -607,5 +634,7 @@ when:
|
||||||
.. _netdev FAQ: ../networking/netdev-FAQ.txt
|
.. _netdev FAQ: ../networking/netdev-FAQ.txt
|
||||||
.. _samples/bpf/: ../../samples/bpf/
|
.. _samples/bpf/: ../../samples/bpf/
|
||||||
.. _selftests: ../../tools/testing/selftests/bpf/
|
.. _selftests: ../../tools/testing/selftests/bpf/
|
||||||
|
.. _Documentation/dev-tools/kselftest.rst:
|
||||||
|
https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
|
||||||
|
|
||||||
Happy BPF hacking!
|
Happy BPF hacking!
|
||||||
|
|
Loading…
Add table
Reference in a new issue