diff options
author | Namhyung Kim <namhyung@kernel.org> | 2017-04-17 11:44:29 +0900 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-04-17 17:26:50 -0400 |
commit | 560642d9ab5c37451ee43989dd9a35037ab5ab8d (patch) | |
tree | 4c9a6a213c3c98eece089f4c67c2223fb6408ef8 /tools | |
parent | 1e10486ffee0a5b060c58b9c8c712422f7b88b3b (diff) | |
download | linux-stable-560642d9ab5c37451ee43989dd9a35037ab5ab8d.tar.gz linux-stable-560642d9ab5c37451ee43989dd9a35037ab5ab8d.tar.bz2 linux-stable-560642d9ab5c37451ee43989dd9a35037ab5ab8d.zip |
selftests: ftrace: Add -l/--logdir option
In my virtual machine setup, running ftracetest failed on creating
LOG_DIR on a read-only filesystem. It'd be convenient to provide an
option to specify a different directory as log directory.
Link: http://lkml.kernel.org/r/20170417024430.21194-4-namhyung@kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/ftrace/ftracetest | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest index 52e3c4df28d6..a8631d978725 100755 --- a/tools/testing/selftests/ftrace/ftracetest +++ b/tools/testing/selftests/ftrace/ftracetest @@ -16,6 +16,7 @@ echo " -k|--keep Keep passed test logs" echo " -v|--verbose Increase verbosity of test messages" echo " -vv Alias of -v -v (Show all results in stdout)" echo " -d|--debug Debug mode (trace all shell commands)" +echo " -l|--logdir <dir> Save logs on the <dir>" exit $1 } @@ -64,6 +65,10 @@ parse_opts() { # opts DEBUG=1 shift 1 ;; + --logdir|-l) + LOG_DIR=$2 + shift 2 + ;; *.tc) if [ -f "$1" ]; then OPT_TEST_CASES="$OPT_TEST_CASES `abspath $1`" |