From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Daniel Borkmann <borkmann@iogearbox.net>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev@vger.kernel.org,
Quentin Monnet <quentin.monnet@netronome.com>,
linux-man@vger.kernel.org, linux-doc@vger.kernel.org
Subject: [bpf-next PATCH 5/5] bpf, doc: howto use/run the BPF selftests
Date: Mon, 14 May 2018 15:42:32 +0200 [thread overview]
Message-ID: <152630535224.29210.11623921130132517306.stgit@firesoul> (raw)
In-Reply-To: <152630528901.29210.9018565600000101307.stgit@firesoul>
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>
---
Documentation/bpf/bpf_devel_QA.rst | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
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.
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?
---------------------------------------------------------------------
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
.. _samples/bpf/: ../../samples/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!
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-05-14 13:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 13:42 [bpf-next PATCH 0/5] bpf, doc: convert Documentation/bpf to RST-formatting Jesper Dangaard Brouer
2018-05-14 13:42 ` [bpf-next PATCH 1/5] bpf, doc: add basic README.rst file Jesper Dangaard Brouer
2018-05-14 13:42 ` [bpf-next PATCH 2/5] bpf, doc: rename txt files to rst files Jesper Dangaard Brouer
2018-05-14 13:42 ` [bpf-next PATCH 3/5] bpf, doc: convert bpf_design_QA.rst to use RST formatting Jesper Dangaard Brouer
2018-05-14 13:42 ` [bpf-next PATCH 4/5] bpf, doc: convert bpf_devel_QA.rst " Jesper Dangaard Brouer
2018-05-14 13:42 ` Jesper Dangaard Brouer [this message]
2018-05-14 15:15 ` [bpf-next PATCH 5/5] bpf, doc: howto use/run the BPF selftests Silvan Jegen
2018-05-14 16:05 ` Jesper Dangaard Brouer
2018-05-14 18:46 ` Silvan Jegen
2018-05-15 5:57 ` [bpf-next PATCH 0/5] bpf, doc: convert Documentation/bpf to RST-formatting Y Song
2018-05-15 6:05 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=152630535224.29210.11623921130132517306.stgit@firesoul \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=borkmann@iogearbox.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox