From: Yonghong Song <yhs@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
"andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Alexei Starovoitov <ast@fb.com>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix test_attach_probe map definition
Date: Sat, 6 Jul 2019 05:17:15 +0000 [thread overview]
Message-ID: <563a0bfc-aad1-cc17-f9c1-dd2f8516b7f3@fb.com> (raw)
In-Reply-To: <20190706044420.1582763-1-andriin@fb.com>
On 7/5/19 9:44 PM, Andrii Nakryiko wrote:
> ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map
> defs") changed BTF-defined maps syntax, while independently merged
> 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") added new
> test using outdated syntax of maps. This patch fixes this test after
> corresponding patch sets were merged.
>
> Fixes: ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map defs")
> Fixes: 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests")
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
> ---
> .../testing/selftests/bpf/progs/test_attach_probe.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/progs/test_attach_probe.c b/tools/testing/selftests/bpf/progs/test_attach_probe.c
> index 7a7c5cd728c8..63a8dfef893b 100644
> --- a/tools/testing/selftests/bpf/progs/test_attach_probe.c
> +++ b/tools/testing/selftests/bpf/progs/test_attach_probe.c
> @@ -6,14 +6,11 @@
> #include "bpf_helpers.h"
>
> struct {
> - int type;
> - int max_entries;
> - int *key;
> - int *value;
> -} results_map SEC(".maps") = {
> - .type = BPF_MAP_TYPE_ARRAY,
> - .max_entries = 4,
> -};
> + __uint(type, BPF_MAP_TYPE_ARRAY);
> + __uint(max_entries, 4);
> + __type(key, int);
> + __type(value, int);
> +} results_map SEC(".maps");
>
> SEC("kprobe/sys_nanosleep")
> int handle_sys_nanosleep_entry(struct pt_regs *ctx)
>
next prev parent reply other threads:[~2019-07-06 5:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-06 4:44 [PATCH bpf-next] selftests/bpf: fix test_attach_probe map definition Andrii Nakryiko
2019-07-06 5:17 ` Yonghong Song [this message]
2019-07-08 15:25 ` Daniel Borkmann
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=563a0bfc-aad1-cc17-f9c1-dd2f8516b7f3@fb.com \
--to=yhs@fb.com \
--cc=Kernel-team@fb.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=ast@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;
as well as URLs for NNTP newsgroup(s).