[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250509150609.5cb7c7a8@gandalf.local.home>
Date: Fri, 9 May 2025 15:06:09 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>, bpf@...r.kernel.org, netdev
<netdev@...r.kernel.org>, Jiri Olsa <olsajiri@...il.com>, Peter Zijlstra
<peterz@...radead.org>, David Ahern <dsahern@...nel.org>, Juri Lelli
<juri.lelli@...il.com>, Breno Leitao <leitao@...ian.org>, Alexei
Starovoitov <alexei.starovoitov@...il.com>, Gabriele Monaco
<gmonaco@...hat.com>, Masami Hiramatsu <mhiramat@...nel.org>, Mathieu
Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH v2] tracepoint: Have tracepoints created with
DECLARE_TRACE() have _tp suffix
On Fri, 9 May 2025 11:27:22 -0700
Andrii Nakryiko <andrii.nakryiko@...il.com> wrote:
> > diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h b/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> > index aeef86b3da74..2bac14ef507f 100644
> > --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> > +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> > @@ -42,7 +42,7 @@ DECLARE_TRACE(bpf_testmod_test_nullable_bare,
> >
> > struct sk_buff;
> >
> > -DECLARE_TRACE(bpf_testmod_test_raw_tp_null,
> > +DECLARE_TRACE(bpf_testmod_test_raw_null,
>
> here "raw_tp" is actually part of the name (we are testing raw
> tracepoints with NULL argument), so I'd suggest to not change it here,
> we'll just have trace_bpf_testmod_test_raw_tp_null_tp() below, however
> odd it might be looking :)
Thanks for letting me know.
>
> > TP_PROTO(struct sk_buff *skb),
> > TP_ARGS(skb)
> > );
> > diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> > index 3220f1d28697..fd40c1180b09 100644
> > --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> > +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> > @@ -413,7 +413,7 @@ bpf_testmod_test_read(struct file *file, struct kobject *kobj,
> >
> > (void)bpf_testmod_test_arg_ptr_to_struct(&struct_arg1_2);
> >
> > - (void)trace_bpf_testmod_test_raw_tp_null(NULL);
> > + (void)trace_bpf_testmod_test_raw_null_tp(NULL);
> >
> > bpf_testmod_test_struct_ops3();
> >
> > @@ -431,14 +431,14 @@ bpf_testmod_test_read(struct file *file, struct kobject *kobj,
> > if (bpf_testmod_loop_test(101) > 100)
> > trace_bpf_testmod_test_read(current, &ctx);
> >
> > - trace_bpf_testmod_test_nullable_bare(NULL);
> > + trace_bpf_testmod_test_nullable_bare_tp(NULL);
> >
> > /* Magic number to enable writable tp */
> > if (len == 64) {
> > struct bpf_testmod_test_writable_ctx writable = {
> > .val = 1024,
> > };
> > - trace_bpf_testmod_test_writable_bare(&writable);
> > + trace_bpf_testmod_test_writable_bare_tp(&writable);
> > if (writable.early_ret)
> > return snprintf(buf, len, "%d\n", writable.val);
> > }
> > @@ -470,7 +470,7 @@ bpf_testmod_test_write(struct file *file, struct kobject *kobj,
> > .len = len,
> > };
> >
> > - trace_bpf_testmod_test_write_bare(current, &ctx);
> > + trace_bpf_testmod_test_write_bare_tp(current, &ctx);
> >
>
> please update the following three lines in selftests to match new names:
Will do.
Will put together a v3.
Thanks for the review!
-- Steve
>
> progs/test_module_attach.c
> 22:SEC("raw_tp/bpf_testmod_test_write_bare")
>
> progs/test_tp_btf_nullable.c
> 9:SEC("tp_btf/bpf_testmod_test_nullable_bare")
> 16:SEC("tp_btf/bpf_testmod_test_nullable_bare")
>
>
> just add that "_tp" suffix everywhere and CI should be happy
>
> > return -EIO; /* always fail */
> > }
> > --
> > 2.47.2
> >
Powered by blists - more mailing lists