From: Alexei Starovoitov <ast@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>
Cc: "andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>,
Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH v3 bpf-next 4/4] selftests/bpf: add tests for libbpf-provided externs
Date: Sat, 14 Dec 2019 00:22:52 +0000 [thread overview]
Message-ID: <5f04c91d-2e8b-3092-ec7b-af6d59d073a9@fb.com> (raw)
In-Reply-To: <20191213235144.3063354-5-andriin@fb.com>
On 12/13/19 3:51 PM, Andrii Nakryiko wrote:
> Add a set of tests validating libbpf-provided extern variables. One crucial
> feature that's tested is dead code elimination together with using invalid BPF
> helper. CONFIG_MISSING is not supposed to exist and should always be specified
> by libbpf as zero, which allows BPF verifier to correctly do branch pruning
> and not fail validation, when invalid BPF helper is called from dead if branch.
>
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
> .../selftests/bpf/prog_tests/core_extern.c | 193 ++++++++++++++++++
> .../selftests/bpf/prog_tests/skeleton.c | 18 +-
> .../selftests/bpf/progs/test_core_extern.c | 62 ++++++
> .../selftests/bpf/progs/test_skeleton.c | 9 +
> 4 files changed, 281 insertions(+), 1 deletion(-)
> create mode 100644 tools/testing/selftests/bpf/prog_tests/core_extern.c
> create mode 100644 tools/testing/selftests/bpf/progs/test_core_extern.c
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/core_extern.c b/tools/testing/selftests/bpf/prog_tests/core_extern.c
> new file mode 100644
> index 000000000000..4f5f8439cb02
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/core_extern.c
> @@ -0,0 +1,193 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <test_progs.h>
copyright just for consistency ?
> +++ b/tools/testing/selftests/bpf/progs/test_core_extern.c
> @@ -0,0 +1,62 @@
> +// SPDX-License-Identifier: GPL-2.0
> +// Copyright (c) 2017 Facebook
> +
wrong year and format.
It should be C style comment /* */
> --- a/tools/testing/selftests/bpf/progs/test_skeleton.c
> +++ b/tools/testing/selftests/bpf/progs/test_skeleton.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> // Copyright (c) 2017 Facebook
ditto
prev parent reply other threads:[~2019-12-14 0:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 23:51 [PATCH v3 bpf-next 0/4] Add libbpf-provided extern variables support Andrii Nakryiko
2019-12-13 23:51 ` [PATCH v3 bpf-next 1/4] libbpf: extract internal map names into constants Andrii Nakryiko
2019-12-13 23:51 ` [PATCH v3 bpf-next 2/4] libbpf: support libbpf-provided extern variables Andrii Nakryiko
2019-12-14 0:20 ` Alexei Starovoitov
2019-12-14 1:20 ` Andrii Nakryiko
2019-12-13 23:51 ` [PATCH v3 bpf-next 3/4] bpftool: generate externs datasec in BPF skeleton Andrii Nakryiko
2019-12-13 23:51 ` [PATCH v3 bpf-next 4/4] selftests/bpf: add tests for libbpf-provided externs Andrii Nakryiko
2019-12-14 0:22 ` Alexei Starovoitov [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=5f04c91d-2e8b-3092-ec7b-af6d59d073a9@fb.com \
--to=ast@fb.com \
--cc=Kernel-team@fb.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox