lkml.org 
[lkml]   [2022]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] selftests/kprobe: Do not test for GRP/ without event failures
On Mon, 18 Jul 2022 11:08:53 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> On Tue, 12 Jul 2022 16:17:07 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> >
> > A new feature is added where kprobes (and other probes) do not need to
> > explicitly state the event name when creating a probe. The event name will
> > come from what is being attached.
> >
> > That is:
> >
> > # echo 'p:foo/ vfs_read' > kprobe_events
> >
> > Will no longer error, but instead create an event:
> >
> > # cat kprobe_events
> > p:foo/p_vfs_read_0 vfs_read
> >
> > This should not be tested as an error case anymore. Remove it from the
> > selftest as now this feature "breaks" the selftest as it no longer fails
> > as expected.
>
> Good catch!
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> BTW, in this case, NO_EVENT_NAME error should not happen anymore.
> Let me cleanup the code.

Oops, no. There is an error case of NO_EVENT_NAME. 'p: vfs_read' will cause
this error because it expects an event name after ':'. Thus, the correct
fix is just removing "foo/":

check_error 'p:^ vfs_read' # NO_EVENT_NAME

Thank you,

--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2022-07-18 07:40    [W:0.075 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site