From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Andrew Morton <akpm@linux-foundation.org>,
Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH 2/5] ftracetest: Add ftrace basic testcases
Date: Wed, 08 Oct 2014 14:03:43 -0400 [thread overview]
Message-ID: <20141008180517.956366561@goodmis.org> (raw)
In-Reply-To: <20141008180341.252728944@goodmis.org>
[-- Attachment #1: 0002-ftracetest-Add-ftrace-basic-testcases.patch --]
[-- Type: text/plain, Size: 2210 bytes --]
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Add ftrace basic testcases. This just checks ftrace debugfs
interface works as it is designed.
Link: http://lkml.kernel.org/p/20140922234252.23415.62897.stgit@kbuild-f20.novalocal
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/selftests/ftrace/test.d/00basic/basic1.tc | 3 +++
tools/testing/selftests/ftrace/test.d/00basic/basic2.tc | 6 ++++++
tools/testing/selftests/ftrace/test.d/00basic/basic3.tc | 8 ++++++++
3 files changed, 17 insertions(+)
create mode 100644 tools/testing/selftests/ftrace/test.d/00basic/basic1.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc
new file mode 100644
index 000000000000..9980ff14ae44
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic1.tc
@@ -0,0 +1,3 @@
+#!/bin/sh
+# description: Basic trace file check
+test -f README -a -f trace -a -f tracing_on -a -f trace_pipe
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
new file mode 100644
index 000000000000..b04f30df0db3
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
@@ -0,0 +1,6 @@
+#!/bin/sh
+# description: Basic test for tracers
+for t in `cat available_tracers`; do
+ echo $t > current_tracer || exit 1
+done
+echo nop > current_tracer
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
new file mode 100644
index 000000000000..0c1a3a207636
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
@@ -0,0 +1,8 @@
+#!/bin/sh
+# description: Basic trace clock test
+[ -f trace_clock ] || exit 1
+for c in `cat trace_clock | tr -d \[\]`; do
+ echo $c > trace_clock || exit 1
+ grep '\['$c'\]' trace_clock || exit 1
+done
+echo local > trace_clock
--
2.0.1
next prev parent reply other threads:[~2014-10-08 18:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 18:03 [PATCH 0/5] [GIT PULL] ftracetest/tools/selftests: Self tests to test ftrace Steven Rostedt
2014-10-08 18:03 ` [PATCH 1/5] ftracetest: Initial commit for ftracetest Steven Rostedt
2014-10-08 18:03 ` Steven Rostedt [this message]
2014-10-08 18:03 ` [PATCH 3/5] ftracetest: Add kprobe basic testcases Steven Rostedt
2014-10-08 18:03 ` [PATCH 4/5] ftracetest: Add POSIX.3 standard and XFAIL result codes Steven Rostedt
2014-10-08 18:03 ` [PATCH 5/5] tracing/kprobes: Add selftest scripts testing kprobe-tracer as startup test 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=20141008180517.956366561@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome