]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
selftests: ftrace: Add -l/--logdir option
authorNamhyung Kim <namhyung@kernel.org>
Mon, 17 Apr 2017 02:44:29 +0000 (11:44 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 17 Apr 2017 21:26:50 +0000 (17:26 -0400)
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>
tools/testing/selftests/ftrace/ftracetest

index 52e3c4df28d6ff243a70190592d404eba2be23b7..a8631d978725baa3b26b910b227bf55ce50c7f82 100755 (executable)
@@ -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`"