All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Shuah Khan <shuah@kernel.org>, Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 16/28] selftests/ftrace: Add kprobe event with $comm argument testcase
Date: Thu, 30 Aug 2018 23:19:59 +0900	[thread overview]
Message-ID: <153563879958.29700.4453164394141470380.stgit@devbox> (raw)
In-Reply-To: <153563834333.29700.11242968505215651399.stgit@devbox>

Add kprobe-event with $comm argument testcase to
ftracetest. This not only checks syntax but
also checks log file.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 .../ftrace/test.d/kprobe/kprobe_args_comm.tc       |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc

diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc
new file mode 100644
index 000000000000..15c1f70fcaf9
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc
@@ -0,0 +1,17 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# description: Kprobe event with comm arguments
+
+[ -f kprobe_events ] || exit_unsupported # this is configurable
+
+grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old
+
+echo 'p:testprobe _do_fork comm=$comm ' > kprobe_events
+grep testprobe kprobe_events | grep -q 'comm=$comm'
+test -d events/kprobes/testprobe
+
+echo 1 > events/kprobes/testprobe/enable
+( echo "forked")
+grep testprobe trace | grep -q 'comm=".*"'
+
+exit 0


WARNING: multiple messages have this Message-ID (diff)
From: mhiramat at kernel.org (Masami Hiramatsu)
Subject: [PATCH v3 16/28] selftests/ftrace: Add kprobe event with $comm argument testcase
Date: Thu, 30 Aug 2018 23:19:59 +0900	[thread overview]
Message-ID: <153563879958.29700.4453164394141470380.stgit@devbox> (raw)
In-Reply-To: <153563834333.29700.11242968505215651399.stgit@devbox>

Add kprobe-event with $comm argument testcase to
ftracetest. This not only checks syntax but
also checks log file.

Signed-off-by: Masami Hiramatsu <mhiramat at kernel.org>
---
 .../ftrace/test.d/kprobe/kprobe_args_comm.tc       |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc

diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc
new file mode 100644
index 000000000000..15c1f70fcaf9
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc
@@ -0,0 +1,17 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# description: Kprobe event with comm arguments
+
+[ -f kprobe_events ] || exit_unsupported # this is configurable
+
+grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old
+
+echo 'p:testprobe _do_fork comm=$comm ' > kprobe_events
+grep testprobe kprobe_events | grep -q 'comm=$comm'
+test -d events/kprobes/testprobe
+
+echo 1 > events/kprobes/testprobe/enable
+( echo "forked")
+grep testprobe trace | grep -q 'comm=".*"'
+
+exit 0

WARNING: multiple messages have this Message-ID (diff)
From: mhiramat@kernel.org (Masami Hiramatsu)
Subject: [PATCH v3 16/28] selftests/ftrace: Add kprobe event with $comm argument testcase
Date: Thu, 30 Aug 2018 23:19:59 +0900	[thread overview]
Message-ID: <153563879958.29700.4453164394141470380.stgit@devbox> (raw)
Message-ID: <20180830141959.UE9KGY1FRPGaBXBYRPxMSMT8pHlEEsC1LvWYEBmeHxI@z> (raw)
In-Reply-To: <153563834333.29700.11242968505215651399.stgit@devbox>

Add kprobe-event with $comm argument testcase to
ftracetest. This not only checks syntax but
also checks log file.

Signed-off-by: Masami Hiramatsu <mhiramat at kernel.org>
---
 .../ftrace/test.d/kprobe/kprobe_args_comm.tc       |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc

diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc
new file mode 100644
index 000000000000..15c1f70fcaf9
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc
@@ -0,0 +1,17 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# description: Kprobe event with comm arguments
+
+[ -f kprobe_events ] || exit_unsupported # this is configurable
+
+grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old
+
+echo 'p:testprobe _do_fork comm=$comm ' > kprobe_events
+grep testprobe kprobe_events | grep -q 'comm=$comm'
+test -d events/kprobes/testprobe
+
+echo 1 > events/kprobes/testprobe/enable
+( echo "forked")
+grep testprobe trace | grep -q 'comm=".*"'
+
+exit 0

  parent reply	other threads:[~2018-08-30 14:20 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30 14:12 [PATCH v3 00/28] selftests/ftrace: Improve ftracetest with coverage check Masami Hiramatsu
2018-08-30 14:12 ` Masami Hiramatsu
2018-08-30 14:12 ` mhiramat
2018-08-30 14:12 ` [PATCH v3 01/28] selftests/ftrace: Add --stop-fail hidden option for debug Masami Hiramatsu
2018-08-30 14:12   ` Masami Hiramatsu
2018-08-30 14:12   ` mhiramat
2018-08-30 14:13 ` [PATCH v3 02/28] selftests/ftrace: Add --console hidden option Masami Hiramatsu
2018-08-30 14:13   ` Masami Hiramatsu
2018-08-30 14:13   ` mhiramat
2018-08-30 14:13 ` [PATCH v3 03/28] selftests/ftrace: Add case number prefix to logfile Masami Hiramatsu
2018-08-30 14:13   ` Masami Hiramatsu
2018-08-30 14:13   ` mhiramat
2018-08-30 14:14 ` [PATCH v3 04/28] selftests/ftrace: More initialize features in initialize_ftrace Masami Hiramatsu
2018-08-30 14:14   ` Masami Hiramatsu
2018-08-30 14:14   ` mhiramat
2018-08-30 14:14 ` [PATCH v3 05/28] selftests/ftrace: Add SPDX License Identifier to template Masami Hiramatsu
2018-08-30 14:14   ` Masami Hiramatsu
2018-08-30 14:14   ` mhiramat
2018-08-30 14:15 ` [PATCH v3 06/28] selftests/ftrace: Cleanup ftrace after running test Masami Hiramatsu
2018-08-30 14:15   ` Masami Hiramatsu
2018-08-30 14:15   ` mhiramat
2018-08-30 14:15 ` [PATCH v3 07/28] selftests/ftrace: Remove unneeded per-test init/cleanup ftrace Masami Hiramatsu
2018-08-30 14:15   ` Masami Hiramatsu
2018-08-30 14:15   ` mhiramat
2018-08-30 14:16 ` [PATCH v3 08/28] selftests/ftrace: Fix to test kprobe $comm arg only if available Masami Hiramatsu
2018-08-30 14:16   ` Masami Hiramatsu
2018-08-30 14:16   ` mhiramat
2018-08-30 14:16 ` [PATCH v3 09/28] selftests/ftrace: Fix checkbashisms errors Masami Hiramatsu
2018-08-30 14:16   ` Masami Hiramatsu
2018-08-30 14:16   ` mhiramat
2018-08-30 14:17 ` [PATCH v3 10/28] selftests/ftrace: Use loopback address instead of localhost Masami Hiramatsu
2018-08-30 14:17   ` Masami Hiramatsu
2018-08-30 14:17   ` mhiramat
2018-08-30 14:17 ` [PATCH v3 11/28] selftests/ftrace: Improve kprobe on module testcase to load/unload module Masami Hiramatsu
2018-08-30 14:17   ` Masami Hiramatsu
2018-08-30 14:17   ` mhiramat
2018-08-30 14:18 ` [PATCH v3 12/28] selftests/ftrace: Improve kprobe testcase to check log data Masami Hiramatsu
2018-08-30 14:18   ` Masami Hiramatsu
2018-08-30 14:18   ` mhiramat
2018-08-30 14:18 ` [PATCH v3 13/28] selftests/ftrace: Improve kretprobe " Masami Hiramatsu
2018-08-30 14:18   ` Masami Hiramatsu
2018-08-30 14:18   ` mhiramat
2018-08-30 14:19 ` [PATCH v3 14/28] selftests/ftrace: Test kprobe-event argument with various bitsize Masami Hiramatsu
2018-08-30 14:19   ` Masami Hiramatsu
2018-08-30 14:19   ` mhiramat
2018-08-30 14:19 ` [PATCH v3 15/28] selftests/ftrace: Check set_event_pid result Masami Hiramatsu
2018-08-30 14:19   ` Masami Hiramatsu
2018-08-30 14:19   ` mhiramat
2018-08-30 14:19 ` Masami Hiramatsu [this message]
2018-08-30 14:19   ` [PATCH v3 16/28] selftests/ftrace: Add kprobe event with $comm argument testcase Masami Hiramatsu
2018-08-30 14:19   ` mhiramat
2018-08-30 14:20 ` [PATCH v3 17/28] selftests/ftrace: Add kprobe profile testcase Masami Hiramatsu
2018-08-30 14:20   ` Masami Hiramatsu
2018-08-30 14:20   ` mhiramat
2018-08-30 14:20 ` [PATCH v3 18/28] selftests/ftrace: Add kprobe-event with symbol argument test Masami Hiramatsu
2018-08-30 14:20   ` Masami Hiramatsu
2018-08-30 14:20   ` mhiramat
2018-08-30 14:21 ` [PATCH v3 19/28] selftests/ftrace: Add trace_printk sample module test Masami Hiramatsu
2018-08-30 14:21   ` Masami Hiramatsu
2018-08-30 14:21   ` mhiramat
2018-08-30 14:21 ` [PATCH v3 20/28] selftests/ftrace: Add ringbuffer size changing testcase Masami Hiramatsu
2018-08-30 14:21   ` Masami Hiramatsu
2018-08-30 14:21   ` mhiramat
2018-08-30 14:22 ` [PATCH v3 21/28] selftests/ftrace: Add function profiling stat testcase Masami Hiramatsu
2018-08-30 14:22   ` Masami Hiramatsu
2018-08-30 14:22   ` mhiramat
2018-08-30 14:22 ` [PATCH v3 22/28] selftests/ftrace: Add max stack tracer testcase Masami Hiramatsu
2018-08-30 14:22   ` Masami Hiramatsu
2018-08-30 14:22   ` mhiramat
2018-08-30 14:23 ` [PATCH v3 23/28] selftests/ftrace: Add function filter on module testcase Masami Hiramatsu
2018-08-30 14:23   ` Masami Hiramatsu
2018-08-30 14:23   ` mhiramat
2018-08-30 14:23 ` [PATCH v3 24/28] selftests/ftrace: Add trace_pipe testcase Masami Hiramatsu
2018-08-30 14:23   ` Masami Hiramatsu
2018-08-30 14:23   ` mhiramat
2018-08-30 14:24 ` [PATCH v3 25/28] selftests/ftrace: Add stacktrace ftrace filter command testcase Masami Hiramatsu
2018-08-30 14:24   ` Masami Hiramatsu
2018-08-30 14:24   ` mhiramat
2018-08-30 14:24 ` [PATCH v3 26/28] selftests/ftrace: Add wakeup tracer testcase Masami Hiramatsu
2018-08-30 14:24   ` Masami Hiramatsu
2018-08-30 14:24   ` mhiramat
2018-08-30 14:25 ` [PATCH v3 27/28] selftests/ftrace: Add wakeup_rt " Masami Hiramatsu
2018-08-30 14:25   ` Masami Hiramatsu
2018-08-30 14:25   ` mhiramat
2018-08-30 14:25 ` [PATCH v3 28/28] selftests/ftrace: Add ftrace cpumask testcase Masami Hiramatsu
2018-08-30 14:25   ` Masami Hiramatsu
2018-08-30 14:25   ` mhiramat
2018-09-12  9:57 ` [PATCH v3 00/28] selftests/ftrace: Improve ftracetest with coverage check Masami Hiramatsu
2018-09-12  9:57   ` Masami Hiramatsu
2018-09-12  9:57   ` mhiramat
2018-09-21 21:24 ` Shuah Khan
2018-09-21 21:24   ` Shuah Khan
2018-09-21 21:24   ` shuah
2018-09-27 22:49   ` Masami Hiramatsu
2018-09-27 22:49     ` Masami Hiramatsu
2018-09-27 22:49     ` mhiramat

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=153563879958.29700.4453164394141470380.stgit@devbox \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@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 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.