All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: KP Singh <kpsingh@kernel.org>, <bpf@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Florent Revest <revest@chromium.org>,
	Brendan Jackman <jackmanb@chromium.org>
Subject: Re: [PATCH bpf-next v2 2/2] bpf/selftests: Add a short note about run_in_vm.sh in README.rst
Date: Sun, 24 Jan 2021 11:14:36 -0800	[thread overview]
Message-ID: <3c1fc0a6-2f0f-0efe-91f8-d4a6346be1f2@fb.com> (raw)
In-Reply-To: <20210123004445.299149-3-kpsingh@kernel.org>



On 1/22/21 4:44 PM, KP Singh wrote:
> 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>

Acked-by: Yonghong Song <yhs@fb.com>

> ---
>   tools/testing/selftests/bpf/README.rst | 23 +++++++++++++++++++++++
>   1 file changed, 23 insertions(+)
> 
> diff --git a/tools/testing/selftests/bpf/README.rst b/tools/testing/selftests/bpf/README.rst
> index ca064180d4d0..a0dac65b6b01 100644
> --- a/tools/testing/selftests/bpf/README.rst
> +++ b/tools/testing/selftests/bpf/README.rst
> @@ -6,6 +6,29 @@ 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/run_in_vm.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/run_in_vm.sh -h
> +
> +.. note:: The script does not yet update pahole and LLVM, so these will still need to be
> +          manually updated.
Maybe a little more clarification and actionable.

The script uses pahole and clang based on host environment setting.
If you want to change pahole and llvm, you can change PATH env variable 
in the beginning of script.

I did not test changing PATH env variable inside the script, but I think
it should work.

> +
> +.. note:: The script currently only supports x86_64.
>   
>   Additional information about selftest failures are
>   documented here.
> 

      reply	other threads:[~2021-01-24 19:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23  0:44 [PATCH bpf-next v2 0/2] BPF selftest helper script KP Singh
2021-01-23  0:44 ` [PATCH bpf-next v2 1/2] bpf: Helper script for running BPF presubmit tests KP Singh
2021-01-24 19:06   ` Yonghong Song
2021-01-25  5:21     ` Yonghong Song
2021-01-25 17:53       ` KP Singh
2021-01-25 19:42         ` Yonghong Song
2021-01-25 17:51     ` KP Singh
2021-01-25 22:19   ` Jiri Olsa
2021-01-26  2:09   ` Andrii Nakryiko
2021-01-26 19:51     ` Jiri Olsa
2021-02-01  0:22     ` KP Singh
2021-02-02  6:25       ` Andrii Nakryiko
2021-02-02 21:13         ` KP Singh
2021-02-02 21:37           ` Andrii Nakryiko
2021-02-01  0:40     ` KP Singh
2021-01-23  0:44 ` [PATCH bpf-next v2 2/2] bpf/selftests: Add a short note about run_in_vm.sh in README.rst KP Singh
2021-01-24 19:14   ` Yonghong Song [this message]

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=3c1fc0a6-2f0f-0efe-91f8-d4a6346be1f2@fb.com \
    --to=yhs@fb.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jackmanb@chromium.org \
    --cc=kpsingh@kernel.org \
    --cc=revest@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.