summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorKP Singh <kpsingh@kernel.org>2021-02-04 22:45:44 +0300
committerAndrii Nakryiko <andrii@kernel.org>2021-02-05 03:03:16 +0300
commit881949f770bf4289262ef491532bb644f846050c (patch)
treef507de53949e44d0da07a3914b04738cc904058a /tools/testing
parentc9709f52386d9cc944417f45b979d821d1d08c46 (diff)
downloadlinux-881949f770bf4289262ef491532bb644f846050c.tar.xz
bpf/selftests: Add a short note about vmtest.sh in README.rst
Add a short note to make contributors aware of the existence of the script. The documentation does not intentionally document all the options of the script to avoid mentioning it in two places (it's available in the usage / help message of the script). Signed-off-by: KP Singh <kpsingh@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210204194544.3383814-3-kpsingh@kernel.org
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/README.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/README.rst b/tools/testing/selftests/bpf/README.rst
index ca064180d4d0..fd148b8410fa 100644
--- a/tools/testing/selftests/bpf/README.rst
+++ b/tools/testing/selftests/bpf/README.rst
@@ -6,6 +6,30 @@ General instructions on running selftests can be found in
__ /Documentation/bpf/bpf_devel_QA.rst#q-how-to-run-bpf-selftests
+=========================
+Running Selftests in a VM
+=========================
+
+It's now possible to run the selftests using ``tools/testing/selftests/bpf/vmtest.sh``.
+The script tries to ensure that the tests are run with the same environment as they
+would be run post-submit in the CI used by the Maintainers.
+
+This script downloads a suitable Kconfig and VM userspace image from the system used by
+the CI. It builds the kernel (without overwriting your existing Kconfig), recompiles the
+bpf selftests, runs them (by default ``tools/testing/selftests/bpf/test_progs``) and
+saves the resulting output (by default in ``~/.bpf_selftests``).
+
+For more information on about using the script, run:
+
+.. code-block:: console
+
+ $ tools/testing/selftests/bpf/vmtest.sh -h
+
+.. note:: The script uses pahole and clang based on host environment setting.
+ If you want to change pahole and llvm, you can change `PATH` environment
+ variable in the beginning of script.
+
+.. note:: The script currently only supports x86_64.
Additional information about selftest failures are
documented here.