public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: "lina.zhao" <lina.zhao@windriver.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH]mktemp command in runltp version issue
Date: Thu, 09 Sep 2010 16:08:29 +0800	[thread overview]
Message-ID: <4C8895FD.5010809@windriver.com> (raw)
In-Reply-To: <6AA0EB8D-1C22-4BFD-BC94-BB687B5C08CD@gmail.com>

but $TMPDIR may not be defined in the environment, so we need --tmpdir / 
-p to specify the directory
-p is support on most of versions.

mnt_pnt=`mktemp -d $TMP/mnt_pnt.XXXXXX` doesn't work well

lina@lina-desktop:~$  export TMP=/home/lina/tmp/
lina@lina-desktop:~$ mktemp -d $TMP/mnt_pnt.XXXXXX
/home/lina/tmp//mnt_pnt.i12144
lina@lina-desktop:~$ mktemp -d -p $TMP mnt_pnt.XXXXXX
/home/lina/tmp/mnt_pnt.Q12146

if $TMP include / in end, then there will be 2 // for the temp file

> On Sep 8, 2010, at 11:22 PM, lina.zhao wrote:
>
>> Hi,
>>
>> In runltp:
>>
>> if [ -n "$DEVICE" ]; then
>>      mnt_pnt=`mktemp -d --tmpdir=${TMP} mnt_pnt.XXXXXX`
>>
>> --tmpdir is a invalid option for mktemp version 1.5, which is used
>> widely. The valid option to specify a directory for version 1.5 is
>> -p directory.
>
> Or just remove --tmpdir=<blah> altogether? If $TMPDIR is defined in 
> the environment, then it is the fallback if --tmpdir / -p isn't 
> specified (please see the manpage for more details)... OR... just do:
>
> mnt_pnt=`mktemp -d $TMP/mnt_pnt.XXXXXX`
>
> The same change will probably need to be applied to the runltp lite 
> script.
>
> Cheers,
> -Garrett
>


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2010-09-09  8:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09  6:22 [LTP] [PATCH]mktemp command in runltp version issue lina.zhao
2010-09-09  6:52 ` Garrett Cooper
2010-09-09  8:08   ` lina.zhao [this message]
2010-09-09 16:18     ` Garrett Cooper
2010-09-13  8:04       ` lina.zhao

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=4C8895FD.5010809@windriver.com \
    --to=lina.zhao@windriver.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=yanegomi@gmail.com \
    /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