lkml.org 
[lkml]   [2016]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -tip v3 7/9] selftests: ftrace: Introduce TMPDIR for temporary files
Date
Introduce TMPDIR variable which is removed after each test
is done, so that the test script can put their temporary
files in that.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
tools/testing/selftests/ftrace/ftracetest | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index d08235f..685376b4 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
\
 
 \ /
  Last update: 2016-11-16 09:15    [W:1.610 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site