Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62197529 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Steven Rostedt
Browse files

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: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 57209b96
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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