diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2016-11-16 17:14:21 +0900 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-11-22 15:53:58 -0500 |
commit | 62197529000aa56d8a1ca397becd58a430cb7409 (patch) | |
tree | 56a4133edf4022e193b108b768da662300c803fa /tools/testing | |
parent | 57209b96951383c8276fe341a60a43c8de0d6b11 (diff) | |
download | linux-62197529000aa56d8a1ca397becd58a430cb7409.tar.bz2 |
selftests: ftrace: Introduce TMPDIR for temporary files
Introduce TMPDIR variable which is removed after each test
is done, so that the test script can put their temporary
files in that.
Link: http://lkml.kernel.org/r/147928406116.22982.8761924340108532378.stgit@devbox
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/selftests/ftrace/ftracetest | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest index d08235f65202..685376b485a2 100755 --- a/tools/testing/selftests/ftrace/ftracetest +++ b/tools/testing/selftests/ftrace/ftracetest @@ -242,6 +242,7 @@ __run_test() { # testfile run_test() { # testfile local testname=`basename $1` local testlog=`mktemp $LOG_DIR/${testname}-log.XXXXXX` + export TMPDIR=`mktemp -d /tmp/ftracetest-dir.XXXXXX` testcase $1 echo "execute: "$1 > $testlog SIG_RESULT=0 @@ -258,6 +259,7 @@ run_test() { # testfile [ $BE_QUIET -eq 0 ] && catlog $testlog TOTAL_RESULT=1 fi + rm -rf $TMPDIR } # load in the helper functions |