public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/3] ftracetest: Use logfile name supported by busybox's mktemp
Date: Thu, 06 Nov 2014 12:12:22 +0900	[thread overview]
Message-ID: <545AE716.7060101@hitachi.com> (raw)
In-Reply-To: <1415239470-28705-1-git-send-email-namhyung@kernel.org>

(2014/11/06 11:04), Namhyung Kim wrote:
> 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

Oops! good catch :)

> 
>   [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]
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Thank you,


> ---
>  tools/testing/selftests/ftrace/ftracetest | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
> index 8cc01c14262f..93b1bf5eadb5 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
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



  parent reply	other threads:[~2014-11-06  3:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06  2:04 [PATCH 1/3] ftracetest: Use logfile name supported by busybox's mktemp Namhyung Kim
2014-11-06  2:04 ` [PATCH 2/3] ftracetest: Clear trace buffer after running kprobe testcases Namhyung Kim
2014-11-06  3:12   ` Masami Hiramatsu
2014-11-06  2:04 ` [PATCH 3/3] ftracetest: Add basic event tracing test cases Namhyung Kim
2014-11-06  4:40   ` Masami Hiramatsu
2014-11-06  3:12 ` Masami Hiramatsu [this message]
2014-11-06 13:41   ` [PATCH 1/3] ftracetest: Use logfile name supported by busybox's mktemp Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545AE716.7060101@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox