diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-11-06 11:04:28 +0900 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-11-06 08:38:46 -0500 |
commit | 347e0e46b1515165ec3e2786ff5bee31eb778bb5 (patch) | |
tree | 37c47f39d2dfe01650ca3cfb6769b16366a42c38 /tools/testing/selftests/ftrace | |
parent | c6c93242db95371d976cf9b5ff9e614c71f75a70 (diff) | |
download | linux-347e0e46b1515165ec3e2786ff5bee31eb778bb5.tar.gz linux-347e0e46b1515165ec3e2786ff5bee31eb778bb5.tar.bz2 linux-347e0e46b1515165ec3e2786ff5bee31eb778bb5.zip |
ftracetest: Use logfile name supported by busybox's mktemp
When I run the ftracetest in a busybox docker container, I saw
following error. Make the logfile template to comply with busybox's
mktemp. It also keep the logfiles under the logs directory.
# /linux/tools/testing/selftests/ftrace/ftracetest
=== Ftrace unit tests ===
mktemp: unrecognized option `--tmpdir=/linux/tools/testing/selftests/ftrace/logs/20141106-003624/'
BusyBox v1.22.1 (2014-05-22 23:22:11 UTC) multi-call binary.
Usage: mktemp [-dt] [-p DIR] [TEMPLATE]
Create a temporary file with name based on TEMPLATE and print its name.
TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).
Without TEMPLATE, -t tmp.XXXXXX is assumed.
-d Make directory, not file
-q Fail silently on errors
-t Prepend base directory name to TEMPLATE
-p DIR Use DIR as a base directory (implies -t)
-u Do not create anything; print a name
Base directory is: -p DIR, else $TMPDIR, else /tmp
[1] Basic trace file check/linux/tools/testing/selftests/ftrace/ftracetest: line 244: can't create : nonexistent directory
/linux/tools/testing/selftests/ftrace/ftracetest: line 244: can't create : nonexistent directory
[FAIL]
Link: http://lkml.kernel.org/r/1415239470-28705-1-git-send-email-namhyung@kernel.org
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/selftests/ftrace')
-rwxr-xr-x | tools/testing/selftests/ftrace/ftracetest | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest index c6381a9faf83..535b98b79c29 100755 --- a/tools/testing/selftests/ftrace/ftracetest +++ b/tools/testing/selftests/ftrace/ftracetest @@ -218,7 +218,7 @@ trap 'SIG_RESULT=$XFAIL' $SIG_XFAIL # Run one test case run_test() { # testfile local testname=`basename $1` - local testlog=`mktemp --tmpdir=$LOG_DIR ${testname}-XXXXXX.log` + local testlog=`mktemp $LOG_DIR/${testname}-log.XXXXXX` testcase $1 echo "execute: "$1 > $testlog SIG_RESULT=0 |