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

l...@lina-desktop:~$  export TMP=/home/lina/tmp/
l...@lina-desktop:~$ mktemp -d $TMP/mnt_pnt.XXXXXX
/home/lina/tmp//mnt_pnt.i12144
l...@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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to