mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Shuah Khan <shuah.kh@samsung.com>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v3 1/4] ftracetest: Initial commit for ftracetest
Date: Tue, 16 Sep 2014 18:21:09 -0400	[thread overview]
Message-ID: <20140916182109.4fff4169@gandalf.local.home> (raw)
In-Reply-To: <20140902110639.3207.38388.stgit@kbuild-f20.novalocal>

 
> diff --git a/tools/testing/ftrace/README b/tools/testing/ftrace/README
> new file mode 100644
> index 0000000..5d5de16
> --- /dev/null
> +++ b/tools/testing/ftrace/README
> @@ -0,0 +1,45 @@
> +Linux Ftrace Testcases
> +
> +This is a collection of testcases for ftrace tracing feature in the Linux
> +kernel. Since ftrace exports interfaces via the debugfs, we just need
> +shell scripts for testing. Feel free to add new test cases.
> +
> +Running the ftrace testcases
> +============================
> +
> +At first, you need to be the root user to run this script.
> +To run all testcases:
> +
> +  $ sudo ./ftracetest
> +
> +To run specific testcases:
> +
> +  # ./ftracetest test.d/basic3.tc
> +
> +Or you can also run testcases under given directory:
> +
> +  # ./ftracetest test.d/kprobe/
> +
> +Contributing new testcases
> +==========================
> +
> +Copy test.d/template to your testcase (whose filename must has *.tc extension)

"whose filename must have *.tc extension"

> +and rewrite test description line.

"and rewrite the test description line"

> +
> + * The working directory of the script is <debugfs>/tracing/.
> +
> + * Take care about the side effect, because that is run with root privilege.

 "Take care with side effects as the tests are run with root privilege"

> +
> + * Don't take too long. It's a kind of unit test.

 "The tests should not run for a long period of time. These are to be
 unit tests"

We should probably specify what the time should be. Is 20 minutes too
long?


> +
> + * You can add a directory for your testcases under test.d/ if needed.
> +
> + * The test cases should run on dash (busybox shell) for testing on
> +   minimal cross-build environments.
> +
> +TODO
> +====
> +
> + * Fancy colored output :)
> +
> + * Integrate with selftest?
> diff --git a/tools/testing/ftrace/ftracetest b/tools/testing/ftrace/ftracetest
> new file mode 100755
> index 0000000..8d92e74
> --- /dev/null
> +++ b/tools/testing/ftrace/ftracetest
> @@ -0,0 +1,152 @@
> +#!/bin/sh
> +# ftracetest - Ftrace test shell scripts
> +# Written by Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Maybe add your copyright here, with year?

Also, we should probably state that this is under the GPL v2?

-- Steve

> +
> +usage() { # errno [message]
> +[ "$2" ] && echo $2
> +echo "Usage: ftracetest [options] [testcase(s)] [testcase-directory(s)]"
> +echo " Options:"
> +echo "		-h|--help  Show help message"
> +echo "		-k|--keep  Keep passed test logs"
> +echo "		-d|--debug Debug mode (trace all shell commands)"
> +exit $1
> +}

  parent reply	other threads:[~2014-09-16 22:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 11:06 [RFC PATCH v3 0/4] ftrace: Add a ftrace test collection Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 1/4] ftracetest: Initial commit for ftracetest Masami Hiramatsu
2014-09-04  1:41   ` Namhyung Kim
2014-09-04  1:48     ` Masami Hiramatsu
2014-09-16 22:21   ` Steven Rostedt [this message]
2014-09-17  5:40     ` Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 2/4] ftracetest: Add ftrace basic testcases Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 3/4] ftracetest: Add kprobe " Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 4/4] ftracetest: Add XFAIL/XPASS and POSIX.3 std. result codes Masami Hiramatsu
2014-09-04  2:29   ` Namhyung Kim
2014-09-04  4:39     ` Masami Hiramatsu
2014-09-08 10:41       ` Masami Hiramatsu
2014-09-04  2:42 ` [RFC PATCH v3 0/4] ftrace: Add a ftrace test collection Namhyung Kim
2014-09-04  3:57   ` Masami Hiramatsu

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=20140916182109.4fff4169@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=oleg@redhat.com \
    --cc=shuah.kh@samsung.com \
    --cc=tom.zanussi@linux.intel.com \
    --cc=yoshihiro.yunomae.ez@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®