All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linyu Yuan <quic_linyyuan@quicinc.com>
Subject: Re: [PATCH] selftests/kprobe: Do not test for GRP/ without event failures
Date: Mon, 18 Jul 2022 14:40:07 +0900	[thread overview]
Message-ID: <20220718144007.78c5b50f9b123fb80a920054@kernel.org> (raw)
In-Reply-To: <20220718110853.299c7631f15fd1dfb002ef6c@kernel.org>

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>

  reply	other threads:[~2022-07-18  5:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 20:17 [PATCH] selftests/kprobe: Do not test for GRP/ without event failures Steven Rostedt
2022-07-18  2:08 ` Masami Hiramatsu
2022-07-18  5:40   ` Masami Hiramatsu [this message]
2022-07-18  7:05     ` [PATCH] selftests/kprobe: Update test for no event name syntax error Masami Hiramatsu (Google)
2022-07-18  9:36       ` Linyu Yuan
2022-07-21 14:55         ` Masami Hiramatsu
2022-07-18 22:38       ` Steven Rostedt

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=20220718144007.78c5b50f9b123fb80a920054@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=quic_linyyuan@quicinc.com \
    --cc=rostedt@goodmis.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.