From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [RFC PATCH 1/4 v2] ftracetest: Add clear_trace() helper to reset the trace file
Date: Mon, 03 Nov 2014 16:27:38 -0500 [thread overview]
Message-ID: <20141103212841.684711364@goodmis.org> (raw)
In-Reply-To: 20141103212737.696365174@goodmis.org
[-- Attachment #1: 0001-ftracetest-Add-clear_trace-helper-to-reset-the-trace.patch --]
[-- Type: text/plain, Size: 1270 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Created the file tools/testing/ftrace/test.d/functions that will
hold helper functions.
First function added was clear_trace() that is descriptive in its
name to show that "echo > trace" is clearing the trace file.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/selftests/ftrace/ftracetest | 3 +++
tools/testing/selftests/ftrace/test.d/functions | 4 ++++
2 files changed, 7 insertions(+)
create mode 100644 tools/testing/selftests/ftrace/test.d/functions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index f15c0da07aca..c6381a9faf83 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -235,6 +235,9 @@ run_test() { # testfile
fi
}
+# load in the helper functions
+. $TEST_DIR/functions
+
# Main loop
for t in $TEST_CASES; do
run_test $t
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
new file mode 100644
index 000000000000..1aa9f2e9c40b
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -0,0 +1,4 @@
+
+clear_trace() { # reset trace output
+ echo > trace
+}
--
2.1.1
next prev parent reply other threads:[~2014-11-03 21:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 21:27 [RFC PATCH 0/4 v2] ftracetests: Add ftrace tests to ftracetests Steven Rostedt
2014-11-03 21:27 ` Steven Rostedt [this message]
2014-11-03 21:27 ` [RFC PATCH 2/4 v2] ftracetest: Add disable/enable_tracing() helper calls Steven Rostedt
2014-11-03 21:27 ` [RFC PATCH 3/4 v2] ftracetest: Add helper reset_tracer() function Steven Rostedt
2014-11-03 21:27 ` [RFC PATCH 4/4 v2] ftracetest: Add a couple of ftrace test cases Steven Rostedt
2014-11-04 8:31 ` Namhyung Kim
2014-11-04 14:03 ` Steven Rostedt
2014-11-04 5:59 ` [RFC PATCH 0/4 v2] ftracetests: Add ftrace tests to ftracetests Masami Hiramatsu
2014-11-04 9:30 ` Masami Hiramatsu
2014-11-04 14:03 ` 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=20141103212841.684711364@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
/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.